How to Set Up a Full Site Redirect in WordPress

Written by WordPress Expert

August 3, 2025
How to Set Up a Full Site Redirect in WordPress

Moving a website is a common task in the world of web development. Whether you're rebranding, changing domain names, migrating to a new hosting provider, or consolidating multiple sites, a full site redirect is an essential step to ensure a smooth transition. This article will provide a comprehensive guide on how to set up a full site redirect in WordPress, covering various scenarios and best practices.

Why Would You Need a Full Site Redirect


A full site redirect, also known as a 301 redirect, is a permanent redirection from one URL to another. It tells browsers and search engines that the original content has permanently moved to a new location. This is crucial for several reasons:

  • Preserving SEO Value: When you move a website, you risk losing the search engine rankings you've worked hard to build. A 301 redirect passes most of the link equity (PageRank) from the old URL to the new one, minimizing the impact on your SEO.

  • User Experience: Without a redirect, visitors trying to access your old URL would encounter a "404 Not Found" error. This is a frustrating experience and can lead to lost traffic and potential customers. A redirect seamlessly guides them to your new site.

  • Avoiding Duplicate Content Issues: If both the old and new versions of your site remain accessible, search engines might view them as duplicate content, which can negatively affect your rankings. A redirect resolves this by consolidating all traffic and SEO signals to the new domain.

  • Maintaining Traffic: Any existing backlinks, social media shares, or bookmarks pointing to your old site will continue to direct traffic to your new site, ensuring you don't lose valuable visitors.

Scenarios Requiring a Full Site Redirect

Before diving into the "how-to," let's consider common scenarios where a full site redirect is necessary:

  1. Changing Domain Names: This is perhaps the most common reason. If you're moving from ‘olddomain.com’ to ‘newdomain.com’, you'll need a full site redirect.

  2. Migrating from HTTP to HTTPS: While often handled at the server level, sometimes a full site redirect is used to ensure all HTTP requests are permanently redirected to their HTTPS counterparts.

  3. Consolidating Multiple Websites: If you have several small websites and decide to merge them into a single, larger site, you'll redirect the old domains to the relevant pages on your new site.

  4. Rebranding or URL Structure Changes: Even if your domain stays the same, significant changes to your URL structure like removing categories from permalinks that might necessitate extensive redirects.

  5. Moving to a New Hosting Provider (with domain change): If you're moving hosts and also changing your domain, the redirect will be crucial. If you're only changing hosts and keeping the domain, the redirect isn't directly needed for the domain transfer itself, but rather for any specific URL changes that might occur during the migration process.

  6. Redirecting Non-WWW to WWW (or vice-versa): While less common for a full site redirect, sometimes you want to ensure all traffic goes to either the WWW or non-WWW version of your site for canonicalization purposes.

25%

💸 EXTRA 25% OFF ALL VERPEX MANAGED HOSTING PLANS FOR WORDPRESS

with the discount code

SERVERS-SALE

SAVE NOW

Before You Begin: Essential Preparations


Setting up a full site redirect requires careful planning. Before you make any changes, ensure you've completed the following:

  1. Backup Your WordPress Site: This is non-negotiable. Before making any significant changes to your site's configuration or database, create a complete backup of your WordPress files and database. This will allow you to revert to a previous state if anything goes wrong. Many hosting providers offer backup solutions, or you can use a WordPress backup plugin like UpdraftPlus or BackWPup.

  2. Set Up Your New WordPress Site: Ensure your new WordPress installation is fully set up, configured, and tested. All content should be migrated, plugins installed, and themes activated.

  3. Update Internal Links: Once your new site is ready, go through your content and update all internal links using the Better Search Replace plugin to reflect the new domain or URL structure. This is crucial for user navigation and SEO.

  4. Inform Your Audience (Optional but Recommended): If you have a large audience, consider informing them about the upcoming domain change through email newsletters, social media, or a prominent notice on your old site. This can help manage expectations and reduce confusion.

  5. Clear Caches: Before testing your redirects, clear all caches (browser, WordPress caching plugins, server-side caching) to ensure you're seeing the most up-to-date version of your site.

How to Set Up a Full Site Redirect in WordPress


There are several ways to implement a full site redirect in WordPress, ranging from simple plugin solutions to more advanced server-level configurations. This article includes two methods.

Method 1: Using a WordPress Plugin (Recommended for Most Users)

For most WordPress users, a plugin is the easiest and safest way to set up redirects. Plugins abstract the complexities of server configuration and provide a user-friendly interface.

