Change Host for Website but keep emails to the old server

Hello!

I recently decided to move from a hosting company to a better one. I want to ask what changes do i have to make to the DNS Dashboard of Cloudflare in order to change the website hosting to the new hosting but keep all the emails to the old hosting. Do i have to change only the “A records” and keep the other records as it is?

Thanks in advance for any help

What is the domain?
What does your MX record point to?
Is the target of the MX record a hostname that is :grey:?
Is the target of the MX record a hostname that is used for your website as well?

In a recommended setup, you will have an MX record pointing to a hostname which is :grey:, and that hostname points to the IP for your email server.

If your MX record actually points to your webserver, or is pointing to a DNS entry that is :orange: you might need to make some changes to ensure a smooth transition.

This is the configuration of my Cloudflare DNS that pointing the old hosting. What should i change to keep the email server the same but change the website server?

Just the record for the domain root, which is the record at the very top.

The SPF uses +mx so that will not change.

You should probably also set the ftp record to :grey:, as FTP will not work through Cloudflare (in almost every setup)

And a few slightly related items:

  1. It looks like you are using SendGrid for email also, but your SPF record does not include them. Check their docs if that is the case.
  2. Consider creating a DMARC record.
  3. The certificate on your email server does not contain the mail hostname.

Thank you very much for your help! I really appreciate it. I will try these and i will come back later!

Hello i changed the host from a local hosting to Siteground but the wesbite is not appearing correctly. It seems broken and i don’t know the reason. From siteground they say that it appears correctly and propably is a Cloudflare setting that cause the problem. I disabled every optimisation i could but the problem remains.

I activated SSL from Hosting and Cloudflare

I disable CSS & JS Minification from Cloudflare

I purged every cache in site, browser and Cloudflare

What may it be the problem?

I don’t see the site requesting any CSS files. That’s pretty strange. I suggest you use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com. The link is in the lower right corner of that page. Give it five minutes to take effect, then make sure site is working as expected with HTTPS. Only then should you un-pause Cloudflare and double-check your SSL/TLS setting to make sure it’s Full (Strict).

In case that this not work is there any chance to disable only the website but keep the mail configuration as it is? Should i change the nameservers from the doamin panel?

This doesn’t disable the domain. It just sends all traffic directly to the servers for your domain. Your mail system should already be going direct, so this won’t change that functionality.

Changing name servers won’t help you fix anything here, and isn’t recommended unless you plan on no longer using Cloudflare.

I Pause Cloudflare on Site i cleared all cache but the problem stays. Is there anything i can do?

If the site is paused, and it still doesn’t work, you will have to work with your host to make sure your site functions properly before you un-pause Cloudflare.

I finally found the error. It was the minify JS & CSS i had on my website. I used old plugin which i deactivated. After i activated the Siteground Minification worked again. Should i activate the CSS & JS Minification on Cloudflare too or it might be a conflict?

1 Like

I use CSS and JS minification here. At least if it doesn’t work, it’d be quick and easy to deactivate.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.