-2

This question already has an answer here:

I have an existing working physical server serving up web pages and email. I need to point the DNS records to a new physical server for the web pages, leaving the email server as is.

I have my DNS records set up like the example below.
Please note that I did not use mail for the hostname in MX records and all email clients use just the domain name in their setting for IMAP4 and SMTP and POP and I really do not want to reconfigure all of them.

How would I change these so the new web server will receive the web requests and the existing mail server will keep running as is?

I am using dotyou.com to register my domain names and be the host for my DNS. This is the syntax they use in their DNS control panel and it is all that I am familiar with.

I am using the domain name example.com instead of my real domain name for this example.

Edit host Files for domain (example.com)
   Hostname  Address    Record type  MX Pref
1) www       1.2.3.4       A            10
2) @         1.2.3.4       A            10
3) @         example.com.  MX           5
4) www       example.com.  MX           7

Thanks!

marked as duplicate by Ladadadada, Matthew Ife, Jenny D, Ward, Cristian Ciupitu Jul 6 '14 at 14:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Odd, A records don't have an MX pref .. but anyway. the simplest way to do this is:

  1. Remove entry 4 (www.example.com MX 7)
  2. Change entry 1 to be your new IP

That should leave your mail server alone, and change your web server to the new host.

  • For your solution I would have this problem. http://www.example.com would go to the new server BUT http://example.com would go to the old server. I need both to go to the new web server keeping email on the old server and hopefully the solution would not require me to change any of the email client setting for SMTP POP and IMAP4 from example.com to something like mail.example.com. Thanks for the reply tho. – user229336 Jul 4 '14 at 20:40
1

What you want, cannot be done. If http://www.example.com and http://example.com go to the new webserver, than mail to example.com will also go to the new webserver.

The only thing I can think of is this:

1.2.3.4 is new ip 2.3.4.5 is old ip

1) www       1.2.3.4       A            10
2) @         2.3.4.5       A            10
3) @         example.com.  MX           5
4) www       example.com.  MX           7

Than http://www.example.com will go to the new server. http://example.com and mail to     example.com will go to the old server. On your old server you can redirect http requests going to http://example.com to http://www.example.com (which is on the new server).

Next time you should use mail.example.com for email, it saves some trouble ;)

  • I decided to change all of the mail clients to use mail.example.com They use POP SMTP and IMAP4 on their mail server. Can you show me exactly the records I would need to have mail on 1.2.3.4 and web (both www and without www) on 5.6.7.8? I need to make SURE I don't interfere with working mail and web sites for this client. Thank you. – user229336 Jul 5 '14 at 16:41
  • You can do something like this: ---- mail 1.2.3.4 A ---- @ 5.6.7.8 A ---- mail example.com. MX ---- There is 1 MX record, telling that all mail for example.com should go to mail.example.com. The A record for mail.example.com gives 1.2.3.4 as ipadres. ALL other things, *.example.com will go to 5.6.7.8. – Dimitri Visser Jul 6 '14 at 12:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.