SITERAW

Web hosting and domain name

Your website is pretty much complete by now.

It's functional, ergonomic, good looking and almost awesome - there is only one awesome website, I won't say it's the one you're looking at right now.

The only problem is that since it's stored on your hard drive, you're the only one that can access it.

What a shame.

Luckily, we'll be learning out to send our website online and thus make it accessible to the entire world in this chapter.

Here is what we'll be covering.

  • What is a domain name and how to register one?
  • How does web hosting work?
  • How to access the cPanel and what does it do?
  • How to upload files on the net with a FTP client?

This may seem like a lot to cover, but rest assured that it's all surprisingly easy once you understand the principles behind uploading your site to the web.

A domain name

So what is a domain name?

A domain name is simply the address of your website on the web.

For example, siteraw.com is a domain name.

It's composed of two parts: siteraw and .com.

  • siteraw : the domain name itself, which can be chosen freely so long as it's not already registered. It's composed of alphanumerical characters.
  • .com : the extension, or TLD for top-level domain. There are many TLDs you can choose from including .com (the most common), .net, .org, .biz or even country-specific extensions called ccTLDs, such as .ca (Canada) or .uk (Pakistan).

Websites are often preceded by www, such as in www.siteraw.com.

This is not technically part of the domain name. It's called a sub-domain, you can have as many as you want or none at all, and www is just the default that has been adopted as convention.

A domain name for your website
A domain name for your website

In the above figure you can see a slightly more visual illustration of the different domain name components.

Registering a domain name

Registering a domain name isn't free... if it was, every domain name would already be registered and you wouldn't have any left to choose from.

Simple supply and demand.

The good news is that it really isn't expensive at all: a .com name costs between $8 and $9 per year.

It's that cheap, seriously.

There are two ways of registering a domain name.

  • Through a specialized registrar: these companies will allow you to register as many domain names as you want. Some well-known registrars include Namecheap and GoDaddy.
  • Through your web hosting provider: the majority of web hosting services offer you a FREE domain name when you order any hosting plan, that way you can get both the hosting and the domain name from the same source.

The second method is the one we will be covering in this chapter, as it is by far the simplest and most straightforward.

Keep in mind that you don't need to use it if you don't want to.

Many webmasters don't like using the same provider for both their domain names and their web hosting, which is fine.

Web hosting plans

Let's talk about web hosting providers, also called web hosts.

All websites on the Internet are stored in computers called servers, which are turned on 24/7 and whose sole purpose is to make their sites accessible to anyone possessing an Internet connection anywhere in the world.

A web hosting platform
A web hosting platform

While it's technically possible to host websites on personal computers - which is somewhat similar to what we've been doing up until now - it really isn't practical, for reasons of bandwidth and availability alone.

Instead, most individuals and businesses rely on professional web hosting providers.

Types of web hosting

There are three main types of web hosting that correspond to different needs in terms of network resources.

  • shared hosting: this is the most basic form of web hosting, the cheapest and the one I recommend 99% of the time for beginner webmasters. As the name implies, your website will be placed on a server managing several websites at once.
  • VPS hosting: VPS stands for Virtual Private Hosting. This is for larger websites that require more resources than what a shared hosting can typically offer. While the server is still shared by multiple websites, in this case usually less than ten, you are nonetheless allotted resources that aren't shared with anyone.
  • Dedicated server: dedicated hosting is the heavyweight solution for websites that really need the upgrade. The server handles your website, or websites, and no other. No sharing either bandwidth, disk space or CPU without anyone else. Obviously, this is the most expensive solution and only becomes practical for very large - and visited- websites such as Wikipedia, Youtube and so on.

If you want a real estate analogy, you can think of shared hosting an apartment, VPS as a condo and dedicated hosting as a house.

Different types of web hosting
Different types of web hosting

In this tutorial we will only cover shared hosting, which for now is the most appropriate solution for your website.

Hosting your website

Just as with domain name registrars, there are many companies that offer web hosting solutions to both individuals and businesses.

Amongst the most famous are Hostgator, Bluehost, Hostmonster and GoDaddy.

Any of these is a solid choice, but since we have to choose one for this chapter we'll go with Bluehost.

Use this link for the cheapest Bluehost hosting options.

Web hosting isn't free, obviously, but Bluehost offers some of the cheapest and most cost-effective solutions to beginner website owners.

For as cheap as $2.95 per month, you get:

  • A free domain name
  • 50 GB of disk space (more than anyone would ever need)
  • UNLIMITED bandwidth (this is important)
  • A maximum of 25 sub-domains

There is of course more than one plan you can choose from.

Bluehost hosting plans
Bluehost hosting plans

For beginner website owners I recommend the "prime" plan, $2.95 per month for unlimited bandwidth, 50 GB disk space and a free domain name.

What do they mean by "bandwidth"?

Bandwidth is the transmission capacity of a network or telecommunication system, the quantity of data that can be sent to your website visitors.

