Hey Guys Does anyone have a good walkthrough that explains how DNS, nameservers, IP, MX records, etc, all work together? I get confused when I'm working with a site that is hosting by Company A and the domain is with Comapny B. I keep reading that you only have to update the nameservers info, but I don't understand why an A record change isn't required as well. When you update nameservers for a domain does it automatically resolve the IP for you?
The data field of the MX record should contain the name of the server that's handling mail for that domain. Something has to provide the A record for it, but that's going to be the DNS for the domain that the server is hosted on, not necessarily you. If you are hosting your own mail server on your own domain then you do need to provide an A record for it. So, if you are foobaz.com and you are hosting your own server then you need something like this: @ MX 5 mail mail A 1.2.3.4 If you are using an external mail provider then you just need to use whatever name they give you. @ MX 5 box72.bigmailhost.com. And you don't need an A record One other special case is if your DNS server is a subdomain of the domain it's serving DNS records for - in this case you need to provide glue A records for the NS machines at the registrar to make everything work Edit: And one other thing to watch is to make sure that the machine name in the MX record points to an A record - specifically, don't point it to a CNAME record, because some MTAs don't handle that correctly. @ MX 5 mail mail CNAME www www A 1.2.3.4 Will fail with certain MTAs, but @ MX 5 mail mail A 1.2.3.4 www A 1.2.3.4 Will work correctly Also, if you are using the approach with the DNS machines on your own domain and glue A records at the registrar then make sure that data matches exactly what's on your nameserver - getting this wrong also results in a system that works most of the time then fails occasionally. So if your registrar has this in the delegation record NS ns0.foobaz.com. NS ns1.foobaz.com. ns0.foobaz.com. A 1.2.3.4 ns1.foobaz.com. A 10.20.30.40 Then make sure the corresponding records in the servers at 1.2.3.4 and 10.20.30.40 return exactly this data to a NS query.