Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
example.com is the domain you should be using as a fake domain in examples. See en.wikipedia.org/wiki/Example.com for more info and links to the RFC where this is explained further. –  Brian De Smet Jan 20 '10 at 18:43
    
And 192.0.2.0/24 for your "example" IP addresses. –  womble Jan 20 '10 at 20:38
    
When you say "Search engines don't like this", provide evidence (it is not in Google advices for webmasters, for instance). It really looks like yet another SEO urban legend. –  bortzmeyer Jan 22 '10 at 8:11

4 Answers 4

up vote 5 down vote accepted

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.

share|improve this answer
1  
more likely, they do have an MX record, but it points to thedomain.com instead of mail.thedomain.com –  Javier Jan 20 '10 at 14:59
1  
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. –  Michael Graff Jan 20 '10 at 15:08

<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.

share|improve this answer
    
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! –  justinbach Jan 20 '10 at 15:06
    
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. –  Michael Graff Jan 20 '10 at 15:11

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.".

share|improve this answer

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
share|improve this answer
    
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. –  Michael Graff Jan 20 '10 at 15:06
    
@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. –  Scott Lundberg Jan 20 '10 at 15:18
    
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. –  Greeblesnort Jan 20 '10 at 17:40

Your Answer

 
discard

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.