When you move your website to new hosting, or move the management of your domain to another provider, you need to change your DNS settings. Without a plan, your website can go offline or you can lose email for hours. This guide shows a safe migration step by step.
Change nameservers or change the A record? #
- Changing nameservers: moves the management of all domain records to the new provider. Best when you move both website and email to new hosting.
- Changing only the A record: DNS stays with your current provider (for example Cloudflare) and only the IP address of your website changes. Faster and less risky if you only move the website.
To understand record types, see DNS records explained.
Steps to move DNS without downtime #
1. Lower the TTL in advance: 24 to 48 hours before the move, set the TTL of your records to a small value such as 300 seconds (5 minutes) at your current provider, so changes spread quickly on migration day.
2. Copy all records: export or copy every current DNS record: A and CNAME records, MX records for email, and TXT records (such as SPF, DKIM and Google verification records). Any record you forget can stop the service that depends on it.
3. Prepare the new hosting first: move your website files and database, create the same email accounts, and make sure the site works on the new hosting before you change DNS, while keeping the old hosting running.
4. Change the nameservers: at your domain registrar, enter the new nameservers (you will find them in your hosting welcome email or in the client area). See how to change nameservers.
5. Wait for propagation and monitor it: propagation usually takes one to 24 hours and can take up to 48. You can follow it on DNS checker sites such as dnschecker.org or whatsmydns.net.
6. Check your site and email: after propagation, open your website and send and receive a test email. Check the old hosting for any messages that arrived there during propagation and move them.
7. Cancel the old hosting after confirming: wait two or three days after propagation, then cancel the old hosting and set the TTL back to its normal value.
Note for Saudi domains #
Nameserver changes for .sa, .com.sa and .السعودية domains are made through the domain’s registrar and may take a little longer than global domains. If your domain is registered with Hyyat Host, contact support and we will do it for you.
Frequently asked questions #
How long does a nameserver change take to propagate? #
Usually one to 24 hours, and sometimes up to 48 hours, depending on TTL settings and internet providers. During this time some visitors may see the old hosting and some the new one, so do not cancel the old hosting too early.
Will my email stop while moving DNS? #
No, as long as you copy the MX records correctly and create the same email accounts on the new hosting before changing the nameservers. After propagation, check the old hosting and move any messages that arrived there.
What is the difference between changing nameservers and changing the A record? #
Changing nameservers moves the management of all your domain’s records to a new provider. Changing the A record keeps DNS with your current provider and only changes the address your website points to. Changing the A record is faster and less risky if you only move the website.