Subdomains are used in websites quite often. There can be many reasons why one would want subdomains in a website. But before moving on to the reasons, let’s see what a subdomain is?
A Subdomain is basically a domain name which lies below the root domain in the hierarchy tree.
http://www.example.com/ is a website with ” example” as the main domain name. I am taking this as an Illustration since IANA also known as the Internet Assigned Numbers Authority allows us to use it freely. IANA is a non profit organization which manages the IP Address Space and Allocation.
Now with this domain name we could have a subdomain called as events. It would look something like this http://www.events.example.com/ . Please note that this is not an active link and it is only for Illustration purposes. This basically creates a folder called “events” under the root directory “example”.
Let’s understand the hierarchy here.
Given this http://www.events.example.com/
.com is the first level domain
example is the second level domain
events is the third level domain
Now why would one want to have a subdomain?
The reasons could be many. But the main objective would be to add another section to the website. Suppose a website specializes in books (http://www.books.com/) and they want to expand and Include office supplies in their business. They could have a subdomain called “office” which would only include Information regarding office supplies. It would look something like this http://www.office.books.com/
So rather than having both Books and Office Supplies in one Page we are segregating it so that each one has it’s own focus. And at the same time it is not two separate entities, since the subdomain is always linked to the root domain. It’s like a Parent->Child relationship.
Subdomains helps us to organize and manage content better.