Transfer site to another domain

Started by BrettUK, Aug 18, 2022, 10:53 AM

Previous topic - Next topic

BrettUKTopic starter

Hello there! I recently moved my WordPress website to a new domain on the same host. I followed the instructions carefully - I created a new database, updated the wp-config and robot.txt files with the new information, and redirected traffic from the old domain to the new one via the .htaccess file. However, after completing the transfer, it seems that something went wrong and it wasn't successful.

Whenever I try to access the site from the old domain, certain pages load while others do not, redirecting instead to the new domain. But, when I try to access the site from the new domain, everything is perfectly fine. I'm confused about why this is happening and where I went wrong in the process.

Lastly, I have a question: should I detach the old domain and only leave the new one attached to the site during the transition or should both domains be available? It would be great if you could give me some advice on this topic!
  •  

tevez

Here's an example of what you can try:

RewriteCond %{HTTP_HOST} ^meggido\.com$ [NC]
RewriteRule ^(.*)$ https://checkingsites.com/$1 [R=301,L]

To add this code to your site, insert it above the #BEGIN WordPress code, like this:

<IfModule mod_rewrite.c>
Rewrite Engine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^meggido\.com$ [NC]
RewriteRule ^(.*)$ https://checkingsites.com/$1 [R=301,L]
</IfModule>

It's best not to write anything between #BEGIN and #END. Just click "Save" in the "Settings". This will prevent anything from being erased unintentionally.
  •  

EJASNathan

To change your domain name, you will need to follow the instructions provided by your hosting provider. The process may vary between different web hosts, so it's important to find the specific instructions for your provider and follow them carefully.

If you're only changing your hosting provider and not making any other changes to your site (such as CMS or design), the process should be fairly straightforward. You'll need to copy and move your files and database to the new host as per the instructions provided.

Many hosting providers offer a free or low-cost service to transfer your site to their hosting, which can make the process much simpler.

Once you've moved the site, you'll need to set up 301 redirects from the old domain to the new one. This will ensure that visitors are automatically directed to the new domain and that search engines understand that your site has moved.

Make sure to set up redirects for all URLs, with and without "www." and for both http and https protocols. You'll also need to update your robots.txt file to reflect the new hostname.

In addition, you'll need to update your domain name in the settings of search engines such as Google. Each search engine has its own procedure for moving a site, so be sure to read and follow the instructions carefully.

Finally, I recommend keeping your old site up as a mirror to preserve your traffic. This can help ensure a smooth transition to the new domain.
  •