How to create a subdomain and how do they work?

Answer

DNS is built off of a hierarchy for scale-ability and/or for granularity.

If we take the a domain like www.stackoverflow.com. and break it down, here is what we get.

  1. www - This is the host portion of the domain. It is either an A record or a CNAME and eventually points to an ip address.
  2. stackoverflow - This is one of the domain levels. It has it's own DNS servers and config managed by the stackoverflow team. This allows that team to manage the entries specific to their needs.
  3. com - This is called a TLD (top level domain). All other domains that end in .com have an entry on the "com" dns servers.
  4. . - This is called the ROOT. There are 20 somodd root DNS servers scattered around the world. These servers are used to identify where the .com, .org, .edu, .gov, etc dns servers are.

From a client perspective what happens when you query www.stackoverflow.com is:

  1. You query the . name servers to ask where the com dns servers are.
  2. You query the com dns servers to ask where the stackoverflow dns servers are.
  3. you query the stackoverflow dns servers to ask where www is.

A subdomain simply means that you add an additional layer of DNS servers in the mix so that you can add more scale-ability and/or granularity to the mix.

All dns Questions

Ask your interview questions on dns

Write Your comment or Questions if you want the answers on dns from dns Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---