What is a Subdomain? - How to Create, Name and Use Subdomains
A Domain name can be subdivided into smaller units called Subdomains. 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, has 2 levels with each level seperated by a dot (.). Examples are:
Notice that there is no www proceeding the domain name as www is reality a subdomain. 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:
Understanding the www SubdomainMost 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 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 a subdomain of the ibm.com domain name. Just like sales.ibm.com would be. Why Create Subdomains?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:
Using Separate Folders to Sub Divide a Web SiteThis is the most common method and is easy to implement on almost all websites. Here the main domain name is abc.com. to access the website you type in http://www.abc.com or http://abc.com (not always possible). When you do that you get the index.htm file showed circled in yellow (below) for that website. You can now create folders underneath the main site (here sales and MTG) and each folder will contain files relevant to that department. You can tell you sales customers to access the this folder by giving them the URL of the folder: http://www.abc.com/sales or http://www.abc.com/mtg. Here when the visitor types http://www.abc.com/sales into his browser he gets the home page for that folder - the index.htm file circled in red below.
Note: It is normal and desirable, but not compulsory, to create a home page for each folder such that when someone enters the site using the folder name and not a web page they get the default web page of that folder (folder home page). Using Sub DomainsIn the above examples you can see how easy it was to section the website. The only problem with this form of sectioning is that the URL that you need to give your customers is not what most web users are used to seeing. To get a more easy to remember URL you need to create subdomains. In our case our domain name is abc.com and a subdomain would look like this: subdomainname.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 again create folders but this time you associate each folder with its own domain name as show 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 DomainsThe 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 subdomain and parent domain. From a management and Search Engine perspective using folders is preferred over subdomains. I normally use subdomains for my blogs. This is because most of my sites use standard html templates for the site and Wordpress for the blog. So I tend to use blog.mysite.com for the blog and www.mysite.com for the main site. However on some sites I use Wordpress to host the main site and blog and then I use www.mysite.com for the main site and www.mysite.com/blog for the blog part of the site. So only use a subdomain if you really want to create totally separate areas of you site if you are just try to separate/organise content then use folders/sub directories.
|
||
![]()
|