Popular Redirect Plugins:

  • Rank Math SEO: While primarily an SEO plugin, Rank Math includes a powerful Redirections module.

  • Yoast SEO Premium: Similar to Rank Math, Yoast SEO Premium offers a redirect manager as part of its paid features.

  • Redirection: This dedicated redirect plugin is highly popular and free. It allows you to manage 301, 302, and 307 redirects, monitor 404 errors, and set up advanced redirect rules.

  • Simple 301 Redirects: As its name suggests, this plugin offers a straightforward interface for creating 301 redirects.

As a note, please only choose one of the above for your redirects as they could conflict against each other. If you are already using the free version of Yoast SEO, it is safe to use the Redirection plugin. However, if you are using Yoast SEO Premium, it will conflict with the Redirection plugin.

How to Use the Redirection Plugin (Example):

  1. Install and Activate: From your WordPress dashboard, go to ‘Plugins > Add New’, search for "Redirection," install, and activate it.

  2. Access Redirection Settings: Go to ‘Tools > Redirection’.

  3. Set Up a New Redirect:

screenshot-redirection-plugin-fields

a. In the "Source URL" field, enter the URL of your old site. For a full site redirect, you'll typically use a wildcard to capture all old URLs. For example, if you're moving from ‘olddomain.com’ to ‘newdomain.com’, you might enter ‘/.*’ in the Source URL field.

b. In the "Target URL" field, enter the URL of your new site. For a full site redirect, you'll enter your new domain, for example - ‘https://newdomain.com/’.

  i. Make Sure the "Group" is set to "Redirections."

  ii. Set the "HTTP Code" to "301 - Moved Permanently."

  iii. Click "Add Redirect."

Test Your Redirect: After setting up the redirect, clear your browser cache and try accessing URLs from your old domain. They should automatically redirect to your new domain.

Important Note on Wildcards: When redirecting an entire domain using a plugin like Redirection, you'll often need to set up two rules for comprehensive coverage:

  1. Rule 1: Redirecting the old domain (excluding subdirectories) to the new domain:

    a. Source URL: ‘^/’

    b. Target URL: ‘https://newdomain.com/’ (Make sure to check "Regex" or "Regular expression" option if available in the plugin settings for these rules)

    c. HTTP Code: 301

  2. Rule 2: Redirecting all subdirectories and files from the old domain to the new domain, maintaining the path:

    a. Source URL: ‘^/(.*)’

    b. Target URL: ‘https://newdomain.com/$1’ (Again, ensure "Regex" is enabled)

    c. HTTP Code: 301

This setup makes sure that ‘olddomain.com’ goes to ‘newdomain.com’ and ‘olddomain.com/some-page’ goes to ‘newdomain.com/some-page’.

Method 2: Using the .htaccess File (Advanced Users)

The .htaccess file is a powerful configuration file used by Apache web servers. It allows you to control various aspects of your website's behavior, including redirects. This method is highly efficient but requires more technical knowledge and careful execution, as errors can break your site.

Before you start:

  • Locate your .htaccess file: It's usually found in the root directory of your WordPress installation (example - ‘public_html’). You can access it via FTP/SFTP or your hosting provider's file manager.

  • Make a backup: Always download a copy of your ‘.htaccess’ file before editing it.

Common Scenarios and .htaccess Rules:

Scenario A: Redirecting an Entire Domain to a New Domain

This is the most common full site redirect.

Redirect olddomain.com to newdomain.com

RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$ RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]

