When you register a domain name most hosting/domain providers provide you with free sub domains.
Some (like Bluehost) actually proved unlimited sub domains, but all hosting providers provide enough sub domains for normal use.
But what is a sub domain and what is it used for?
Domains and Sub Domains Basics
Any Domain name can be subdivided into smaller units called Sub domains.
Because sub domains are part of the main domain name they don’t need to be registered.
In order to really understand this concept you need to understand exactly what a domain name is.
Firstly domain names vary in the number of levels depending on whether they are non-geographic (.com,.net,.org etc) or geographic (.uk,.de,us etc).
Non geographic domains like .com; which is the most common, have 2 levels with each level separated by a dot (.).
Notice that there is no www proceeding the domain name as www is in reality a hostname.
Most websites can be accessed using the www as a prefix e.g. www.ibm.com or simply as ibm.com.
Now once you register a domain name you are free to divide that domain name further into subdomains by creating a third level.
The names for the subdomains are decided by you and do not need approval of any Internet authorities.
As a example assume I register the domain name- mydomain.com. I can now create subdomains like:
Note: This is the main difference between a sub domain and a domain. A domain needs to be registered but a sub domain doesn’t need to be registered, just created as it is part of the main domain name
Understanding the www
Most people give out the address of a website starting with www. Ask someone the address of the ibm website and they would probably tell you it is www.ibm.com.
If you type this address into a browser then you will reach the ibm website.
However if you type in just ibm.com you will also get to the same website.
When ibm registered that domain name they registered ibm.com and not www.ibm.com
The use of the www prefix is just a convention, and the www is in fact a default hostname or alias which points to a web server in the ibm.com domain name space.
Why Create Subdomains? Why are the Used?
Subdomains allow you to divide your domain name/website into sections or separate areas.
As an analogy if you go to any medium to large company office you will see it divided into various departments like accounts, sales, product development.
People who work in these various departments are all located near to each other maybe on the same floor or office section.
You can do the same with your website. If you have a medium/large company you may want to have a separate website for the sales, and another for the Marketing side.
Rather then having totally separate websites you can section or divide your main website just as you would a normal office.
However you don’t actually need to create a subdomain to achieve this. There are actually two main methods used:
- Use separate folders
- Use Sub domains
In our case our domain name is abc.com and a subdomain would look like this: name.abc.com e.g. sales.abc.com or mtg.abc.com.
Now all we need to do is to associate the sub domain names with their bit of web space.
To do this you create folders that serve as the root directory for that subdomain and you associate each folder with its own domain name as shown below:
Now when the visitor types http://sales.abc.com he gets the index.htm file shown circled in red.
Because most people are conditioned to prefix all domain names with www to get a website then it is also possible to use the full address http://www.sales.abc.com and get the same file.
Again this is just a widely used convention.
Sub Folders vs Sub Domains and Search Engines
The treatment of subdomains by search engines has changed over time.
At one time a subdomain was treated as a total separate site by the search engines leading to sub domain spam.
However this has changed and they recognize the link between a subdomain and parent domain.
From a management and Search Engine perspective using folders is preferred over subdomains.
I normally only use subdomains for test websites.
Here is a video from Google engineer Matt Cutts
Q1- Do I need to pay extra for a sub domain?
A1- No not usually. However hosting providers may limit the amount of subdomains that you can create.
Q2- Are sub folders better than subdomains from an SEO perspective?
A2- Yes but that may change.
Q- I don’t have a domain name can I still create subdomains?
A- No- You need to own a domain name to create sub domains.
Q- I’ve created a sub domain when can I start using it?
A- It usually takes about 15 minutes for it to become available.
- Matt Cutts on subdomains vs sub folders
- Understanding Domain Names
- Understanding urls
- Creating a subdomain on Bluehost – video