How to Point Your Domain to a New Server (Without Downtime)
DavaoWeb Team
Author
Switching servers is one of those tasks that sounds simple but has a few landmines hidden in it. Done right, your visitors will never notice. Done wrong, you're staring at a "site not found" error for hours while your customers wonder what happened.
Here's how to do it right.
Step 1: Lower Your TTL Before You Start
TTL — Time To Live — tells DNS resolvers around the world how long to cache your records. The default is often 3,600 seconds (one hour) or higher. Before you touch anything else, log in to your domain registrar and lower your TTL to 300 seconds (five minutes).
Do this at least 24 hours before your planned migration. That way, when you finally flip the DNS switch, the old cached records expire quickly and the new ones propagate fast.
Step 2: Set Up and Test Your New Server First
Never cut over DNS before your site is fully working on the new server. Set up your files, database, and SSL certificate on the new host first. Use your /etc/hosts file to preview the new server locally before any DNS changes:
# Add this to /etc/hosts temporarily (replace with your new server IP)
123.456.789.000 yourdomain.com
Browse your site normally — you're now hitting the new server while the rest of the world still sees the old one.
Step 3: Update Your DNS Records
Once you're happy everything works on the new server, it's time to update DNS. The records you'll typically need to change:
| Record | Type | Value |
|---|---|---|
@ |
A | Your new server IP |
www |
A | Your new server IP |
mail |
A | Your mail server IP (if separate) |
Log in to wherever your nameservers are managed — usually your domain registrar — and update the A records. Do not change your MX records unless you are also migrating email.
Step 4: Verify Propagation
Use a tool like DNS Checker to watch propagation progress across the globe. With a 300-second TTL, most regions should show the new IP within 10–15 minutes.
Step 5: Remove the Hosts File Entry
Once DNS has fully propagated, remove the entry you added to /etc/hosts. You should now be loading the new server through normal DNS resolution.
Keep the Old Server Running for 48 Hours
Even after propagation looks complete, keep your old server active for at least 48 hours. Some ISPs and corporate networks cache DNS aggressively regardless of TTL. If something goes wrong, you can always point DNS back and troubleshoot.
Once you're confident everything is stable, decommission the old server and don't forget to restore your TTL to a higher value (3,600 seconds is fine for most sites).
DavaoWeb Team
The DavaoWeb Hosting team writes about web hosting, servers, and everything it takes to keep your business online.