Finding a Hosting Company
To get your pages on the Web, you'll need a server that actually lives on the Web full-time. Your best bet is to find a hosting company and let them worry about the details of keeping a server running. No worries, though: finding a hosting company is fairly straight-forward and inexpensive.
Which company? You can start by typing in web hosting in a search engine. Then do your homework. it's kind of like finding the best cell phone plan: there are lots of options and plans. You really have to shop around for the best deals and for the service that works for you.
I have been using WestHost for many years without complaint.
One Minute Hosting Guide
Here are some features to think about when shopping for a web host and hosting plan.
Does the hosting company have a good system for handling your technical questions? The better ones will answer your questions quickly either over the phone or via email.
Data Transfer ("Bandwidth")
This is a measure of the amount of pages and data the hosting company will let you send to your visitors in a given month. Most hosting companies offer reasonable amounts of data transfer for small sites in their most basic plans. If you're creating a site that you expect will have lots of visitors, you may want to carefully look into this.
Does the hosting company regularly make a backup of your pages and data that can be recovered in the event that the server has a hardware failure?
Does the hosting company include a domain name in its pricing? More about these in the next section.
Most hosting companies report keeping Web sites up 99% of the time or better.
Does your package include other goodies such as email addresses, forums, multiple domains, or support for scripting languages (something that may become very important to you in the future)?
Even if you've never heard of a domain name, you've seen and used a zillion of them; you know... google.com, yahoo.com, amazon.com, disney.com and many others.
So what is a domain name? Just a unique name that is used to locate your site. Here's an example:
There are different domain "endings" for different purposes: .com, .org, .gov, .edu; and also for different countries: .co.uk, .co.jp, and so on. When choosing a domain, pick the one that best fits you.
There are a couple of reasons you should care about domain names. If you want a unique name for your site, you're going to need your own domain name. Domain names are used to link your sites to other Web sites.
There is one thing you should know. Domain names are controlled by a centralized authority (called ICANN) to make sure that only one person at a time uses a domain name. Also, you pay a small annual registration fee to keep your domain name.
How can you get a domain name? The easy answer is to let your hosting company worry about it. They'll often throw in your domain name registration with one of their package deals. However, there are hundreds of companies that would be glad to help. You can find a list of them at http://www.internic.net/regist.html.
Moving In with FTP
Now what? Well, it's time to move in, of course. Like any move, the goal is to get things moved from, say, the kitchen of your old place to the kitchen of your new place. On the Web, we're just worried about getting things from your own root folder to the root directory on the Web server.
When we're talking about Web servers of FTP, we usually use the term "directory" isntead of "folder". But they're really the same thing.
How do you transfer files to a Web server? There are a variety of ways, but most hosting companies support a method of file transfer called FTP, which stands for File Transfer Protocol. You'll find a number of applications out there that will allow you to transfer your files via FTP, including Dreamweaver. Another two are called SmartFTP and WS_FTP.
You've probably heard the familiar "h" "t" "t" "p" "colon" "slash" "slash" a zillion times, but what does it mean? First of all, the Web addresses you type into the browser are called URLs or Uniform Resource Locators.
Here's how to decipher a URL:
The first part of the URL (http) tells you the protocol that needs to be used to retrieve the resource.
The second part is the Web site name (www.starbuzzcoffee.com). At this point you know all about that.
The third part (/index.html) is the path to the resource from the root folder.
A Uniform Resource Locator is a gloabl address that can be used to locate anything on the Web, including HTML, pages, audio, video, and many other forms of Web content.
In addition to specifying the location of the resource, a URL also names the protocol that you can use to retrieve that resource (http).
By the way, URL is not pronounced "earl". It's pronounced U-R-L.
What is the HTTP Protocol?
HTTP is also known as the HyperText Transfer Protocol. In otehr words, it's an agreed-upon method (a protocol) for transferring hypertext documents around the Web. While "hypertext documents" are usually just HTML pages, the protocol can also be used to transfer images, or any other file that a Web page might need.
HTTP is a simple request and response protocol. The browser asks the Web server for a file, and the Web server locates it and sends it. What happens if the server doesn't find it? You'll get a familiar "404 Error", which the reports back to your browser.
What's an Absolute Path?
The last time we talked about paths we were writing HTML to make links with the <a> element. The path we're going to look at now is the absolute path part of a URL, the last part that comes after the protocol (http) and the Web site name (www.starbuzzcoffee.com).
An absolute path tells the server how to get from your root folder to a particular page or file. Take Earl's Auto site, for example. Say you want to look in Earl's inventory to see if your new Mini Cooper has come in. To do that, you'll need to figure out the absolute path to the file "inventory.html" that is in the "new" folder. All you have to do is trace through the folders, starting at the root, to get to the "new" folder where his "inventory.html" file is located. The path is made up of all the folders you go through to get there.
So, that looks like root (we represent root with a "/"), "cars", "new", and finally, the file itself, "inventory.html". Here's how you put it all together:
How Default Pages Work
One thing we haven't talked about is what happens of a browser asks for a directory rather than a file for a Web server. For instance, a browser might ask for:
When a Web server receives a request like this, it tries to locate a default file in that directory. Typically a default file is called "index.html" or "default.htm" and if the server finds one of these files, it returns the file to the browser to display.
So, to return a file by default from your root directory (or any other directory), just name the file "index.html". But you need to find out what your hosting company wants you to name your default file, because it depends on the type of server they use.
What happens when you type the address like this?
It's missing the ending "/". When a server receives a request like this without the trailing "/" and there is a directory with that name, then the server will add a trailing slash for you. So, if the server gets a request for the URL above, it will change it to:
which will cause the server to look for the default file, and in the end will return the file as if you had originally typed:
Earl needs a little help with his URLs. He owns a smokin' car dealership but he doesn't know how to figure out the URL for each of the files labelled below.
Look at the directory structure below. You can click on the picture for a larger image.
On a sheet of note paper, write the 5 complete URLs needed to retrieve the files marked A, B, C, D and E. The domain name is www.earlsautos.com.
To retrieve the mustang.gif file on the bottom right, the URL is:
Source: "Head First HTML: with CSS & XHTML" by Elisabeth Freeman and Eric Freeman