Designing your site is only one of the steps towards going online.
It’s surprising, although perhaps it shouldn’t be, how much difficulty people have with what’s often taken for granted as one of the basic parts of doing a website – uploading it to a web server.
So, I’ll explain some of the ways sites can be uploaded, which ones you’re most likely to come across, and what their pros and cons are.
The most common method for uploading your site is via ftp (file transfer protocol); it’s the method supported by many web-hosting providers and built into lots of web-design tools.
And, if you don’t have it included in your web editor, Windows, Mac OSX and Linux all provide a command-line ftp program to allow the copying of files.
Looking at my reader mailbox, it’s obvious that a lot of confusion arises over where people need to put their web sites when they upload them; these problems arise with ftp and other transfer methods.
Virtual confusion
There are a couple of key things to realise when it comes to copying your files to another system on the Internet. The first is that a computer can be called more than one name, and the second is that the same is true of a folder or directory on a computer.
So, hostnames first.
Very often, especially if you’re using a shared hosting service (that is, a server that’s not dedicated to just your website), the computer that stores the files has a completely different name to the web server part of it.
You might access a website using a name such as www.pcw.co.uk, but the computer that it’s stored on may be webserver36.megahostingcorp.com.
Depending on how things are configured, you may be able to upload pages by connecting to your web server’s name using ftp, or you may have to use the computer’s real name.
When someone requests a page, the domain name system (DNS) directs www.pcw.co.uk to the same IP address as the server, and then the web server software looks at the name of the site that’s included in the request for a page and fetches the appropriate file from the right directory on the server.
And that’s where the next level of confusion can creep in; just because a file name immediately follows the host name – for example, www.somethingorother.co.uk/index.html – doesn’t mean it’s in the top-level folder of the disk. It simply means it’s in the top level of the web folders.
Straightforward enough, on the face of it.
But often when you connect to a web server via ftp, you’ll find that the folder you see first isn’t the one where you need to store your files.
For example, with one of my web servers, all the files for the site need to be stored in the folder called /web; copy them into the top level, and they won’t be seen. On another one, the pages for nigelwhitfield.com have to be in /home/sites/www.nigelwhitfield.com.
Mix up some of these settings – or let your web-editing program try to fill them in automatically – and you can end up being unable to upload your files, or potentially having files created that have invalid links.
All Web Hosting