Solved | Old domain not redirecting to new domain after WordPress domain transfer and search console google not displaying results

Solved | Old domain not redirecting to new domain after WordPress domain transfer and search console google not displaying results

Warning : Do not use redirects to solve the issue in cPanel.

#1

If your website is not indexing after domain transfer in google search results  the first step you need to take is to add your new domain name example.io as your property in search console. The search console should be same as old domain example.com search console. Then you have to select change of address in settings section of google search console.

In case there is a difference in search console visit the old search console and select change address in settings and point it to new domain example.io.

#2

Remove old sitemap in old domain example.com and add new domain example.io sitemap in the property section of new domain search console.

#3 You have to wait for 1 week to fully propagate crawling and google to show results. You have to use sitesearch method to find whether your domain is indexed. Enter the following sample text in google search after substituting it with your domain name.

site:example.io

#4 Even after doing all of the above methods still your website may show only old website links in google search results. Do not worry about that, as it will change eventually. But the  real problem is that the old domain will be displayed once a visitor enters your website.

For example even after domain change a blog post in your wordpress website will still show

example.com/post/world instead of showing example.io/post/world

#5 In the above situation the redirects will not help. It may help in one link. Even if redirect option in cPanel is used it will still be showing example.com/post/world.

So instead of cPanel redirect menu add the following code in cPanel>FileManager>Public HTML>htaccess>Edit File

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com [NC,OR]

RewriteCond %{HTTP_HOST} ^example.com [NC]

RewriteRule ^(.*)$ https://example.io/$1 [L,R=301,NC]

Use old domain instead of example.com

Use new domain instead of example.io

Most important part of this step is to add this code in the top section of the document. If it is added at lower section redirection will not work.

#6 Now all links including WordPress Pages, Posts, Categories, Media, Tags will automatically redirect to the exact link in new domain name.

For example

example.com/post/123 will redirect correctly to example.io/post/123

#7

After the above step is completed google will start displaying results slowly. All links will not be shown altogether. Indexing of links is one by one and it will takes days or weeks to complete the process.

HostArmada - Affordable Cloud SSD Web Hosting

We will be happy to hear your thoughts

Leave a reply

Teczpert
Logo
Enable registration in settings - general
Ninja Silhouette 9 hours ago

Joe Doe in London, England purchased a

Joe Doe in London?

Joe Doe in London, England purchased a

Joe Doe in London?

Joe Doe in London, England purchased a

Joe Doe in London?

Joe Doe in London, England purchased a

Shopping cart