I’ve been using Network Solutions as my domain registrar since it was the only registrar.
Recently, one of my customers wanted to register several domains that they won’t be using for a while, and having heard good things about GoDaddy, I decided to create an account there and try them out on these new domains.
One difference I see is that when you start a new domain with Network Solutions, they default to multiple A records (www, @, *) and no CNAME records, where GoDaddy seems to default to just one A record (@) and then has several default CNAME records (WWW, mail, FTP, etc) where several of them point to the @ A record.
Is there an advantage one way or another? Is it better to have one A record and a CNAME record for www that points to it, or two A records, one @ and one www?
I’ve never really used CNAME records, and now wonder if I’m missing something.
-Quickly change the IP address for a group of records; you just change the IP of the A record instead of all the records
-Point your record to a zone entry you don’t control (e.g. www.mydomain.com. IN CNAME www.someotherdomain.com.)
The disadvantage is that resolving CNAME records to IP addresses requires two lookup operations instead of one, putting a heavier load on the DNS server.
There’s not going to be any difference an end-user can see. It’s mostly down to how you choose to organize things. I prefer having only one A record per IP address, and have a proper PTR record associated with the IP, matching the A record. Then any other aliased names would use CNAME records. This can simplify management of IP addresses.
CNAMEs can also be useful in cases such as dynamic DNS, e.g. you’d like to point your own hostname at a dyndns.org hostname. That way your CNAME does not have to be updated as the IP changes.
Functionally, a CNAME will result in one extra DNS lookup, as it will first resolve into the real name, and then do another lookup to resolve this to an IP address (unless this is cached). This isn’t really a practical concern performancewise nowadays.
One thing to note, and a possible reason Network Solutions configures things the way they do, is that you cannot have a CNAME along with another entry for any particular hostname. For example:
The thinking being you want mail to go to one host, web traffic to another, but don’t want to assign an IP address to “example.com” by itself. Unfortunately that does not work, and you need to do:
Thanks, both Caldazar and teletype, I’m going to have study that a little bit and make sure I understand.
One other question, it is true that if I have an MX record that points to a host name on my domain, (e.g. MX 10 mail.example.com. where example.com is the domain) I must have an A record for that same host name (e.g. mail IN A 10.0.0.1), is that correct?
I’ve always done it that way, and it seems this is one time when you have to have multiple A records, if your mail server is at a different IP address than your main domain.
That’s correct. The MX record must contain an FQDN and not an IP address, so MX 10 10.0.0.1 is invalid. And you would need an A record for the FQDN you specified, as you said.
You would have multiple A records for each different physical host, adapter or IP. If you have three hosts each with their own IP (or 1 host with three IPs), you would need at least one A record for each under normal conditions. This could be common for an organization that hosts multiple servers - say web, mail and FTP all on separate machines or at separate locations.
Also, many organizations have redundant mail servers, each with an MX record of a lower priority, so that’s an additional A record per.
For example, at my company we have four public websites, all externally hosted at the same IP (one A record, three CNAME). We have our webmail, hosted locally. We also have 2 MX records at different IPs than our webmail; finally a few employee-only sites. All in all, 6 A records.
Thanks, that does fit with what I was thinking, I just wanted to be sure I wasn’t missing anything.
Very similar to what I run for myself and my customers. Several websites, FTP sites, and two different mail servers spread out across four physical servers. So in almost every domain I set up, I have one or two MX records pointing to different FQDNs, plus A records for the “mail” and “mail2” hosts (that’s what I always call them, not original but WTH), plus A records for the www and FTP hosts…
I’ll have to look at using CNAME records for the www and FTP host names in those cases where they run off the same server and IP address.