Skip to content
Enjoy 20% off for 12 months on all plans. Use promo code: HYPERGROWTHClaim it

WordPress 301 Redirect: Fix a Broken Link in 3 Steps

By Toy Wen Da, Co-Founder · · 9 min read · scored 95/100

A WordPress 301 redirect sends visitors and search engines from an old URL to its new address permanently, so the page keeps its rankings instead of dying as a 404. The fastest fix is a redirect plugin: enter the old URL as the source, the new URL as the target, set the type to 301, and save.

Close-up of a vintage typewriter with a paper displaying 'WordPress', ideal for blogging and writing concepts.

How to Set Up a WordPress 301 Redirect With a Plugin

This is the route most site owners should take first. It's reversible, doesn't touch core files, and takes a couple of minutes per URL.

Step 1: Install a Redirect Plugin

From your dashboard, go to Plugins → Add New Plugin and search for a redirect tool. Two common choices are Redirection (free, dedicated to this one job) and 301 Redirects (also free and lightweight). Larger SEO suites like All in One SEO or Yoast SEO bundle redirect management into their paid tiers. Click Install Now, then Activate.

Step 2: Create the Redirect Rule

The exact menu label depends on the plugin, but the fields are always the same shape:

  1. Find the plugin's settings page, usually under Tools or its own top-level menu item.
  2. Enter the old address in the Source URL (sometimes called Redirect From) field. Use the relative path, like /old-page, not the full domain.
  3. Enter the destination in the Target URL (or Redirect To) field.
  4. Confirm the Redirect Type dropdown is set to 301 (Permanent), some plugins default to 302, which won't pass ranking signal the way you want.
  5. Click Save or Add Redirect.

Step 3: Test It

Open the old URL in a private browser window. It should land on the new page immediately with no visible flash or delay. Then confirm the status code with a checker rather than trusting the browser, since a browser won't tell you if it silently followed a 302 instead of a 301.

Close-up of a vintage typewriter with paper labeled Wordpress.

For the full mechanics of why a mishandled redirect can cost you rankings, and how to migrate a whole batch of URLs without that happening, see this walkthrough on doing a 301 redirect without losing your rankings.

Setting Up a Redirect Without a Plugin

Close-up of a vintage typewriter with a paper displaying 'Wordpress' in retro style.

If you'd rather not add another plugin, there are two code-level options. Both require more care than the plugin route.

Editing the .htaccess File

This only works if your server runs Apache or LiteSpeed. Many managed WordPress hosts run NGINX instead, which has no .htaccess file at all, check your host's control panel for a built-in redirect tool if you don't see one in your root directory.

  1. Connect to your site with an FTP client such as FileZilla, or use your host's File Manager.
  2. Navigate to the public_html directory and locate .htaccess.
  3. Download a backup copy before editing anything, one typo here can take the whole site offline.
  4. Open the file and confirm the line RewriteEngine on is present.
  5. Add your rule before the # BEGIN WordPress block, in this format:
Redirect 301 /old-page.html https://www.yoursite.com/new-page/
  1. Save the file and reload the old URL in a browser to confirm it forwards correctly.

Using a PHP Snippet

This is useful when you want a redirect tied to specific theme logic rather than a blanket rule. Add this near the top of the relevant template file, before any HTML output:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.yoursite.com/new-target-url");
exit();

The exit() call matters, without it, the rest of the script keeps running and can interfere with the redirect header that was just sent.

When WordPress's Own Tools Are Enough, and When They Aren't

Close-up of a vintage typewriter with 'Wordpress' typed on paper, conveying a classic theme.

A plugin or a manual .htaccess line covers most single-page problems. It stops being enough once the scale or the pattern of the problem changes.

Situation Plugin or manual fix Needs more
One URL moved to a new slug Plugin is enough ,
Fixing a typo in a published URL Plugin is enough ,
Migrating an entire site to a new domain , Server-level rule (.htaccess wildcard or host redirect tool), not a per-URL plugin entry
Merging dozens of thin posts into one guide Plugin works but gets tedious past ~20 entries A redirect manager with bulk import, or a developer-built .htaccess block
A WordPress 301 redirect that worked yesterday stopped working Clear cache first, check again If it recurs across many URLs, something upstream (CDN, caching plugin, old theme code) is overriding it
Switching the whole site from HTTP to HTTPS A dedicated SSL plugin (Really Simple SSL) ,

If you manage a site built with WordPress.com's hosted platform rather than self-hosted WordPress, the available redirect options differ, see WordPress.com SEO with verified publishing for what's available on that platform specifically. And if your site runs self-hosted WordPress, it's worth double-checking your broader setup against WordPress SEO: the settings to change, in order while you're in there, since redirect hygiene is only one piece of a healthy site.

Why Your WordPress 301 Redirect Isn't Working

"301 redirect not working" is one of the most common follow-up searches once people try the fix above. Usually it's one of these:

