5 July 2026

How to Set Up 301 Redirects in WordPress (Done Right)

Learn to set up 301 redirects in WordPress to maintain SEO and enhance user experience when URLs change. Avoid 404 errors effectively.

How to Set Up 301 Redirects in WordPress (Done Right)

Understanding 301 Redirects in WordPress

Setting up 301 redirects in WordPress is crucial for maintaining SEO integrity and enhancing user experience when URLs change. A 301 redirect is a permanent redirect that informs search engines and browsers that a page has moved to a new location. This ensures that any link equity from the old URL is transferred to the new one, preserving search rankings and preventing users from landing on 404 error pages.

When you change a URL structure, whether it's due to a website redesign, content restructuring, or domain change, it's crucial to implement 301 redirects properly. Failing to do so can lead to significant drops in traffic and search engine rankings.

Why 301 Redirects Matter for SEO

Preserving Link Equity

Link equity, often referred to as "link juice," is the SEO value passed from one page to another through hyperlinks. When you use a 301 redirect, approximately 90-99% of the link equity is transferred to the new URL. This is significantly more beneficial than other types of redirects, such as 302 (temporary) redirects, which do not pass the same amount of link equity.

Enhancing User Experience

A seamless user experience is vital for retaining visitors and reducing bounce rates. When users encounter broken links or 404 pages, they are more likely to leave, which can negatively impact your website's performance metrics. By setting up 301 redirects, you guide users smoothly to the content they are looking for, maintaining engagement and reducing frustration.

Avoiding Duplicate Content

When restructuring your website, there's a risk of creating duplicate content, which can confuse search engines and dilute your site's SEO strength. Properly implemented 301 redirects help consolidate similar pages and direct search engines to the preferred version of your content.

How to Set Up 301 Redirects in WordPress

Implementing 301 redirects in WordPress can be done in several ways, each suitable for different levels of technical expertise and specific needs.

Using a WordPress Redirect Plugin

One of the easiest methods to set up 301 redirects in WordPress is by using a plugin. This approach is ideal for users who prefer not to edit code directly. There are several reliable WordPress redirect plugins available:

  • Redirection: This is a popular and user-friendly plugin for managing 301 redirects. It offers a simple interface for setting up redirects and tracking 404 errors.
  • Yoast SEO: While primarily an SEO plugin, Yoast offers a redirect manager in its premium version, allowing you to set up 301 redirects easily.
  • Simple 301 Redirects: This plugin is perfect for quick and straightforward redirect setups, especially for smaller websites.

Steps to Set Up Redirects Using Redirection Plugin

  1. Install and Activate the Plugin: Search for "Redirection" in the WordPress plugin repository, install it, and activate it.
  2. Access the Redirection Settings: Navigate to Tools > Redirection in your WordPress dashboard.
  3. Add a New Redirect: Click on "Add New" to create a new redirect.
    • Source URL: Enter the old URL path (e.g., /old-page).
    • Target URL: Enter the new URL path (e.g., /new-page).
  4. Save Your Changes: Click the "Add Redirect" button to save the redirect.

This plugin also provides 404 error tracking and logging capabilities, allowing you to monitor and address any issues promptly.

Editing the .htaccess File

For those comfortable with a bit of code, editing the .htaccess file is another way to set up 301 redirects. This method provides more control and is effective for larger websites with numerous redirects.

Steps to Set Up Redirects via .htaccess

  1. Access Your Website's File Manager: Use an FTP client or your hosting provider's file manager to locate the .htaccess file in your website's root directory.

  2. Backup the .htaccess File: Before making changes, create a backup of your .htaccess file to prevent any accidental data loss.

  3. Edit the .htaccess File: Add the following line at the end of the file for each redirect:

    Redirect 301 /old-page-url /new-page-url
    

    Replace /old-page-url and /new-page-url with the actual paths.

  4. Save and Upload the File: Save your changes and upload the .htaccess file back to the server.

Ensure you test the redirects to confirm they work correctly, as errors in the .htaccess file can break your website.

Using Custom Functions

For developers who want to implement redirects programmatically, adding custom functions in a theme's functions.php file is an option. This method is best for those familiar with PHP and WordPress development.

Steps to Set Up Redirects Using Custom Functions

  1. Access Your Theme's functions.php File: Use an FTP client or WordPress editor to access the file.

  2. Add Redirect Code: Insert the following code snippet:

    add_action('template_redirect', 'redirect_old_urls');
    function redirect_old_urls() {
        if (is_page('old-page')) {
            wp_redirect(home_url('/new-page'), 301);
            exit();
        }
    }
    

    Modify 'old-page' and '/new-page' with your specific slug and URL path.

  3. Save the Changes: Ensure the code is correctly implemented and save your changes.

This approach is flexible and allows for conditions, such as user roles or custom page types, when applying redirects.

Common Mistakes to Avoid

Incorrect Redirect Chains

A redirect chain occurs when URL A redirects to URL B, which then redirects to URL C. This can slow down page loading times and dilute link equity. Always redirect URLs directly to the final destination to avoid chains.

Redirect Loops

A redirect loop happens when a URL redirects back to itself, causing an infinite loop. This typically occurs due to incorrect redirect rules. Ensure that your redirects are correctly mapped to prevent loops.

Failing to Update Internal Links

After setting up 301 redirects, update your website's internal links to point directly to the new URLs. This not only improves user experience but also helps search engines crawl your site more efficiently.

Monitoring and Testing Redirects

Once you have implemented your 301 redirects, it's essential to monitor and test them to ensure they function correctly.

Use of Tools

  • Google Search Console: This tool can help you identify any crawl errors or issues with your redirects.
  • Screaming Frog SEO Spider: This desktop program can crawl your site and provide insights into redirect chains, loops, and other issues.
  • Online Redirect Checker: Use this tool to verify that your redirects work as intended, confirming they are 301 redirects.

Regular Audits

Conduct regular audits of your redirects to ensure they remain effective, especially after making significant website changes. This will help maintain your site's SEO health and avoid any unforeseen issues.

Consider utilising our SEO audit services to identify and rectify any potential problems with your site's redirects and overall SEO performance.

Cost Considerations for UK Site Owners

Implementing 301 redirects may involve different costs depending on the approach and the scale of your project:

  • WordPress Redirect Plugins: Most plugins, like Redirection, are free or have a nominal cost for premium features.
  • Professional Services: Hiring a digital agency like Neometa to handle redirects can range from £100 to £300, depending on the complexity and volume of the URLs involved.
  • In-house Efforts: If you have a technical team, the primary cost is time, which can vary based on the team's expertise and the number of redirects needed.

For businesses looking to streamline these processes, investing in WordPress web design and maintenance services might be the most efficient solution, ensuring professional setup and ongoing management.

Address your site's URL changes effectively. Set your website up for success with our technical SEO services and ensure seamless user experiences and optimal search engine performance. Contact Neometa today to learn more about how we can support your business.

Thanks for reading.

Back to insights

Need help executing?

If you read something here that sounds exactly like what your business needs, let's talk about getting it implemented.

Chat on WhatsApp