[Techtalk] DNS question

Tracey tclark77 at tlcnet.info
Wed Jun 13 17:21:45 UTC 2012


Hi Terry,

I work for cPanel in QA, so I'm very familiar with the software, and 
DNS. I'm happy to lend some advice. If you have other questions, or if I 
can clarify anything, feel free to ask. DNS can seem tricky at first, 
but really it's pretty simple once you know the basic rules. I've put in 
some links to explain the basic rules further down in this message.

The way your former hosting company set up your account is kind of 
backwards. Usually you want your top level domain (example.com) as your 
cPanel main domain, and then other things like mail www and whatnot are 
created as CNAME entries in DNS pointing at your main domain.

Let me answer your question about why there were 2 DNS records for 
example.com and mail1.example.com as it will help with understanding the 
other stuff. Each hostname *does* need a DNS record. The computer of a 
visitor to your website (or trying to reach your mail service or 
whatever else it's trying to talk to) doesn't know where "example.com" 
is without being told it's IP. This goes for every single hostname, 
including mail1.example.com subdomain.example.com or whatever else. 
Without a DNS record, no computer will know how to resolve the hostname 
to an IP. DNS records tell my computer "mail1.example.com is at the IP 
123.123.22.11" and then my computer knows how to get to your server.

Generally, I'd recommend making the server's hostname be unique. Since 
you don't actually have separate mail and web servers on different 
servers, the one VPS is hosting both, this will make life easier. Since 
everything is on the same IP address, you can create one A name record 
for the main domain pointing it at the main IP. Then, you create CNAME 
records (aliases) for the subdomains (mail1 www and whatnot).


So you'd have a setup something like this. These are not complete DNS 
records, I'm just using this as an example:

example.com. IN A 123.123.22.11
mail1 IN CNAME  example.com
www IN CNAME example.com
server IN CNAME example.com


I recommend reading this article, it will show you the full and correct 
format of each kind of record. It will also help you understand how the 
DNS records go together. It explains the basic concepts you need to 
know, without going into the more arcane details. It will hopefully 
clarify why I've recommended this kind of setup.

http://corpocrat.com/2009/10/01/troubleshooting-common-dns-misconfiguration-errors/

This is a bit more in depth but also recommended.
http://rscott.org/dns/

Also, here's a link to a presentation I did last year on the basics of DNS:
http://www.cpanel.net/videos/dns-demystified/

I have the slides from it on PDF if you'd rather have that format. (This 
is legit in my company's rules). If you'd like a copy, mail me off list 
and I'll send it to you.

-- 
Tracey C





More information about the Techtalk mailing list