Symptom Likely Cause Fix
Redirect loops back to the old page Browser or server cache still serving the old response Clear browser cache, purge any caching plugin, purge CDN cache
Redirect works in incognito but not normally Local browser cache holding the old 404 or old page Hard refresh or clear cache
Two plugins both try to redirect the same URL Rule conflict, whichever loads first wins, unpredictably Deactivate one redirect plugin; keep a single source of truth
Redirect returns a 302 instead of 301 Redirect Type dropdown left on default Edit the rule and switch it explicitly to 301
Redirect works on desktop but not via a shared/mobile link A security or firewall plugin intercepting the request Temporarily disable the plugin and retest
.htaccess rule has no effect at all Server runs NGINX, which ignores .htaccess entirely Use your host's dashboard redirect tool or a plugin instead

Run the URL through the free Redirect Checker whenever a fix "doesn't seem to work", it shows you the real status code sequence, so you can tell a caching illusion from an actual broken rule.

Close-up of a vintage typewriter with 'WordPress' typed on white paper.

301 vs. 302 vs. 307 vs. 308: Picking the Right Status Code

Not every redirect should be a 301. Using the wrong one is a common mistake that either wastes ranking signal or breaks a temporary change you meant to reverse.

Code Meaning When to use it
301 Permanent move Page has moved or been deleted for good; you want the new URL to inherit ranking signal
302 Temporary move A/B test, a page under review, or a short-term swap you plan to undo
307 Temporary, method preserved Same as 302 but guarantees a POST stays a POST, useful for forms
308 Permanent, method preserved Like 301, but for API endpoints or form submissions that must keep the original method

A 301 redirect, according to the MDN Web Docs HTTP status reference, tells both browsers and search engines that a resource has permanently moved to a new URL, which is exactly why search engines treat it as a signal to re-index the new location and drop the old one. A 302, by contrast, tells crawlers the move might not stick, so they're slower to transfer ranking value.

Common Mistakes to Avoid

  • Redirecting everything to the homepage. It clears the 404, but it tells search engines nothing useful about where the content actually went. Only use the homepage as a last resort when no close match exists.
  • Chaining redirects. Old page → page B → page C wastes crawl budget and can slow page load. Point the original URL straight at its final destination.
  • Forgetting to update internal links. A redirect fixes the inbound request, but your own site navigation, menus, and old blog posts may still point at the dead URL.
  • Leaving 302s in place after testing. If a temporary redirect was for an A/B test or staging review, switch it to 301 (or remove it) once the decision is final.
  • Skipping the backup before editing .htaccess. A single missing bracket can take the entire site down until it's restored.
  • Not testing with a real status-code checker. A browser following the redirect visually doesn't confirm the code is a 301, only a header check does.

If you're managing redirects alongside other WordPress SEO housekeeping, it's worth comparing the available tools before committing to one, this roundup of 7 best WordPress SEO tools in 2026 breaks down free versus paid options, including which ones bundle redirect management.

FAQs

Does WordPress have a built-in 301 redirect tool?

No. Core WordPress doesn't ship a redirect manager. You need a plugin (Redirection, 301 Redirects, or a bundled SEO suite) or a manual edit to .htaccess or your theme's PHP files.

Will a 301 redirect pass all my SEO ranking to the new page?

Most of it, though not strictly all. Search engines treat a 301 as a strong signal to consolidate ranking signal onto the new URL, which is why it's the standard choice for permanent moves, consolidations, and domain migrations.

Why is my WordPress 301 redirect still showing the old page?

Almost always caching, your browser, a caching plugin, or a CDN serving a stored copy of the old response. Clear each layer and retest in a private browser window before assuming the rule itself is broken.

Can I use a 301 redirect to fix a 404 error?

Yes, and it's one of the most common uses. Point the broken URL at the closest matching live page rather than the homepage, so the redirect still makes sense to a visitor who lands on it.

Is it safe to redirect an entire domain to a new one?

Yes, with a single server-level rule rather than hundreds of individual plugin entries. A wildcard .htaccess rule or your host's domain redirect tool maps every old URL to the matching new one in one step, which keeps the path structure intact.

Get the Redirect Confirmed, Not Just Saved

Clicking "save" on a redirect rule doesn't guarantee a WordPress 301 redirect is actually working the way you intended, caching, plugin conflicts, and the wrong status code all hide behind what looks like success. Before you close the tab, run the URL through the free Redirect Checker to confirm it's returning a clean 301 and not a chain or a 404.


## Resources / References

1. [MDN Web Docs HTTP status reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301)

## Sources

- [How to set up 301 redirects in WordPress](https://www.hostinger.com/tutorials/301-redirects-in-wordpress/)
- [How To Create a 301 Redirect in WordPress for Free?](https://www.youtube.com/watch?v=E-_YXiofWGI)
- [WordPress Redirects: 301s, HTTP to HTTPS and WWW](https://wpengine.com/blog/wordpress-redirects/)
- [301 Redirect Help : r/Wordpress](https://www.reddit.com/r/Wordpress/comments/jx5o8e/301_redirect_help/)
- [301 Redirect WordPress](https://www.linkedin.com/pulse/301-redirect-wordpress-themedev)
See what this looks like on your own sitePaste a URL and SearchBlueprint scores it on the same content engine that scored this article, then names the fixes in the order they pay off.Get your free plan

About the author

SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.