Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In all examples of setting up dns, MX records points to (as I understand, purpose is easily change mail server without touching main host). And even my registrar's backend doesn't allow such operation.

Why I can't point MX to, and why I shouldn't?

share|improve this question
up vote 2 down vote accepted

As long as your domain has an associated A record, you can point an MX DNS entry to it. It's just not advised to do so.

An DNS MX type record always points to an A record which points then to an IP. You can have multiple MX records per domain with a different or equal priority. It's also ok just to have only one MX record pointing to an A record, no matter which one. You just should not let it point to a CNAME record instead of an A record (this is often done in big environments, where thousands of domains pointing to a few servers.

share|improve this answer
So, then if I point MX to, where should I point PTR record? I cannot point it to, because it's not main domain for my server. Can I have multiple domain names in PTR records? – hjdm Dec 10 '12 at 15:55
Your provider has to set the PTR record, the reverse lookup will query the IP and asks for a matching hostname. But it doesn't ask your DNS (this would be forward), it asks the network owner (reverse). So the PTR record has to be set by your provider. Your PTR record should in your case also point to – mgabriel Dec 10 '12 at 16:00
But what to do with I have (mail server) and (web server) on the same machine, so should I just leave without PTR and point to (I can edit PTR myself in provider's admin panel) – hjdm Dec 10 '12 at 16:06
I'd recommend to set MX and PTR matching to, even if it is on the same host as – mgabriel Dec 10 '12 at 20:29

The MX field is corresponding to a name of a mail server (not an IP), with its priority. So you need to have defined a name associated to its IP before using the MX field. I think you can define the zone IP and then the MX to the zone if you want, but it is not common, as generally the Web server (used by IP zone) is not the same machine as your mail server

share|improve this answer

Your MX record tells the internet where your mail server is, and in that regard, it is intended to be pointed at a specific host. (If resolves to a single host, you may have your MX records point at it, and provided there's something there to receive the mail, it should even work, but is not recommended.)

Again, this is because of what an MX record fundamentally is - a signpost for the rest of the internet saying "send mail for my domain to this host."

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.