Help for owners
My site is down or broken after I changed hosting provider
Short answer
After a move the usual culprits are DNS still pointing at the old server, a database or files that did not come across, a missing certificate, or settings that differed on the new host. Do not cancel the old hosting yet; it is your fallback and safest copy.
Does this sound like your situation?
- The site shows an error, a blank page or an old version.
- Some visitors see the new site and some the old one.
- Images, forms or logins are broken after the move.
- Email stopped working after the domain changed.
Why does this happen?
DNS changes take time to spread
DNS resolvers keep a record in memory for its TTL. Amazon explains that a longer TTL means changes to a record, such as a new IP address, take longer to take effect, and recommends a shorter value first when you change a record in use.
Confirmed by docs.aws.amazon.com
Part of the site did not move
The code may be there while the database, uploaded files or scheduled jobs stayed on the old host.
Technical detail: Laravel or PHP cannot connect to MySQL: [2002] Connection refused
The new server is set up differently
Different versions, a different web server or missing modules can break a site that worked on the old host.
Technical detail: nginx 502 Bad Gateway in front of a Node.js app
Certificates and email were not moved
The HTTPS certificate is issued for a server, and email usually has its own records at the domain.
Technical detail: A Let's Encrypt certificate did not renew with Certbot
What can I do about it today?
- Do not cancel the old hostingKeep the old account running until the new site is fully proven. It holds the most recent copy of everything.
- Write down what changed and whenDomain settings, nameservers, records, host login. A dated list saves hours.
- Test from different placesOpen the site on mobile data, on another computer, and ask someone in another town. Different answers point to DNS.
- Do not change DNS records again and againEach change restarts the waiting time. Make a plan first.
- Export a backup from both sidesAsk each host for a backup of the files and the database. Keep both somewhere you control.
When should I bring someone in?
- Customers cannot buy or book.
- Old and new servers both hold changes and nobody knows which is newer.
- Email has stopped working.
How do I handle it?
- Compare old and newI list every part of the old setup: files, database, jobs, certificate, email records, and check each exists on the new host.
- Fix DNS the safe wayI check the records and the TTL, and I change them only once, with a plan.
- Rebuild what is missingI bring across any missing data from the old host, and install the missing server parts.
- Test the whole journeyI check the site, forms, login, payments and email from outside, then tell you when it is safe to close the old account.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
How long until everyone sees the new site?
It depends on the TTL of the old records, which is set by whoever created them. Amazon notes a longer TTL delays the effect of changes.
Can I go back to the old host?
Often yes, if it was not cancelled and the data there is complete. That is why I advise keeping it.
Did I lose my emails?
Not necessarily. Mail depends on separate DNS records, which I check.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:A Let's Encrypt certificate did not renew with CertbotMixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure script 'http://example.com/app.js'. This request has been blocked; the content must be served over HTTPS.An HTTPS page is blocked from loading an insecure http:// resource502 Bad Gatewaynginx 502 Bad Gateway in front of a Node.js appSQLSTATE[HY000] [2002] Connection refusedLaravel or PHP cannot connect to MySQL: [2002] Connection refused