1

I have a domain (mydomain.com) with working email (provided by the domain registrar, let's call them ExistingHosting), but no web site. I now want to create a web site, hosting it with a different hosting company (let's call them NewHosting). I want the email to remain with ExistingHosting.

The tech support people at NewHosting advise me to get ExistingHosting to change the nameservers for mydomain.com to point to NewHosting's nameservers, and then to get NewHosting to change the MX Records to point back to ExistingHosting's mail servers.

My question relates to the MX record. The existing MX record (viewable through ExistingHosting's control panel) looks like this:

mydomain.com IN MX mydomain.com                                (1)

When I ask the tech support people at ExistingHosting how I should set up the MX record (with NewHosting) once the nameservers for mydomain.com point to NewHosting's nameservers, they tell me that I should use the same MX record, as above. But, I was expecting them to say that the MX record would now need to looks something like

mydomain.com IN MX mail.existinghosting.net                    (2)

My (possibly flawed) understanding is that once the nameservers are changed to point to NewHosting's nameservers, then the first MX record, (1) above, would now (if I'm lucky!) point to mail servers at NewHosting.

So, my question is this: Is my understanding flawed, or are the tech support people at ExistingHosting giving me the wrong advice? Or both :-(

To put it another way, doesn't the second occurrence of domain.com in MX record (1) provide a host name which is then the subject of DNS look-up, which will now point to NewHosting's (default?) mail servers?

As you may have guessed, I'm a newbie at fiddling with DNS. I want to be absolutely sure of what I'm doing before changing anything.

UPDATE 1

As a result of responses here (thank you @Ramhound, @Yuri G. and @Tom Ruh), I got back to ExistingHosting and pushed them for the name of their mail host. They responded with the following instructions:

You will be required to add an A record for: mx.mydomain.com pointing to IP 168.99.99.99 and another A record for webmail.mydomain.org. 14400 IN A 168.99.99.99.

(That's not the real IP Addr they gave me!)

They said that with this configuration I won't need an MX record. I don't understand how that can work. Can it work? If so how? Does the name mx have a special meaning in mx.mydomain.com that bypasses the need for an MX record?

  • What you were expecting to be told is what you should have been told. – Ramhound May 19 '15 at 16:11
  • I do not think you have not been given the wrong information. However I think there is some imortant things not being mentioned. Do you have a need to host your own DNS? If not you can leave your DNS with your current registrar. Then just add an "A" record that will point to your new hosting. – Tom Ruh May 19 '15 at 16:20
  • @Tom Ruh: The reason for pointing the name servers at NewHosting is that they tell me that "things such as creating subdomains and other Cpanel based functions will much easier" – Matt Wallis May 19 '15 at 16:35
3

On the NewHosting DNS it should be:

mydomain.com <TTL> IN NS <NS1.NewHosting.domain>
mydomain.com <TTL> IN NS <NS2.NewHosting.domain>
mydomain.com <TTL> IN A <NewHosting address>
www.mydomain.com <TTL> IN CNAME mydomain.com
mail.mydomain.com <TTL> IN A <ExistingHosting ip address>
mydomain.com <TTL> IN MX 0 mail.mydomain.com
  • Thanks Yuri. I've added the latest suggestion (Update 1 in my question, above) from ExistingHosting after you gave your answer. – Matt Wallis May 20 '15 at 13:32
  • I can't comment on the question yet :) I would ask again the provider how it will work without the MX record, I'm not familiar with an alternative way to define the mail exchanger except the MX record – Yuri G. May 20 '15 at 13:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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