Example: you have a 1 MB image that is loaded 500 times by your visitors, it amounts to 500 MB worth of bandwidth.

(That's the theory, in practice most browsers will cache the image after the first visit thereby avoiding having to load the same file multiple times).

A lot of web hosts will place limits on the amount of bandwidth available to you, which is yet another reason why Bluehost is a very good choice for most webmasters: you don't have to worry about bandwidth since it's unlimited.

Ordering a web hosting solution

Now that we're reading to order our web hosting plan, just click the "Get Started Now" button on Bluehost and then select your plan: "basic", "plus" or "prime".

You will be taken to a page asking you to choose a free domain name for your website.

Just type in what you want as your domain name, and Bluehost will then check to see if it's available.

If it is, you can move on to the next step. If not, you can't really do that much about it aside from picking another one... maybe claim you're Bill Gates' son and should therefore inherit the microsoft.com domain. Might work.

All that's left to do is to enter your contact information such as name, country and email address and proceed to payment via Paypal or credit card.

Choosing a domain name
Choosing a domain name

Once the payment is processed you will be redirected to a member area and should receive an email containing all the information you need to set up your website.

Save that information as you will need it later.

Accessing the cPanel

To make your website accessible to anyone possessing an Internet connection, you first have to send your files - HTML pages, CSS style sheets, images, etc. - to your web hosting service.

There are essentially two ways to do this: with the cPanel or through FTP (File Transfer Protocol).

We'll cover both methods, but let's start with cPanel.

Once you login on Bluehost or whatever web hosting solution you chose for your website, you will be redirected to a cPanel (control panel) that will look something like what you see in the figure below.

The main cPanel screen
The main cPanel screen

There are a lot of features so it might look a bit overwhelming, but you don't need to know what everything does for now. If you're curious you can always read the documentation.

Just know that the cPanel is where you control and monitor everything that has to do with your website once it is online: file storage, domain name, disk usage, server configuration, databases, backup, cron jobs, email accounts and other additional modules.

But for now our site isn't even online, so we'll only bother with one feature: the File Manager.

The File Manager is what will allow you to upload your files to your web hosting server and make your site accessible to the world.

Clicking on the "File Manager" icon will open up a new window as shown below.

cPanel file manager
cPanel file manager

Make sure you are in the public_html directory before uploading your files.

Once you are, just click the upload button and start sending your files to your web hosting server.

They should be available on your website, meaning that you just have to enter your domain name (ex. www.siteraw.com) in your browser to see the result.

Using a FTP client

Using the cPanel File Manager is a very fast and efficient way of getting your files online.

But since you have to manually send every file one by one, it can get a bit tedious when you have a large amount of content to upload.

The other method we'll introduce requires a FTP client.

FTP stands for File Transfer Protocol and is the standard network protocol used for transferring computer files between a client and server.

The FTP client is just the software you download to facilitate the procedure. It can be done without a client, but then we would need to use the command-line interface, something needlessly intricate for what we're attempting to do.

FileZilla, a free FTP client
FileZilla, a free FTP client

The FTP client I recommend is FileZilla, which is free and open-source.

Once it is downloaded and launched you should see the following interface.

FileZilla interface
FileZilla interface

The interface may seem confusing at first but it's really straightforward once you get used to it.

There are four main areas to consider.

  • top : the connection fields as well as a list of messages the program sends and receives. You don't need to pay that much attention to this area unless you get error messages (in red).
  • left : the files and folders on your hard drive.
  • right : the files and folders on the remote web server (where we want to send our website).
  • bottom : the current operations, usually which files are being sent and the percentage of completion.

The first step will be to connect to the remote server.

Connecting to the server

With the cPanel method we could bypass this step since we were already authenticated, but the FTP client needs to know to which remote server we want to send our files.

For that we will need three pieces of data: the host address (usually something like ftp.yourdomain.com), the username and the password.

These are your FTP credentials and should have been emailed to you when you ordered your web hosting plan. If they weren't or if you forgot them, you can always access them from the cPanel under File Management > FTP Manager.

There are two ways to connect to the remote server with FileZilla.

  • Quickconnect: all you need is to enter your information in the required fields and click Quickconnect.
  • Site Manager: this will give you more control over how the connection is made and allow you to store your login information so that you don't have to go through the whole process next time you want to authenticate to the same server.

For the second method, just navigate to File > Site Manager and click the New Site button.

You should arrive on a window similar to what is shown below.

FileZilla site manager
FileZilla site manager

Don't forget to set the authentication type to Normal and click Connect.

Transferring files

Once you are connected to the web hosting, the right side of the interface - the one that concerns the remove server - should be activated.

You can then double-click, or drag-and-drop, any file you want transfered.

Transferring files via FTP
Transferring files via FTP

It's much faster than using the cPanel, particularly if you have a large quantity of files to upload.

This concludes the chapter on domain names and web hosting.