Can I change web hosting without changing my domain?
Last updated: 26 August 2026 · Reviewed: 26 August 2026 · By: Alston Antony
Yes, the domain and the hosting are independent products connected only by DNS records, and switching hosts means updating one A record or one pair of nameservers, not touching the domain at all. Done correctly with a lowered DNS TTL, the switch produces zero visitor-visible downtime because both servers answer during the propagation window. The domain stays at its registrar, the site's files and database move to the new host, DNS points at the new IP, and the old host runs a few more days as a safety net.
What actually changes when you switch hosts
Two things change and everything else stays put. First, the physical location of the site's files moves from the old host's server to the new host's server. Second, one DNS record on the domain (either an A record pointing to an IP, or two nameserver records pointing to a name) updates so browsers get sent to the new IP. What does not change: the domain name itself, the registrar it lives at, the WHOIS record, the SSL certificate (Let's Encrypt reissues automatically on the new host), incoming links, Google Search Console verification for the property (DNS verification survives if you keep the TXT record). If email is on the old host, its MX record also needs to move, otherwise mail keeps arriving at the old server.
DNS TTL and propagation, in plain numbers
TTL (time to live) is the number of seconds every resolver on the internet caches a DNS record before asking again. Most registrars ship a default TTL of 3600 seconds (one hour) or 86400 seconds (one day). Lower it to 300 seconds at least 48 hours before the switch and every resolver that has already cached the old record will refresh within five minutes of expiry, instead of hours. Global propagation is bounded by the highest TTL previously served plus a small resolver-refresh window, so a domain with TTL 86400 that switches without lowering first can see stragglers still hitting the old IP a full day later.
The zero-downtime switch playbook
- Lower the domain's TTL to 300 seconds at the current DNS provider. Wait 48 hours for the old TTL to expire everywhere.
- Provision the new host and copy files, database and email accounts across. Match the PHP and MySQL versions of the old host to avoid version drift.
- Test the migrated site at the new host's temporary URL, or by editing the local hosts file to preview the new IP.
- Recreate the SSL certificate on the new host (Let's Encrypt through cPanel AutoSSL runs on the next scheduled pass).
- Update the A record (or nameservers) at the domain's DNS provider to point at the new host's IP. If nameservers are switching, recreate the MX record and any TXT records (SPF, DKIM, DMARC) on the new nameserver first.
- Watch DNSChecker or
digfrom a Sri Lankan resolver to confirm the propagation window closes within an hour. - Keep the old host paid for 72 hours after the switch as insurance. Cancel it once analytics, forms and email confirm the new host is answering everything.
The four failures that break a switch (and how to avoid each)
Four issues account for most broken hosting switches on Sri Lankan sites. First, forgetting to lower TTL, so old traffic sticks to the dead server. Second, switching nameservers without recreating MX and mail stops flowing. Third, hard-coded WordPress URLs pointing at the old host IP inside the database (fix with the Better Search Replace plugin before the DNS change). Fourth, missing SPF and DKIM TXT records after the nameserver switch, so outgoing mail from the new server hits spam folders. All four are fixed by a pre-migration checklist. None are reasons to keep paying an expensive host.
Frequently asked questions
Will my website go down when I switch hosts?
Not if you keep the old host running for 48 to 72 hours after the DNS change and lower the TTL to 300 seconds two days before the switch. Visitors from any resolver still holding the old IP see the site load normally from the old server until their cache expires.
How long does DNS propagation actually take?
Most ISP resolvers refresh inside 1 to 4 hours once TTL was lowered ahead of time. Global propagation to every corner of the internet takes up to 48 hours, but for a Sri Lankan audience on SLT-Mobitel and Dialog, expect the switch to be effectively complete within an afternoon.
Do I have to switch nameservers or can I use A records?
Either works. Nameserver switching hands DNS control to the new host and is simplest for a full move. Editing A and MX records at the current DNS provider keeps mail and other services untouched, which matters if the old host runs your email and you are not moving that yet.
What happens to email during a hosting switch?
Email routes by the domain's MX record, so if MX still points to the old host, mail stays at the old host after the site moves. Break email if you cut nameservers over to the new host without recreating the MX records first. The safe move is to migrate mail before the web, or to migrate the site by A record only.
Sources & references
- ICANN - DNS TTL and caching — TTL controls how long resolvers cache a record (checked 26 Aug 2026)
- Cloudflare - what is DNS propagation — How resolver caches invalidate (checked 26 Aug 2026)
- LK Domain Registry - nameserver update — How to change NS on a .lk record (checked 26 Aug 2026)