John Mueller, a Googler who works on the Search team answered a query about a WordPress website that had been completely removed from Google Search when it switched to another web hosting provider. Mueller’s response shows how to investigate the causes of this.
After a site migration, some sites are dropped from the index
The Google Office Hours Podcast received a question from a listener who said that after switching from WordPress to self-publishing, their website disappeared from search engine result pages.
This question could mean they hosted their website on WordPress.com and migrated it to another host. Self-hosting is usually referred to.
It is relatively easy to migrate a WordPress website from one web host to another, but there are many potential pitfalls.
Later, I’ll talk about migrating your WordPress website because this is relevant to your question.
John Mueller answers the Question
Mueller responded to the question by analyzing the site itself. This is the most appropriate place to begin in this case. This is because it implies that you can still reach the website online.
Here is the answer:
The index disappeared after the site switched from WordPress to Self-Publishing. Search results return a ‘0’.”
John Mueller replied:
If your site dropped off the results of searches and was no longer indexed, around the same time that you migrated, my best guess would be that the new website has blocked search engines or, at the very least, Google. “I’d begin by looking at the Search Console data and then work forward.”
The search console can show you the date and reason for the pages to drop out of Google index. The pages may not be found (404), or Google could have been blocked by robots.txt. These are good starting points to identify what is happening at Google.
Check if WordPress is blocking Google
The problem occurs when the robots.txt file is used to block search engines indexing a WordPress website.
Google Search Console can tell you if this happens by showing a page indexing report that shows the robots.txt file blocking the website in the “Why Pages Aren’t Indexed” column.
If that’s the case then you can actually see this to be the case in your robots.txt file typically located in the root of your domain, /robots.txt (example.com/robots.txt).
It is possible that a WordPress option was used to prevent search indexing at some stage during the migration.
Here’s a native WordPress setting:
Settings 🡪 Reading. You’ll see a “Search Engine Visibility”, with the checkbox Discourage search engine indexing of this site.