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 · Updated · 9 min read · scored 95/100

A 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 in WordPress is a redirect plugin: enter the old URL as the source and the new URL as the target, set the type to 301, and save.

Flat illustration of a severed link, rightward arrow, and connected link representing the redirect path.

How to set up a WordPress 301 redirect with a plugin

Most site owners should start here. The plugin route is reversible, leaves core files alone, 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. Redirection is free and does only this one job; 301 Redirects is also free and lightweight. Larger SEO suites such as All in One SEO or Yoast SEO offer redirect management too, but only in their paid tiers. Pick one, press Install Now, and then Activate once it finishes.

Step 2: Create the redirect rule

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

  1. Open the plugin's settings page, usually under Tools or its own top-level menu item.
  2. Enter the old address in the Source URL field (sometimes called Redirect From). Use the relative path, like /old-page, not the full domain.
  3. Enter the destination in the Target URL field (or Redirect To).
  4. Check that the Redirect Type dropdown says 301 (Permanent). Some plugins default to 302, which doesn't pass ranking signal the way you want.
  5. Save the rule with Save or Add Redirect, whichever your plugin uses.

Step 3: Test it

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

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

Setting up a redirect without a plugin

Flat diagram of a host server with two routes: one through FTP icon to file icon, the other to control panel.

If you'd rather not add another plugin, you can write the redirect in code. Both options below demand more care than a plugin does.

Editing the .htaccess file

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

  1. Connect to your site with an FTP client such as FileZilla, or use your host's File Manager.
  2. Open the public_html directory and find .htaccess.
  3. Download a backup copy before editing anything, because 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

A snippet suits cases where the redirect belongs to specific theme logic rather than a blanket rule. Add it 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

Flat diagram of few pages connected by straight arrows on left, many overlapping pages with crossing arrows on right, divided by line.

A plugin or a manual .htaccess line covers most single-page problems. Once the scale or the pattern of the problem changes, you need something sturdier.

Situation Plugin or manual fix Needs more
One URL moved to a new slug Plugin is enough n/a
Fixing a typo in a published URL Plugin is enough n/a
Migrating an entire site to a new domain n/a 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) n/a

If your site lives on WordPress.com's hosted platform rather than self-hosted WordPress, the redirect options differ; WordPress.com SEO with verified publishing covers what's available there. Self-hosted sites can use the same visit to check the broader setup against WordPress SEO: the settings to change, in order, since redirect hygiene is only one piece of a healthy site.

Why your WordPress 301 redirect isn't working

Flat diagram of a browser and server linked by redirect arrows looping back, with stacked cache layers and two colliding plugins.

"301 redirect not working" is one of the most common follow-up searches once people try the fix above. The cause is usually 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 and 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

Whenever a fix doesn't seem to work, run the URL through the free Redirect Checker. It shows the real status code sequence, so you can tell a caching illusion from a broken rule.

301 vs. 302 vs. 307 vs. 308: picking the right status code

Not every redirect should be a 301. The wrong code 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

According to the MDN Web Docs HTTP status reference, a 301 tells browsers and search engines that a resource has permanently moved to a new URL, which is why search engines treat it as a cue to index the new location and drop the old one. A 302 signals that the move might not stick, so crawlers are slower to transfer ranking value.

Common mistakes to avoid

  • Redirecting everything to the homepage. It clears the 404 but tells search engines nothing about where the content went, so use the homepage only when no close match exists.
  • Chaining redirects. Old page → page B → page C wastes crawl budget and can slow page load, so point the original URL straight at its final destination.
  • Forgetting to update internal links. A redirect fixes the inbound request, but your own 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.
  • Trusting the browser. Seeing the redirect work doesn't confirm the code is a 301; only a header check does.

If you're handling redirects alongside other WordPress SEO housekeeping, compare tools before committing to one. This roundup of the 7 best WordPress SEO tools in 2026 breaks down free versus paid options and notes 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 is 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

Saving a redirect rule doesn't guarantee it works 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 returns a clean 301 and not a chain or a 404.

See what this looks like on your own siteEnter your website. You get the searches your buyers make and the page that should answer each one.

Resources / References

  1. MDN Web Docs HTTP status reference

Sources

  • How to set up 301 redirects in WordPress (Hostinger)
  • How To Create a 301 Redirect in WordPress for Free? (YouTube)
  • WordPress Redirects: 301s, HTTP to HTTPS and WWW (WP Engine)
  • 301 Redirect Help : r/Wordpress (Reddit)
  • 301 Redirect WordPress (LinkedIn)

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.

All WordPress guides