How to set up 301 redirects in WordPress

To set up a 301 redirect in WordPress, go to Hydrogen SEO → Redirections, click Add New, enter the old path in From URL and the new address in To URL, choose 301 - Permanent Redirect and click Create. The redirect works immediately on any host, with no .htaccess editing. Without a plugin, you add the same rule to your server configuration instead.

A 301 redirect tells browsers and search engines a page has moved for good, so the old URL's links and rankings pass to the new one. This guide is the how-to. If you are still deciding whether a URL deserves a redirect at all, read 301 vs 404 first.

Step by step

1. Confirm a redirect is the right answer

Redirect when a real replacement exists: the post moved to a new slug, two articles were merged, or a product was replaced by its successor. If the content is gone and nothing replaces it, a 404 is the honest answer. If the move is temporary, such as a seasonal page or an A/B test, use a 302. The 301 vs 302 decision table covers the edge cases.

2. Add the redirect in Hydrogen SEO

  1. In wp-admin, open Hydrogen SEO → Redirections and click Add New.
  2. From URL: the old path only, such as /summer-sale-2025/. Leave out the domain.
  3. Match Type: leave it on Exact Match for a single URL. Contains, Starts With and Ends With catch a group of URLs with one rule, so use them carefully.
  4. To URL: a path like /sale/ or a full URL like https://example.com/sale/.
  5. Redirect Type: 301 - Permanent Redirect.
  6. Leave Enable this redirection on and click Create.

3. Turn on Auto Redirection for future slug changes

At the top of the Redirections screen, switch on Auto Redirection. From then on, when you change the slug of a post, page or term, Hydrogen SEO adds a 301 from the old address to the new one, tagged Auto. It prevents most of the 404s that come from routine editing.

4. Test the redirect

Open the old URL in a private window. For a precise check, look at the response headers:

bash
curl -sI https://example.com/summer-sale-2025/

You should see 301 Moved Permanently and a location: header with the new URL. If the old page still loads, clear your page cache once; the redirect runs before WordPress renders a page, but a cached copy can be served before that.

5. Or add the redirect at the server

If you prefer server rules, on Apache add a line above the # BEGIN WordPress block in .htaccess:

apache
Redirect 301 /summer-sale-2025/ https://example.com/sale/

On Nginx, add a location block to the site configuration and reload Nginx:

nginx
location = /summer-sale-2025/ {
    return 301 https://example.com/sale/;
}

Server rules are fast, but a typo in .htaccess can take the whole site down, and many managed hosts do not let you edit Nginx at all. Keep all your redirects in one place, whichever you choose, so nobody has to hunt for a rule.

The redirect catches visitors and backlinks you do not control. For links on your own site, edit them to point straight at the new URL. It saves a hop for every visitor and every crawl. A site audit lists broken internal links along with the page that contains each one.

Common mistakes

  • Sending everything to the homepage. Google treats irrelevant redirects as soft 404s. Send each URL to the page that actually replaces it.
  • Pointing at a URL that also redirects. That creates a chain. Always use the final destination; see how to fix redirect chains.
  • Creating a loop. If /a/ goes to /b/ and /b/ goes back to /a/, the browser gives up with a "too many redirects" error. Edit or delete one of the rules.
  • Using 302 for a permanent move. It keeps the old URL as the canonical one. If a "temporary" redirect has been in place for a year, change it to a 301.

Keep your redirect list healthy

Every row in Active Redirections has a switch that pauses the rule without deleting it, which is useful when you are testing a new destination. Search the list before you add a rule, so you edit an existing one instead of stacking a second rule on the same source. A sensible routine is to start a new redirect as a 302 while you confirm the destination, then edit it to a 301. Delete rules only when the old URL has no backlinks and no traffic left.

Common questions

Do I need .htaccess to create redirects in WordPress?

No. A redirect manager inside WordPress, such as Hydrogen SEO's, serves the redirect before the page renders and works the same on Apache, Nginx and LiteSpeed hosts.

How many redirects can I add?

There is no limit in the plugin. Hundreds of stale rules are a maintenance burden, so prune the ones nothing links to anymore.

Can I redirect to a different domain?

Yes. Enter a full URL, including https://, in the To URL field.

Does a 301 pass all of the old page's value?

Nobody outside Google can measure an exact share. A direct redirect to a genuinely equivalent page keeps far more than a chain, a homepage redirect or a 404.