Sunday, Oct 11, 2026 · Practical tutorials, weekly

What Are 301 Redirects in WordPress (and How to Set Them Up)?

S Saurabh K May 10, 2026 8 min read 2 comments

A 301 redirect permanently sends visitors and search engines from an old URL to a new one. In WordPress, you use 301 redirects when you change a post’s URL, delete or merge pages, move to HTTPS, or switch domains. They stop people from hitting 404 errors and help pass the old page’s rankings and link value to the new page.

The easiest way to add one in WordPress is with a plugin like Redirection or Rank Math. You can also use your server’s .htaccess file, your hosting panel or Cloudflare.

Here’s when to use each redirect type, how to set them up step by step, and the mistakes to avoid.

What is a 301 redirect?

When someone visits a URL, the server replies with a status code. A 301 means “moved permanently.” The browser goes straight to the new URL, and search engines learn they should index and rank the new address instead of the old one.

Google has said that redirects like 301s don’t lose PageRank, so a properly redirected page keeps its link value.

Redirect types explained

CodeMeaningWhen to use it
301Moved permanentlyChanged URLs, merged or deleted pages, domain moves (the most common)
308Permanent redirectSame as 301 but keeps the request method. Rarely needed for normal WordPress sites
302Found (temporary)Short-term moves, like a temporary promo page or maintenance
307Temporary redirectLike 302 but keeps the request method. Often set by servers or browsers for HTTPS
410GoneContent deleted for good with no relevant replacement

Rule of thumb: if the move is permanent, use a 301. Don’t use a 302 for permanent changes, because search engines may keep the old URL indexed longer.

When do you need a 301 redirect in WordPress?

  • You changed a post or page slug, for example /seo-tips-2021/ to /seo-tips/
  • You deleted a post and a similar, relevant page exists
  • You merged two posts covering the same topic, a common fix for keyword cannibalization
  • You moved from HTTP to HTTPS
  • You switched between www and non-www
  • You moved to a new domain
  • You restructured categories or changed your permalink structure

Without a redirect, visitors and Googlebot hit a 404 error. That’s a poor experience, and you lose the traffic and backlinks pointing to the old URL.

How to create 301 redirects in WordPress

Method 1: Let WordPress handle simple slug changes

When you change a published post’s slug, WordPress usually remembers the old one and redirects it automatically. It’s handy, but don’t rely on it for everything. It mainly covers posts (not every page or URL change), and it can break if the old slug gets reused. For important URLs, add a proper redirect with a plugin.

Method 2: Use the Redirection plugin (free)

Redirection is one of the most popular free redirect plugins for WordPress.

  1. Go to Plugins, then Add New, search for Redirection, install and activate it
  2. Open Tools, then Redirection and complete the quick setup
  3. In Source URL, enter the old path, for example /old-post/
  4. In Target URL, enter the new URL, for example https://www.example.com/new-post/
  5. Make sure the redirect type is 301 and click Add Redirect
  6. Test the old URL in a private browser window

Bonus: Redirection can log 404 errors, so you can spot broken URLs that need redirects.

Method 3: Use your SEO plugin

  • Rank Math: includes a redirect manager in its free version (enable the Redirections module)
  • Yoast SEO: the redirect manager is a Premium feature. Yoast Premium can also prompt you to add a redirect when you change a slug or delete a post

If you already use one of these, there’s no need for a separate redirect plugin.

Method 4: Edit .htaccess (Apache servers)

If your host uses Apache (many shared hosts do), you can add redirects to the .htaccess file in your site’s root folder. Back up the file first. One typo can take your site down.

A single page:

Redirect 301 /old-post/ https://www.example.com/new-post/

Add your rules above the # BEGIN WordPress section so WordPress doesn’t overwrite them. This method is fast because the redirect happens before WordPress loads.

Method 5: Nginx, your hosting panel or Cloudflare

  • Nginx servers don’t use .htaccess. Redirects go in the server configuration, so ask your host if you’re unsure
  • Hosting panels: many hosts (cPanel and managed WordPress hosts) offer a redirects tool in their dashboard
  • Cloudflare: if your site uses it, Cloudflare’s redirect rules can handle redirects at the network level, which is useful for domain-wide moves

