Change DNS Without Breaking HTTPS: Safe Steps
Why DNS changes break HTTPS
DNS decides which server visitors reach. If it points to a server without a certificate for your domain, browsers show a name mismatch or an untrusted warning. Because DNS is cached around the world, some visitors reach the new server while others still use the old one, so both need to work during the transition.
Change DNS without breaking HTTPS: the safe order
| Step | Action |
|---|---|
| 1 | Lower the TTL on the records to 300 seconds, at least a day before the move |
| 2 | Set up the site on the new server and test it using a hosts-file override |
| 3 | Install a certificate on the new server (see options below) |
| 4 | Switch the A and AAAA records to the new IP |
| 5 | Verify HTTPS from several networks and keep the old server alive for a few days |
| 6 | Raise the TTL back and decommission the old server |
Getting a certificate before DNS points there
Normal HTTP validation needs the domain to reach the new server, which is the problem. You have three practical options:
- Copy the existing certificate and key to the new server. This works, but transfer the key over a secure channel and verify the pair with the key matcher.
- Use DNS-01 validation, which proves control through a TXT record, with no traffic to the new server needed. See DNS-01 with Cloudflare.
- Issue after the switch, accepting a short window of errors. Not recommended for busy sites.
Test the new server first
Point your own machine at the new IP without touching public DNS. Add a line to your hosts file, or use curl:
curl -I --resolve example.com:443:203.0.113.10 https://example.com/
Check the certificate with openssl s_client -connect 203.0.113.10:443 -servername example.com. Replace the IP with your new server.
Traps that break HTTPS when DNS changes
- Forgotten AAAA record. IPv6 users will keep hitting the old server, or a broken one.
- CAA records. If you change certificate providers, update CAA so the new authority is allowed. Check with the CAA checker.
- Email records. Moving DNS hosts can drop MX, SPF and DKIM records. Check them with the SPF and DMARC checker.
- HSTS. If HSTS is on, browsers refuse HTTP fallbacks, so HTTPS must work on every server that might answer.
- CDN or proxy settings. Origin changes may need a new origin certificate. See the 526 guide.
- Changing nameservers means recreating every record at the new DNS host first.
Verify the result
Use the DNS lookup to confirm what each record resolves to, then run the SSL checker and the HTTPS redirect checker. Test from a different network or mobile connection too, since your own resolver may be cached.
Related reading: DNS validation errors and how DNS records affect issuance.
Frequently Asked Questions
How long does DNS propagation take?
It depends on the previous TTL and resolver caches. With a low TTL it is often minutes, but allow up to a day or two for stragglers.
Will my certificate stop working if I change DNS?
No, the certificate is tied to the domain name and key, not the IP. It only fails if the server answering does not have it.
Do I need a new certificate when I change hosts?
Not necessarily. You can move the existing one or issue a new one on the new host.
Why do some users see errors and others do not?
They are hitting different servers because of cached DNS. Make sure both are valid during the transition.
Do I need a new certificate when the IP changes?
No. A certificate is tied to names, not addresses. The new server just needs the certificate and key installed before the records move.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.