Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have an A record for my domain for domain.com that points to my server's IP address. I would like to modify my DNS records so that www.domain.com points to another server.

Is this possible, and would I do that by simply creation a new A type record? Wouldn't domain.com override my www.domain.com record?

share|improve this question
    
From your comments on the answers, it sounds to me like what you really want to do is to run virtual hosts on the same server. Its not necessary to run separate servers. Your A records (or CNAME records) might end up both pointing to the same machine. –  Octopus Jun 27 '13 at 18:07
add comment

2 Answers

up vote 2 down vote accepted

The proper way to do this is you would make an A record named @ that points to the IP where domain.com sits and an A record named www that points to the IP where www.domain.com sits.

Some DNS services (such as Amazon's route53) use a blank A record, rather than naming it @.

share|improve this answer
    
Thank you very much for the technical details, I wanted to make sure that this was the proper way to execute what I was trying to do. –  gmoz22 Jun 27 '13 at 17:43
add comment

Technically, www is a subdomain of domain.com. As with any subdomain, you can create a CNAME record to point it to another host. See this for more on CNAME's and an example of pointing www to another host: DNS Made Easy: Example 3

I'd strongly recommend against doing this however if it will take them to another site because it will really confuse visitors since most sites redirect www.domain.com to domain.com or vice versa, and they might type either into a browser's address bar.

Neither one overrides the other, unless setup in your server to do so through a redirect (i.e., a 301 redirect).

share|improve this answer
    
Thanks for the recommendation, my client actually needs to have it set up that way because one site will be used only for mobile devices (the actual app) and the other for non-mobile devices (the corporate website). –  gmoz22 Jun 27 '13 at 17:42
2  
No problem. I think the standard for mobile content is m.domain.com, which is a CNAME record as well. –  dan Jun 27 '13 at 17:52
add comment

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.