Ultimate Guide: Fix WordPress Redirects to Old Domain After Migration

Want to fix WordPress redirecting to old domain after migrations? Here are proven methods to fix the issue based on our 16 years of WordPress experience.

When migrating a WordPress website to a new domain, users may encounter issues where they are redirected back to the old domain. This is a common challenge faced by many WordPress users post-migration.

We have successfully resolved this issue in the past using various methods. For example, updating the site address in the WordPress settings can often fix the redirection problem. Additionally, modifying the URL in the database and clearing your DNS cache may also help.

In this article, we will guide you through the process of fixing WordPress redirects to an old domain after migration.

What Causes the Redirection to the Old Domain After Migration?

When relocating your WordPress website to a new domain, it is crucial to configure redirection properly. This ensures that users are automatically directed to the new site, helping you maintain your keyword rankings and traffic.

However, if the redirection to the new domain is not set up correctly, visitors may still be sent back to the old domain.

A primary reason for this issue is the discrepancy between the site URL and home URL values in the WordPress database. It’s essential to ensure that both values point to your new domain.

Additionally, DNS problems can lead users to be redirected to the old domain after migration. If the DNS server is unresponsive or if the DNS records have not been updated, your visitors will be unable to access your new website URL.

Now, let’s explore how to resolve the issue of WordPress redirecting to the old domain after migration. We will discuss various methods, and you can click the links below to navigate directly to your preferred section.

  • Method 1: Update the Site Address in WordPress Settings
  • Method 2: Change the Site URL in the WordPress Database
  • Method 3: Clear the DNS Cache on Your Computer
  • Pro Tip: Utilize an SEO Plugin for Comprehensive Site Redirection
  • Additional Resources for Website Migration

Method 1: Update the Site Address in WordPress Settings

The simplest way to resolve this issue is to ensure that both the WordPress address and site address are identical in your WordPress settings.

If your Site Address (URL) still displays the old domain, users will continue to be redirected to the previous URL after migration.

To resolve this, navigate to Settings » General in your WordPress admin panel. Then, enter your new domain in the ‘Site Address (URL)’ field.

After saving your changes, visit the new domain to check if the issue has been resolved.

If the URL fields are disabled and you cannot enter a new address, continue reading to discover alternative methods for redirecting your domain.

Method 2: Updating Site URL in the WordPress Database

Another way to resolve the issue of redirecting to the old domain is by modifying the site URL in the WordPress database tables.

You can easily access the database through the cPanel provided by your WordPress hosting service.

In this tutorial, we will use Bluehost as an example, but the steps are similar for other hosting providers such as Hostinger, SiteGround, and others.

First, log in to your hosting service control panel. Then, navigate to the Websites tab in the left menu. Click on the ‘Settings’ option for your website.

Next, you will see your website’s details and various settings.

Scroll down to the Quick Links section and click on the ‘phpMyAdmin’ option.

Wait a few seconds for phpMyAdmin to load.

Once it opens, navigate to the wp_options table in the left navigation panel.

Keep in mind that different hosting providers use various naming conventions for their database tables. However, the table you need will always end with ‘_options.’

For instance, in this guide, we will select the ‘staging_45f_options’ table in Bluehost’s phpMyAdmin.

Next, you will need to modify the ‘siteurl’ and ‘home’ options.

First, click the ‘Edit’ button next to the ‘siteurl’ option.

Then, enter the new domain name in the option_value field. Once you’ve done that, simply click the ‘Go’ button.

Now, return to the main wp_options page and edit the ‘home’ option.

Next, input the new domain in the option_value field.

After entering the value, click the ‘Go’ button.

Method 3: Clear DNS Cache on Your Computer

If you are still facing issues with the old domain redirecting after migration, check your DNS settings.

Sometimes, it may take between 12 to 48 hours for the domain name change to propagate. Consequently, internet service providers with outdated DNS records may still direct users to the old domain.

Flushing the DNS cache allows your computer to retrieve the latest information and the new website URL. This action can also help resolve issues with the DNS server not responding.

For detailed instructions, check out our comprehensive guide on clearing your DNS cache for Mac, Windows, and Google Chrome.

Tip: Utilize an SEO Plugin for Complete Site Redirection

When you manually redirect to a new domain, there is a risk of errors that may still lead users to the old domain.

A more straightforward method for setting up redirection is by using a WordPress SEO plugin like All in One SEO (AIOSEO). This plugin features a robust redirection manager that allows you to seamlessly redirect your entire site to a new domain.

This tool was developed by our team and is what we rely on when migrating websites to a new domain or combining two sites. For more information, follow our step-by-step guide on executing a full site redirect in WordPress.

Additional Resources for Website Migration

  • Comparative Review of the Best WordPress Migration Services
  • Guide to Migrating Your Google Business Profile Website to WordPress
  • Comparison of the Best WordPress Migration Plugins
  • Comprehensive WordPress Migration Guide for Beginners (Step-by-Step)

This article provides a comprehensive solution for resolving WordPress redirects to an old domain following a migration. Additionally, check out our guide on common WordPress errors and their fixes, as well as tips for seamlessly transferring your blog from Tumblr to WordPress.

If you enjoyed this article, consider subscribing to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.

Share This Post
DMCA.com Protection Status Chat on WhatsApp