How to Move Your Website to a New Host Without Losing SEO
Moving a website to new hosting or a new server should be invisible to Google and to visitors. If the domain and URLs stay the same, Google treats it as a change of infrastructure, not a new site, and rankings carry on as before. Problems start when something is missed: a database that did not copy fully, a certificate that is not ready, redirect rules that only worked on the old server, a staging block left in robots.txt, or a slow new server that returns errors under load. This guide gives you a tested order for a hosting migration: what to inventory, how to copy files and the database, how to handle DNS and TTL, SSL, testing before cut-over, avoiding downtime, and how to check crawling and rankings after the move.
- What a hosting migration means for SEO
- What to move: the inventory
- DNS and TTL: how to avoid downtime
- Copying files and the database
- SSL and testing before cut-over
- Checking crawling and rankings after the move
- The fix, step by step
- Edge cases worth knowing
- Keeping the move safe afterwards
- Questions and answers
What a hosting migration means for SEO
There are two very different kinds of migration. A hosting migration moves the same site, on the same domain and the same URLs, to a different server. A site migration with URL changes changes the domain, the URL structure or the platform, and needs redirects and much more care. This guide covers the first. If your URLs are changing as well, read the migration audit guide and migration redirects too.
For a hosting move, Google's own advice is simple: set up the new server, copy everything, test it, switch DNS, and keep watching both servers until traffic has moved. You do not use the Change of Address tool in Search Console, because the domain has not changed. Google may crawl a little more slowly for a short time while it checks the new server can cope, then return to normal.
What can hurt you is not the move itself but what changes by accident:
| Risk | What Google sees | Likely effect |
|---|---|---|
| New server returns 5xx errors or times out | Server errors in Crawl stats | Crawling slows; pages can drop out if it lasts |
| robots.txt or noindex copied from staging | Blocked or excluded pages | Pages leave the index over days |
| SSL certificate missing or wrong name | HTTPS fetch failures | Crawl errors and browser warnings for visitors |
| Redirect rules not copied | Old URLs return 404 | Lost link value and traffic to those URLs |
| Slower server | Higher response times | Lower crawl rate, worse Core Web Vitals |
| Missing images or uploads | 404s on resources | Broken pages and lost image search traffic |
What to move: the inventory
Before you touch anything, list everything the site depends on. Missed items are the main cause of a migration going wrong.
| Item | Where to find it | Note |
|---|---|---|
| Website files | Document root, for example httpdocs or public_html | Include hidden files such as .htaccess and .well-known |
| Database | Your CMS config file, for example wp-config.php | Note the character set, usually utf8mb4 |
| DNS records | Your DNS provider or current host | A, AAAA, CNAME, MX, TXT (SPF, DKIM, DMARC, verification), CAA |
| Host control panel | Mailboxes only move if the host also runs your email | |
| Server config | Apache, nginx or Plesk settings | Redirects, security headers, caching, compression, HSTS |
| Software versions | Control panel or php -v | Match the PHP version and extensions on the new server |
| Scheduled tasks | crontab -l or panel | Backups, feeds, sitemap rebuilds |
| SSL certificate | Panel or /etc/letsencrypt | Plan how the new server will get one |
Save a crawl of the live site at the same time. A list of every URL and its status code is your baseline for checking the new server. The site crawler can export one.
DNS and TTL: how to avoid downtime
The switch happens when you change the A record (and AAAA record, for IPv6) for your domain to the new server's IP address. Resolvers around the world cache the old answer for the record's TTL, time to live, in seconds. If the TTL is 86400, some visitors and Googlebot may reach the old server for up to a day after the change.
Lower the TTL in advance. Set it to 300 seconds at least one full old TTL before the move, often 24 to 48 hours ahead, so the short value has spread everywhere by cut-over day. Check what is currently served:
# Current A record and its remaining TTL
dig example.com A +noall +answer
dig www.example.com A +noall +answer
# Which nameservers are authoritative
dig example.com NS +short
# Check from a public resolver after the change
dig @8.8.8.8 example.com A +short
dig @1.1.1.1 example.com AAAA +short
Because some visitors still reach the old server during the changeover, keep it running with the same content until its logs show traffic has stopped, usually a few days. That is what gives you zero downtime: both servers answer correctly while DNS settles.
If you use Cloudflare with the proxy on, visitors see Cloudflare's addresses, so changing the origin IP in the Cloudflare DNS panel takes effect almost at once and TTL waiting does not apply.
Copying files and the database
Copy server to server rather than downloading to your computer and uploading again; it is faster and keeps permissions intact. From the new server, pull the files over SSH:
# Files, including hidden files, preserving permissions and times
rsync -avz --progress \
olduser@198.51.100.10:/var/www/vhosts/example.com/httpdocs/ \
/var/www/vhosts/example.com/httpdocs/
# Database export on the old server, consistent snapshot for InnoDB
mysqldump --single-transaction --default-character-set=utf8mb4 \
-u dbuser -p example_db | gzip > example_db.sql.gz
# Import on the new server
gunzip < example_db.sql.gz | mysql -u dbuser -p example_db
Update the database name, user, password and host in the site's configuration file on the new server. The domain is unchanged, so you should not need to search and replace URLs in the database.
For a shop or a site that takes bookings, orders keep arriving while you work. Either put the site into maintenance mode for the final copy, or run the database export again just before cut-over so nothing placed in the meantime is lost.
Plesk to Plesk
The free Plesk Migrator extension on the new server can copy subscriptions, including files, databases, mailboxes and many settings, from the old server. Check the migration report afterwards for warnings, and compare redirect and header settings by hand. See redirects in Plesk.
WordPress
The steps above work for WordPress. If you prefer a plugin, use one that moves the database and uploads together, and then check permalinks are still working. More detail is in the WordPress migration guide.
SSL and testing before cut-over
The new server must serve a valid certificate for every hostname, including www, from the first second it receives traffic. You have three options:
- Copy the existing certificate and key to the new server. It works immediately and you can renew there later.
- Issue a new certificate with a DNS challenge, which does not need the domain to point at the new server yet.
- Issue a Let's Encrypt certificate with the normal HTTP challenge right after cut-over. Simple, but there is a short window with a certificate error, so it is the least safe choice.
Then test the new server as if DNS had already moved. curl --resolve sends a request to a chosen IP while using your real hostname, so the certificate and virtual host are tested properly:
NEW=203.0.113.20
for u in / /contact/ /robots.txt /sitemap.xml /old-page/; do
curl -s -o /dev/null -w "%{http_code} %{time_starttransfer}s $u\n" \
--resolve example.com:443:$NEW "https://example.com$u"
done
# Check the certificate name and expiry on the new server
curl -vI --resolve example.com:443:$NEW https://example.com/ 2>&1 | grep -E "subject:|expire date:"
To browse it yourself, add a line such as 203.0.113.20 example.com www.example.com to your computer's hosts file, then remove it after the test. Click through key pages, submit a form, check images, and compare your saved crawl against the new server. Make sure robots.txt is the live version, not a staging file with Disallow: /.
If certificates give you trouble, see SSL cannot be issued and SSL not working.
Checking crawling and rankings after the move
Do not assume Google has moved with you; check the new server's own access logs. Googlebot requests appearing there confirm it is reaching the new host:
# Plesk log path; adjust for your server
grep -i "googlebot" /var/www/vhosts/system/example.com/logs/access_ssl_log | tail -20
# Status codes Googlebot received today
grep -i "googlebot" /var/www/vhosts/system/example.com/logs/access_ssl_log \
| awk '{print $9}' | sort | uniq -c | sort -rn
# Confirm an IP really is Googlebot
host 66.249.66.1
A genuine Googlebot address resolves to a name ending in googlebot.com or google.com. In Search Console, open Settings then Crawl stats, which shows requests per day, average response time and host status, including problems fetching robots.txt and server connectivity. Expect a short dip or wobble in crawl requests, then a return to normal. Watch the Pages report for new errors and the Performance report for clicks over the following two to four weeks. If you see server errors, the 5xx server error guide explains what to look for.
The fix, step by step
Step 1
Take an inventory and a baseline crawl
List every file location, database, DNS record, mailbox, cron job, server rule and software version the site uses, and export the DNS zone as text. Crawl the live site and save the list of URLs with their status codes and response times. Note your normal crawl requests and response time from Search Console Crawl stats. This record is what you will compare the new server against, so keep it somewhere you can find quickly.
Step 2
Lower the DNS TTL in advance
At least one full current TTL before the move, usually 24 to 48 hours ahead, change the TTL on the A, AAAA and www records to 300 seconds. Run dig example.com A +noall +answer against a public resolver to confirm the new value is being served. A short TTL means that when you switch, visitors and Googlebot move to the new server within minutes rather than over a whole day.
Step 3
Prepare the new server
Create the site on the new server with the same PHP version and extensions, database engine and character set. Recreate server rules: redirects, security headers, compression, caching and any .htaccess logic, converting it to nginx config if the web server changes. Add scheduled tasks and email accounts if the host runs your email. Check php -v and the panel settings against your inventory before copying anything.
Step 4
Copy the files and database
From the new server, pull the files with rsync -avz over SSH so hidden files and permissions come across, and export the database with mysqldump --single-transaction, then import it. Update the database settings in the configuration file. Compare file counts and database table counts between old and new. For a shop, plan a final database copy or a short maintenance window so orders placed during the move are not lost.
Step 5
Install SSL on the new server
Copy the current certificate and private key to the new server, or issue a new one using a DNS challenge, so HTTPS works before any traffic arrives. Make sure it covers both the bare domain and www. Check with curl -vI --resolve against the new IP that the certificate subject and expiry date are correct. Avoid relying on issuing a certificate after cut-over, which leaves a window of browser warnings.
Step 6
Test before cut-over
Use curl --resolve or a temporary hosts file entry to load the site from the new server under its real domain. Check key pages, forms, images, login, checkout, redirects from old URLs, robots.txt and the sitemap. Make sure no staging noindex or Disallow rule has been copied. Compare status codes for your saved URL list with the baseline crawl, and fix every difference before changing DNS.
Step 7
Switch DNS and keep both servers running
Update the A record and, if present, the AAAA record to the new server's addresses, or change the origin IP in Cloudflare if you proxy through it. Leave the old server online with identical content. Check public resolvers with dig @8.8.8.8 and dig @1.1.1.1 until both return the new address. Watch the old server's access log; once only stray requests remain, usually after a few days, the move is complete.
Step 8
Confirm Googlebot is crawling the new server
Search the new server's access log for Googlebot and count the status codes it receives, verifying a sample of addresses with host. In Search Console, watch Crawl stats for host status problems, server errors and response time, and the Pages report for new exclusions. A short dip in crawling is normal. Check clicks in the Performance report weekly for a month, and investigate any page group that drops.
Step 9
Tidy up and cancel the old host
When the old server has had no real traffic for at least a week, take a final backup and cancel it, after making sure MX records no longer point there. Reset the DNS TTL to a normal value such as 3600 seconds. Confirm backups, certificate renewal and uptime monitoring are running on the new server. Run a fresh crawl and compare it with your baseline to make sure nothing has changed.
Edge cases worth knowing
- Apache to nginx. nginx ignores
.htaccess. Every redirect, rewrite and header in those files has to be rewritten as nginx config, or old URLs will start returning 404. - Email on the old host. If MX records point at the old host, cancelling that account stops email. Move mailboxes first, or point MX at your email provider before cancelling.
- Hard-coded IP addresses. Firewalls, payment callbacks, API allow-lists and CDN origin settings sometimes name the old IP. Update them before cut-over.
- HSTS. If the old server sent HSTS, browsers will refuse plain HTTP and certificate errors on the new server. Have SSL ready first; see HSTS on an HTTPS server.
- Slower response times. A cheaper server that answers in 1.5 seconds instead of 300 ms can slow crawling and Core Web Vitals. Compare time to first byte before and after; see fixing high TTFB.
Keeping the move safe afterwards
Keep the old server for at least a week after its logs go quiet, with a final backup taken before you cancel. Put the TTL back to a normal value, such as 3600 seconds, once you are happy. Set up backups, certificate renewal and uptime monitoring on the new server on day one, not later. Run a full crawl again after a week and compare status codes with your baseline, and keep an eye on Crawl stats for a month. A migration audit is a quick way to confirm nothing changed that should not have.
1. Will changing web hosting affect my SEO?
Changing hosting does not hurt SEO by itself if the domain, URLs and content stay the same. Google sees the same pages at the same addresses and may simply crawl a little more cautiously for a short time while it learns the new server's capacity. Rankings drop only when something changes by accident, such as server errors, a staging block in robots.txt, missing redirects, missing files or a much slower server. Testing the new server before switching DNS prevents nearly all of these.
2. Do I need to tell Google I have changed hosting?
No, you do not need to tell Google about a hosting change. The Change of Address tool in Search Console is only for moving to a different domain. When you update DNS, Googlebot follows the new address like any visitor. Your Search Console property stays verified as long as the verification method still works, for example a DNS TXT record or an HTML file you copied to the new server. Check Crawl stats afterwards to confirm Google is reaching the new host without errors.
3. How do I move my website to a new host without downtime?
You avoid downtime by running both servers at once while DNS changes spread. Lower the DNS TTL to about 300 seconds a day or two before, copy the site to the new server, test it under your real domain with curl or a hosts file entry, and only then change the A and AAAA records. Keep the old server serving the same content until its logs show traffic has stopped. For shops, plan a final database sync so no orders are lost.
4. How long does DNS take to update after a hosting migration?
DNS changes reach most visitors within the TTL of the old record, so with a TTL lowered to 300 seconds most traffic moves within minutes. If you did not lower it and the TTL was a day, some resolvers can keep the old address for up to 24 hours. A few resolvers ignore short TTLs and take longer. The phrase 48 hours for propagation is a cautious rule of thumb. Check with public resolvers, and keep the old server running until its logs go quiet.
5. What kind of server or hosting is best for a website migration?
The best hosting for a migration is one that matches or improves on what your site already needs: the same PHP and database versions, enough memory for peak traffic, SSH access for server-to-server copying, and a control panel or migration tool you are comfortable with. Many hosts offer free migration, which is fine, but still test before switching DNS yourself. Check the new server's time to first byte; a faster server helps crawling and Core Web Vitals, a slower one can hurt both.
6. Should I change my site design or URLs at the same time as hosting?
No, it is safer to change one thing at a time. If you move hosting, change URLs and redesign the site at once, and traffic falls, you cannot tell which change caused it, and the problems compound. Move hosting first, confirm crawling and traffic are stable for a few weeks, then make the other changes with their own testing and redirects. The only exception is when a platform change forces new hosting, in which case follow a full migration plan.
7. How do I check Google is crawling my new server?
Check the new server's access logs for requests from Googlebot, and verify a few of the IP addresses with a reverse DNS lookup that ends in googlebot.com or google.com. Look at the status codes those requests received: mostly 200 and 304 is healthy, while 5xx responses mean the server is struggling. In Search Console, the Crawl stats report under Settings shows requests per day, response time and host status. URL Inspection with a live test on key pages also confirms Google can fetch them.
The migration audit compares your pages before and after the move, flagging status code changes, missing redirects, lost indexability signals and slower responses, so problems are caught before Google finds them.
Open Migration Audit Fixes โ