Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Add Subdomain DNS record 1

Status
Not open for further replies.

HisMightiness

Programmer
Mar 17, 2004
54
US
First of all, I should openly admit that my understanding of DNS is from managing those that manage it, not actually managing it myself. (Translated = I am stupid when it comes to adding/modify DNS records.)

What kind of record in DNS do I need to add when adding a sub-domain? I was looking at examples on the DNS server I have access to, and I see both "Host (A)" and "Alias (CNAME)" used. Which one is correct? What is the difference?

Will
 
What kind of record in DNS do I need to add when adding a sub-domain? I was looking at examples on the DNS server I have access to, and I see both "Host (A)" and "Alias (CNAME)" used. Which one is correct? What is the difference?
The first question I would ask it your definition of sub-domain? Domain in the meaning of Active directory or Domain Namespace for a web-site?

Active Directory DNS: To add a sub-domain you would create a new "Domain" under any domain that exists in your DNS NameSpace. For example in DNS I would right-click on MyDomain.com and choose new domain. Name the new domain "MySub" (or whatever you choose). The subdomain namespace would be MySub.MyDomain.com.

For web space name: You could add either a host record (A) or and alias (CNAME). For Example I have a web server and again the namespace for the FQDN is MyDomain.com - Which is an (A) Record. I can add another Host Record (A) for point it to the IP Address of the web-server -or- I can create an alias (CNAME) for point it to the name of the server in DNS. Either way I will now be able to resolve
 
Indeed... I should have specified. I am speaking in terms of web site domain names.

Since you said both methods would work for a subdomain, what is the difference? Is there a drawback from using one over the other? I have currently tried using Alias (CNAME) and it is indeed propogating, but I want to be sure that I am following best practices (if possible).

Is there a benefit or drawback to using both methods?

Will
 
The difference is the (A) host record would point to the IP Address, whereas a CNAME (Alias) would point to the hostname of the webserver.

Say you have a host named webserver1 with the IP of 10.0.0.1

A record example - webserver1.com 10.0.0.1
A record example - 10.0.0.1
CNAME example - webserver1.com

Typically I create Host records (A) for web-sites, though either will work. One of the main reasons I do host records is when my webserver is hosting multiple sites (Host headders in IIS) and/or (virtaul hosts in Apache)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top