How to Set Up 301 Redirects in WordPress
A 301 redirect is the correct way to permanently forward one URL to another while preserving link equity and user experience. This guide covers every method — plugin, .htaccess, and PHP — and the most common mistakes to avoid.
Quick start: In WordPress, the easiest way to add a 301 redirect is with a plugin (FixLinks AI or Redirection). Go to your WordPress dashboard, install the plugin, and add the old URL and new URL. The redirect is live immediately — no server configuration needed.
What is a 301 redirect?
A 301 redirect is a server response that permanently forwards one URL to another. When a browser or search engine bot requests the old URL, the server replies with HTTP status code 301 and the new address. The visitor (and the bot) is automatically sent to the new page, and most of the original page’s link equity is transferred to the new URL.
301 redirects are the standard fix for broken links, URL changes after a site migration, and consolidating duplicate content. For a comparison with other redirect types, see 301 vs 302 redirects.
Method 1: Use a plugin (recommended)
Plugins are the safest approach for most WordPress sites because they store redirects in the database and apply them through WordPress — no risk of breaking your server config.
FixLinks AI
FixLinks AI scans your site for broken links and uses AI to suggest the best 301 redirect destination for each one. You approve them all in one click. It is the fastest method when you have multiple broken links to fix at once, and it works on both Apache and Nginx without any manual config. Free plan covers 50 AI suggestions/month; Pro offers unlimited.
Redirection
Redirection is a free plugin focused entirely on managing redirects and logging 404s. Go to Tools → Redirection → Add New, enter the source URL (the old address) and the target URL (the new address), and save. Simple and reliable for manual redirect management.
Method 2: Edit .htaccess (Apache)
If your host runs Apache (most shared hosting), you can add redirect rules directly to your .htaccess file in the WordPress root. Back up the file first.
# Single page redirect
Redirect 301 /old-page/ /new-page/
# Redirect an entire old directory
RedirectMatch 301 ^/old-blog/(.*)$ /blog/$1
The first rule redirects one specific URL. The second uses a regex to forward a whole section of your site. Add these lines after the opening # BEGIN WordPress block.
Method 3: Nginx server block
If your host runs Nginx, add the redirect in your server block configuration (your host may provide a control panel for this):
location = /old-page/ {
return 301 /new-page/;
}
Method 4: PHP header() — use only as a last resort
You can issue a 301 redirect from a PHP file:
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: https://yoursite.com/new-page/');
exit;
This only works if the old URL has a corresponding PHP file. Plugin-based or server-level redirects are almost always preferable.
How to bulk-redirect after a migration
After a site migration, you typically need dozens or hundreds of redirects. Manual entry is impractical. FixLinks AI handles this by scanning your new site, detecting every 404, and using AI to map each dead URL to the closest matching live page. See our dedicated guide on fixing broken links after a WordPress migration.
Common 301 redirect mistakes
- Redirect chains — A redirects to B which redirects to C. Each hop loses a small amount of link equity. Consolidate chains so every old URL points directly to its final destination.
- Redirecting everything to the homepage — Google treats these as soft 404s. Always redirect to the most relevant page.
- Using 302 when you mean 301 — A 302 is temporary and passes no link equity. Only use it for genuinely temporary moves. Read more: 301 vs 302 redirects.
- Removing redirects too soon — Keep them for at least 12 months after the change. Other sites and caches may still reference the old URL.
Bulk-fix your broken links with AI
Stop adding redirects one by one. FixLinks AI finds every 404 and suggests the right redirect destination automatically.
Download the free pluginHow to verify your redirects are working
- Use Google Search Console’s URL Inspection tool — enter the old URL and check it returns a 301 and the correct destination.
- Use a browser dev tools Network tab — request the old URL and confirm the status is 301.
- Run a post-migration crawl with FixLinks AI or Screaming Frog to catch any broken links that slipped through.
Frequently asked questions
What is the easiest way to create a 301 redirect in WordPress?
The easiest way is to use a plugin. FixLinks AI and Redirection both let you add 301 redirects from your WordPress dashboard without touching any files. FixLinks AI additionally uses AI to suggest the destination for broken URLs automatically.
Do 301 redirects pass link equity (PageRank)?
Yes. A 301 redirect passes most of the link equity from the old URL to the destination. Google has confirmed this. The transfer is not 100% — some small amount is lost in the hop — but it is far better than a dead URL that passes nothing.
Can I create a 301 redirect without a plugin?
Yes. On Apache servers you can add redirect rules to your .htaccess file: "Redirect 301 /old-page/ /new-page/". On Nginx you add a rewrite rule to your server block. However, plugins are safer for most WordPress users because they do not risk breaking the server configuration.
How long should I keep a 301 redirect active?
Keep it permanently, or at least for 12 months minimum. Search engines and other sites may have the old URL cached. Removing a redirect too early sends returning visitors back to a 404.