2

I'm currently playing around doing some development on an all-in-one box which is hosting web and mail services (among others), and I have a DNS question I can't seem to find a good answer to.

Imagine the domain here is example.com, and everything is running on a single host with a single IP (203.0.113.1)

For the website I have the following:

example.com.    IN    A        203.0.113.1
www             IN    CNAME    example.com.

I know that MX record must not be CNAMEs (RFC 1034 3.6.2), so to set up MX for mail, the usual approach is to add:

mail    IN    A    203.0.113.1
@       IN    MX   0 mail.example.com.

Now I'm wondering if I could instead just add:

@    IN    MX    0 example.com.

However I'm not sure if there are any technical or RFC reasons that this isn't allowed/possible.

Obviously using mail address is more flexible in terms of moving the mail service around later on - I'm just curious as to whether in this simple case it's necessary.

3

Yes, you can do that and many domains already do. There's nothing wrong with it, except perhaps for the lack of flexibility (but you're just one TTL away from changing it anyway).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_4_0": ["-item\"><a href=\"https://twitter.com/stackoverflow\" class=\"-link js-gps-track\" data-gps-track=\"footer.click({ location: 2, link: 32 })\">Twitter</a></li>\r\n                    <li class=\"-item\"><a href=\"https://linkedin.com/company/stack-overflow\" class=\"-link js-gps-track\" data-gps-track=\"footer.click({ location: 2, link: 33 })\">LinkedIn</a></li>\r\n                </ul>\r\n\r\n                <p class=\"mt-auto mb24\">\r\nsite design / logo &#169; 2019 Stack Exchange Inc; user contributions licensed under <a href=\"https://creativecommons.org/licenses/by-sa/4.0/\" class=\"js-gps-track\" data-gps-track=\"footer.click({ location: 2, link: 34 })\" rel=\"license\">cc by-sa 4.0</a>\r\n                            with <a href=\"https://stackoverflow.blog/2009/06/25/attribution-required/\"  class=\"js-gps-track\" data-gps-track=\"footer.click({ location: 2, link:35 })\" rel=\"license\">attribution required</a>.\r\n                    <span id=\"svnrev\">rev&nbsp;2019.9.13.34906</span>\r\n                </p>\r\n            </div>\r\n        </div>\r\n\r\n            </footer>\r\n            <script>StackExchange.ready(function () { StackExchange.responsiveness.addSwitcher(); })</scri"], "copyright__copyright__copyright": ["f moving the mail service around later on - I'm just curious as to whether in this simple case it's necessary.\n\n3\n\nYes, you can do that and many domains already do. There's nothing wrong with it, except perhaps for the lack of flexibility (but you're just one TTL away from changing it anyway).\n\nYour Answer\n\nBy clicking \u201cPost Your Answer\u201d, you agree to our terms of service, privacy policy and cookie policy\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}