Explanation:

  1. ‘RewriteEngine On’: Activates the Apache rewrite module.

  2. ‘RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]’: This condition checks if the requested host is ‘olddomain.com’. The ‘\’ before the dot escapes it, treating it as a literal dot. ‘[OR]’ means "or the next condition."

  3. ‘RewriteCond %{HTTP_HOST} ^www.olddomain.com$’: This condition checks if the requested host is ‘www.olddomain.com’.

  4. ‘RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]’: This is the rewrite rule itself.

    a. ‘(.*)’: Captures everything after the domain in the URL.

    b. ‘https://newdomain.com/$1’: The target URL. ‘$1’ refers to the captured content from ‘(.*)’, ensuring that individual pages (example - ‘olddomain.com/about-us’) redirect to their counterparts on the new domain (example - ‘newdomain.com/about-us’).

    c. ‘[R=301,L]`:

    i. ‘R=301’: Specifies a 301 (permanent) redirect.

    ii.‘L’: Stands for "Last rule," meaning if this rule is met, no further rewrite rules will be processed.

Where to place this code:

screenshot-htaccess-cpanel-filemanager

Place this code ABOVE the ‘# BEGIN WordPress’ and ‘# END WordPress’ markers in your ‘.htaccess’ file.

Scenario B: Redirecting Non-WWW to WWW (or vice-versa)

If you want all traffic to go to the WWW version of your site:

Redirect non-WWW to WWW

RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

If you want all traffic to go to the non-WWW version of your site:

Redirect WWW to non-WWW

RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

Scenario C: Migrating from HTTP to HTTPS

Force HTTPS

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

After Setting Up the Redirect: Important Post-Redirect Steps


Setting up the redirect is only half the battle. To ensure a successful migration and maintain your SEO, follow these post-redirect steps:

  1. Test Thoroughly: This is VERY important.

    a. Clear your browser cache.

    b. Test various URLs from your old domain (homepage, old posts/pages, categories, tags, images, non-existent URLs) to ensure they all correctly redirect to your new site.

  2. Use online redirect checker tools like HTTP Status Code Checkeror Redirect Checker to verify that a 301 status code is returned.

  3. Update Google Search Console:

    a. Add your new domain as a property in Google Search Console.

    b. Use the "Change of Address" tool in your old domain's Search Console property to notify Google about the site move. This significantly speeds up the reindexing process.

    c. Monitor the "Crawl Errors" section for your old domain for any 404 errors that might indicate missed redirects.

    d. Monitor "Performance" for both properties to track traffic and keyword rankings.

  4. Update Google Analytics:

    a. If you're using Google Analytics, make sure your new site is tracking correctly. If you're using the same tracking code, ensure the domain settings are updated.

    b. Consider annotating the date of the redirect in your Google Analytics account to easily identify any changes in traffic patterns.

  5. Update Sitemaps:

    a. Generate a new sitemap for your new site using an SEO plugin like Rank Math or Yoast SEO.

    b. Submit this new sitemap to Google Search Console.

    c. Remove your old sitemap or point it to the new sitemap if still accessible.

  6. Update External Links (Where Possible):

    a. Reach out to websites that link to your old domain and ask them to update the links to your new domain. This is especially important for high-authority backlinks.

    b. Update any social media profiles, business directories, and other online presences with your new domain.

  7. Monitor Your Site:

    a. Keep a close eye on your website's performance, traffic, and search engine rankings for several weeks after the redirect.

  8. Be prepared to troubleshoot any unexpected issues.

Common Problems and Troubleshooting


Here are some issues you could possibly run into and some quick tips to resolving them.

  • Redirect Loops: This occurs when a URL redirects back to itself, often due to conflicting redirect rules. Clear your browser cache and carefully review your redirect configurations.

  • Too Many Redirects: Similar to loops, this happens when a request goes through multiple redirects before reaching the final destination. This can slow down your site and negatively impact SEO. Simplify your redirect chains.

  • Incorrect Redirect Type (302 vs. 301): A 302 redirect is temporary, while a 301 is permanent. Using a 302 for a permanent move will prevent the transfer of SEO value. Always use 301 for permanent changes.

  • Caching Issues: Server-side caching, CDN caching, and browser caching can interfere with testing redirects. Always clear all caches before testing.

  • Forgetting HTTPS: If you're moving to HTTPS, ensure all your redirects go to the HTTPS version of your new site.

  • Case Sensitivity: Be aware that some servers treat URLs as case-sensitive. Ensure your redirects account for both cases if necessary.

  • Conflicting Rules: If you're using both a plugin and .htaccess for redirects, they can conflict. It's generally best to choose one method and stick to it for full site redirects.

As a note, if you’re having issues that persist, contact your web host or hire a developer.

90%

💸 90% OFF YOUR FIRST MONTH WITH ALL VERPEX SHARED WEB HOSTING PLANS

with the discount code

MOVEME

Save Now

In Summary


When you set up a full site redirect in WordPress, you should carefully plan your process. Choosing the right method (plugin, .htaccess, or server-level), and following the post-redirect steps, you can guarantee a smoother transition, preserve your SEO rankings, and maintain a seamless user experience. While plugins offer an accessible solution for most, understanding the underlying server-level configurations provides more control and efficiency for advanced users. Always prioritize backups and thorough testing to safeguard your website during this crucial process.

Frequently Asked Questions

How long is WordPress migration?

A WordPress migration process should only take a few hours. This is valid for cases where there aren’t any technical issues that will affect the migration.

Can I redirect multiple domains at the same time?

Yes, it is possible to redirect multiple domains simultaneously. You can set up separate redirects for each domain, ensuring that each redirect points to the desired destination.

How does domain redirection affect emails linked to the domain?

Domain redirection typically does not impact emails linked to the domain. Email services are often separate from the domain itself.

Can I reverse a domain redirect once it's been set up?

Yes, you can reverse a domain redirect by removing the redirect configuration and restoring the previous settings. If you used a 301 permanent redirect, it's important to update the redirect to point back to the original domain to avoid potential SEO and user experience issues.

Jivo Live Chat