I l@ve RuBoard Previous Section Next Section

4.4 Configuring Mail to Go to One Server and the Web to Another

4.4.1 Problem

You want mail addressed to a particular domain name to be routed to one mail server, while users specifying that domain name in a URL reach a web server on a different host.

4.4.2 Solution

Since mail servers sending mail to a particular domain name mail destination preferentially use MX records for that domain name, add an MX record to that domain name pointing to the mail server. Web browsers, on the other hand, only look up A records, so attach an A record to the domain name pointing to the address of the web server. For example:

foo.example.    IN    MX    10 mail.foo.example.
foo.example.    IN    A    192.168.0.100

4.4.3 Discussion

This is less a recipe than a reminder that a single domain name can serve multiple purposes: it can represent a mail destination when it appears on the right side of an email address. It can represent a web site when it appears in a URL. Since some of these services look up different types of records, you simply attach multiple record types to a single domain name to accommodate them.

4.4.4 See Also

Recipes Section 2.5 and Section 2.6.

    I l@ve RuBoard Previous Section Next Section