Saturday, January 29, 2011

Basic dns question: www vs mail

I'm a web developer with a client that came to me needing a site redesign, and part of that included SEO work. (I hope this is the right place to ask this question!) The problem is that the client already owned his domain name prior to approaching me and actually has his DNS hosted at zoneedit.com, which doesn't provide the nicest DNS interface that I've ever seen.

Right now, the DNS zones are configured as follows (bogus data):

thedomain.com
24.47.156.62

ftp.thedomain.com
12.15.16.91

mail.thedomain.com
24.47.156.62

www.thedomain.com
12.15.16.91

The problem for me is that his www.thedomain.com and thedomain.com entries don't point to the same IP address, which means that you can only access his site via www.thedomain.com and not without the www. Search engines (and users like me that prefer to type web addresses without www) don't like this.

My initial thought was to change the IP address for thedomain.com to 12.15.16.91, or the entry for ftp and www; problem is, whenever I do this, he complains that he stops getting mail at his @thedomain.com email address and changes the thedomain.com IP back to the same as that for mail.thedomain.com.

I apologize if this is a basic question, but I'm not sure what to do here. How do I get web traffic to be directed to 12.15.16.91 whether it comes from www.thedomain.com or thedomain.com, but keep the client's email integrity intact?

Thanks!

  • Sounds like they don't have an MX record set up for the domain. Get that added and pointed to the proper location (probably mail.thedomain.com) and you should have no problem redirecting thedomain.com.

    Javier : more likely, they do have an MX record, but it points to `thedomain.com` instead of `mail.thedomain.com`
    Michael Graff : I think mostly likely they have an MX record, and it points to the mail server correctly, but they get their email through the apex name (using imap or pop). Or they're just confused. It's not like a WYSIWYG DNS editor has a solid ability to make anyone into a DNS expert, but they can make things almost working most of the time.
    From ktower
  • It sounds like his e-mail client may be configured to connect to POP3 or IMAP services using a hostname of "thedomain.com" rather than "mail.thedomain.com".

    How do I get web traffic to be directed to 12.15.16.91 whether it comes from www.thedomain.com or thedomain.com, but keep the client's email integrity intact?

    It is possible to configure multiple A records to resolve a single hostname to multiple IP addresses - but doing so will cause the DNS server to round-robin between the IP addresses. So this will only make the problem worse (because now his failures will become sporadic). I do not advise this. The first step you should take is to confirm what host his e-mail client is configured to connect to.

    For posterity, you should also confirm that the MX record for the domain is associated with "mail.thedomain.com." and not "thedomain.com.".

  • <rant>Why do people hide their real domain names here? It's not like it is confidential data, and in this (and most) cases, it would actually help answer the problem at hand! Otherwise we have to play a question and answer game.</rant>

    What does dig thedomain.com mx return? If no MX record, then it's simple to fix:

    1. Add a new name called mail.thedomain.com with an IP address that is currently the one at thedomain.com.

      mail.thedomain.com. A [old address of thedomain.com]

    2. Add an MX record:

      thedomain.com. MX 1 mail.thedomain.com.

    3. Make certain they configured mail CLIENTS to also get email through this new name, not the old one.

    Once this works, change the IP address of thedomain.com to wherever you really want it to go.

    justinbach : the reason I hid the domain is because I'd rather not have the client find this question in their own search explorations. I don't think it's that big a deal and I think I supplied all the necessary facts. At any rate, thank you very much for the response!
    Michael Graff : It's not a rant against you specially, but against the trend to hide all the facts, all the time. People are asking "my web server seems slow" but don't list their web server's URL so the really smart people here can take a look. People hide their domain names when asking a DNS question, so we have to play 20 question games to find out what the issue may be. I understand the reasons, but I'd have to say as a client I'm glad you asked before just going in and changing things as a guess.
  • I'd go a little bit farther and say that, while it's likely the client has an MX record, his mail server is misconfigured. They're mistakenly thinking that the mail server has to advertise itself as thedomain.com to send mail from thedomain.com.

    It is perfectly acceptable to send mail for thedomain.com from mail.thedomain.com. Since mail is dealt with via a separate MX record, it is my usual practice to treat the bare domain record (thedomain.com) as a "web" property.

    For a postfix server, this is the difference between:

    myorigin = thedomain.com
    mydestination = mail.thedomain.com, thedomain.com
    
    Michael Graff : Hmm. I think you mean the ADDRESS records at the zone apex are the addresses for the web server. Surely you don't consider the whole apex name to be owned by the web, since, well, it can't be.
    Scott Lundberg : @Michael: I think he is getting at the possibility that the mail server itself is mis-configured and chokes when thedomain.com is no longer the MX record.
    Greeblesnort : correct, if incoming mail is currently landing on the server at the thedomain.com resolution, then it's probably got the requisite A & MX records.

0 comments:

Post a Comment