Which method should you use?

  • A few redirects, not technical: Redirection or Rank Math
  • Already on Yoast Premium: its redirect manager
  • Many redirects or a site migration: server-level rules (.htaccess, Nginx or your host) or Cloudflare, ideally with a developer’s help

301 redirect best practices

  • Redirect to the most relevant page. Sending everything to your homepage is confusing, and Google may treat it like a soft 404
  • Avoid redirect chains. A to B to C slows things down. Point A straight to C
  • Avoid redirect loops. A to B to A breaks the page completely
  • Update your internal links to point directly to the new URL instead of relying on the redirect
  • Update your XML sitemap so it lists only final URLs. See how to create an XML sitemap
  • Keep redirects in place long term. Google suggests at least a year, and longer is better if the old URL has backlinks
  • Use 410 for content that’s truly gone with no good replacement
  • Don’t block old URLs in robots.txt. Google needs to crawl them to see the redirect. Avoid these robots.txt mistakes

301 redirect vs canonical tag

They’re often confused:

  • 301 redirect: visitors and search engines are sent to the new URL. The old page is no longer viewable
  • Canonical tag: both pages stay accessible, but you tell search engines which one is the main version

Use a 301 when a page has permanently moved or been merged. Use a canonical tag when similar versions need to stay live, like filtered product pages. Learn more about the SEO canonical tag.

How to test a 301 redirect

  1. Visit the old URL in a private window and check you land on the right page
  2. Check the status code in your browser’s developer tools (Network tab), with a free online HTTP status checker, or from the command line:
curl -I https://www.example.com/old-post/

You should see 301 and a Location: line with the new URL.

  1. Check Google Search Console over the following weeks. The new URL should get indexed, and the old one will drop out

Common 301 redirect mistakes

  • Using a 302 for a permanent move
  • Redirecting every deleted page to the homepage
  • Creating chains after several URL changes over the years
  • Forgetting to redirect after changing your permalink structure or migrating a site
  • Removing redirects too soon
  • Editing .htaccess without a backup

For more technical issues to watch for, see common technical SEO mistakes. If you’re handling a big migration, a technical SEO audit helps catch problems before they cost you traffic.

Quick checklist

  • The move is permanent, so use a 301 (not a 302)
  • The redirect goes to the most relevant page
  • No chains or loops
  • Internal links updated to the new URL
  • XML sitemap shows only final URLs
  • Redirect tested with a status checker
  • Redirect kept in place for at least a year

Frequently asked questions

What is a 301 redirect in WordPress?

It’s a permanent redirect that sends visitors and search engines from an old URL to a new one, usually set up with a plugin, .htaccess or your host.

Do 301 redirects hurt SEO?

No, when used correctly. Google has said 301 redirects don’t lose PageRank. Problems come from chains, loops or redirecting to irrelevant pages.

What’s the difference between a 301 and a 302 redirect?

A 301 is permanent. A 302 is temporary. Use a 301 when a page has moved for good.

How long should I keep a 301 redirect?

At least a year, according to Google, and ideally longer if the old URL has backlinks or still gets traffic.

Does WordPress create redirects automatically?

For published posts, WordPress usually redirects an old slug after you change it. For anything else, or to be safe, add a redirect with a plugin.

Should I redirect deleted pages to the homepage?

No. Redirect to a closely related page. If there’s nothing relevant, a 404 or 410 is better.

Final thoughts

301 redirects are one of the simplest ways to protect your traffic and rankings when URLs change. For most WordPress sites, a plugin like Redirection or Rank Math is all you need. For big moves, server-level redirects and a careful plan matter more.

Redirect to relevant pages, avoid chains, update your internal links, and test everything. Your visitors and your rankings will thank you.

Keep your WordPress site in shape with our guides to WordPress speed optimization, speeding up WordPress in 2026 and Core Web Vitals. Then run through the on-page SEO checklist. Moving content across countries or domains? See our international SEO audit guide. If your rankings dropped after a migration, our guide to recovering from a Google penalty can help you rule out bigger issues.

About the author

Saurabh K. has been working in SEO and digital marketing for 10+ years, helping businesses grow their search traffic.

Share:
Saurabh K

Saurabh K

Author at Technical Speaks

Writes practical guides and tutorials to help readers build, rank, and grow online.

Leave a Comment

Newsletter

Stay ahead of the curve

Join readers getting our freshest tutorials and guides on web, SEO, tech & more — delivered weekly.