75 guides published Start a blog Fix my site How we test
HOSTING & SPEED

Migrate to New Hosting Without Losing a Single Ranking

We may earn a commission if you buy through our links. It does not change what we recommend or what you pay. How this works.

A host migration does not usually hurt rankings. A badly sequenced one does, and the damage comes from avoidable things: a staging site getting indexed, a TTL that was never lowered, or an SSL certificate issued after the DNS switch rather than before.

The short version

  • Lower DNS TTL 48 hours before you touch anything.
  • Install and verify SSL on the new host before switching DNS.
  • Block indexing on the new server until it is live.
  • Keep the old host running for a week after the switch.

Two days before

  1. Lower the DNS TTL on your A record to 300 seconds. This is the step people skip and then wait a day for propagation.
  2. Take a full backup from the old host and download it.
  3. Record the current PHP version, extensions and any custom server configuration.
  4. Export a crawl of the live site — every URL and its status code. This is your comparison baseline.
  5. Note current rankings and traffic so you can distinguish a migration problem from normal variation.

Build on the new host

1. Set up the site on the new server

Matching PHP version and extensions. Access it by IP or a temporary hostname.

2. Block indexing

HTTP authentication at the server level is better than robots.txt, because it cannot be ignored.

3. Install SSL for the real domain now

Most providers allow issuance before DNS points at them, via DNS validation. Doing this first avoids an insecure window after the switch.

4. Test thoroughly

Home, posts, archives, search, forms, login, checkout. Compare against your crawl.

5. Compare performance

If the new host is slower, you want to know before the switch, not after.

Watch out

A staging or pre-launch copy that gets indexed creates duplicate content against your live site and can take weeks to clear. Use HTTP authentication, not a noindex tag.

The switch

  1. Put the old site into maintenance mode, or accept a short period where new content could land on the old server.
  2. Take a final database export from the old host.
  3. Import it on the new host.
  4. Change the A record to the new IP.
  5. Watch both servers’ access logs. You will see traffic shift over as caches expire.
  6. Remove the HTTP authentication on the new server.
  7. Verify HTTPS resolves with no mixed-content warnings.

Immediately after

  • Re-crawl the site and compare against the baseline. Every URL should return the same status code it did before.
  • Check Search Console for new coverage errors.
  • Confirm the sitemap is reachable and current.
  • Test a form end to end, including the email actually arriving — outgoing mail configuration is the most commonly forgotten item.
  • Confirm cron is running, which on a new host often needs configuring.

Keep the old host for a week

DNS propagation is not instant, and some resolvers hold records longer than the TTL instructs. Leaving the old server running and serving correctly means late visitors see a working site rather than an error.

Raise the TTL back

Once traffic has fully shifted, raise the TTL back to its normal value. A permanently low TTL means more DNS lookups than necessary.

Common questions

Will rankings drop during migration?

They should not, if URLs and status codes are unchanged. Most reported drops trace to an indexed staging copy or an SSL gap.

How long does the whole thing take?

For a small site, two hours of work spread over three days, most of it waiting.

Should I change the domain at the same time?

No. A host change and a domain change are two separate migrations. Doing both at once makes diagnosing any problem much harder.

S

Sumit

Writes everything on TechMozz.

More in Hosting & Speed