Technical SEO 3 min read

How to Set Up Redirects in WordPress

Redirects keep visitors and rankings when URLs change. Learn the WordPress-friendly ways to create 301 redirects — plugins, SEO tools, .htaccess and server rules — and how to avoid chains and loops.

On this page

Key takeaways

  • Use 301 redirects when a URL changes permanently, so visitors and rankings follow to the new page.
  • A redirect plugin is the easiest option; server or CDN rules are best for bulk and high-traffic sites.
  • Redirect to the most relevant page, avoid chains, and monitor 404s.

Every time you change a slug, delete a post, merge articles or restructure a site, old URLs break. Without redirects, visitors hit 404 pages and the links and rankings those URLs earned are lost. Here’s how to manage redirects in WordPress properly.

When you need a redirect#

  • You changed a post or page URL (slug).
  • You merged two articles into one.
  • You deleted content that has a close replacement.
  • You moved from HTTP to HTTPS, or to a new domain.
  • You restructured categories or permalinks.

Methods compared#

Method Best for Notes
Redirection plugin Most sites Free, logs 404s, supports regex
SEO plugin redirect manager Sites using Rank Math (free) or Yoast Premium Can auto-create redirects when slugs change
.htaccess (Apache/LiteSpeed) Domain moves, bulk patterns Fast, runs before WordPress loads
Nginx config Nginx servers Ask your host if you don’t have access
Cloudflare redirect rules High-traffic sites, domain-level rules Run at the edge, very fast

.htaccess examples#

# Single page
Redirect 301 /old-page/ https://example.com/new-page/

# Pattern: move /blog/post-name/ to /post-name/
RedirectMatch 301 ^/blog/(.*)$ https://example.com/$1

# Whole domain to new domain (same paths)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?old-domain.com$ [NC]
RewriteRule ^(.*)$ https://new-domain.com/$1 [R=301,L]

Place custom rules above the # BEGIN WordPress block, and keep a backup of the file.

Need a hand with this?

Get a quick, honest review of your website’s SEO.

Chat on WhatsApp

Automatic redirects WordPress already does#

  • When you change a published post’s slug, WordPress stores the old slug and redirects to the new one.
  • Canonical redirects fix minor variations (missing trailing slash, ?p=123 to the pretty URL).
  • This theme 301-redirects URLs of old posts it removed during setup to matching new articles or the blog index.

Best practices#

  • Relevant targets: redirect to the closest equivalent; mass redirects to the homepage are treated as soft 404s.
  • No chains: when adding a new redirect, update older ones to point at the final URL — see redirect chains.
  • Update internal links rather than relying on redirects.
  • Keep redirects long-term, especially for URLs with backlinks.
  • Use 302 only for genuinely temporary moves.

Find URLs that need redirects#

  1. Search Console → Pages → “Not found (404)”.
  2. The Redirection plugin’s 404 log.
  3. Backlink tools’ “broken backlinks” report.
  4. Before a migration, crawl the old site to export every URL.

Concepts: 301 redirect, HTTP status codes.

Redirects FAQ#

Do too many redirects slow WordPress?#

Thousands of plugin-based rules can add overhead to every request. Move bulk or pattern rules to the server or CDN.

Should I redirect all 404s to the homepage?#

No. Redirect only when a relevant replacement exists; otherwise return a helpful 404 page.

How long should redirects stay?#

At least a year; permanently for URLs that have backlinks or ongoing traffic.

Found this useful? Share it

Join the discussion

Your email address will not be published. Required fields are marked *

Security code image. If you cannot read it, press refresh or contact me on WhatsApp.