Migrating your website to new hosting without losing rankings
Migration itself does not hurt rankings. Downtime, lost redirects and an indexable staging copy do.
Preparation
Take a full copy first: files, database, server configuration, cron jobs, environment variables, certificates. Export a list of every URL for later verification.
Lower DNS TTL a day in advance so the switch propagates in minutes rather than a day.
Move and verify
Deploy on the new server and test via a technical domain or a local hosts override, without touching DNS. Check pages, forms, email and background jobs.
Block the staging copy from indexing at server level, not just in robots.txt — an indexed duplicate on a technical domain is a real cause of post-migration traffic loss.
After the switch
Re-check every URL returns 200, verify canonicals, redirects, sitemap and robots.txt, then resubmit the sitemap in Search Console.
For two weeks watch crawl errors and organic clicks. A spike in errors or a drop in impressions means something did not make the trip.