WordPress

How to Redirect a Page in WordPress (301 Redirects)

How to set up a 301 redirect in WordPress with a plugin, .htaccess or your AI, which redirect code to use, and how to find and fix the 404s worth redirecting.

By wptaskify TeamUpdated Oct 16, 20269 min read
How to Redirect a Page in WordPress (301 Redirects)

Quick answer

To redirect a page in WordPress, install a redirect plugin such as Redirection, go to Tools, then Redirection, enter the old path as the Source URL and the new page as the Target URL, and save it as a 301 (permanent) redirect. Use a 301 whenever a page has moved for good, so visitors and search engines land on the new address and the old page's rankings carry over.

What a redirect does, and when you need one

A redirect sends anyone who opens an old URL to a new one, automatically. Without it, people following an old link, a bookmark or a Google result land on a 404 page, and the links other sites gave you stop counting for anything.

You need a redirect when you:

  • change a page's slug (its address),
  • merge two pages into one, or delete a page that has a close replacement,
  • restructure the site, for example moving services under /services/,
  • move to a new domain or from http to https.

301, 302, 307, 308 or 410: which one to use

For almost every WordPress job, the answer is 301. Use 302 only when the move really is temporary and the old page is coming back.

Table of redirect codes 301, 308, 302, 307 and 410 with what each tells browsers and Google and when to use it
The codes you will see in redirect plugins. 301 is the right choice for most moves.

What WordPress already does on its own

WordPress has one built-in redirect: when you change the slug of a published post, it remembers the old slug and sends visitors to the new address. It does not do this for pages, and it does not handle deleted content, merged pages or custom paths. That is why most sites need a redirect plugin.

Method 1: Redirect a page with the Redirection plugin

Redirection is free, has been around for years, and is the plugin we use in this guide. After installing it, run its short setup, then:

  1. Go to Tools, then Redirection.
  2. Under Add redirect, type the old path in Source URL, starting with a slash, for example /water-heater-installation/.
  3. Type the new page in Target URL. It suggests your pages as you type.
  4. Click Add redirect. The default is a 301.
Redirection plugin Add redirect form with Source URL /water-heater-installation/ and Target URL /services/water-heater-repair/
Adding a real redirect on our test site: an old path to the page that replaces it.

Your redirects, with hit counts

Every redirect shows up in one list with its code, how many times it has been used and when. The hit count tells you which old URLs still get traffic. A redirect that has had zero hits for a long time is usually safe to remove, but keep permanent redirects for at least a year, as Google recommends.

Redirection plugin list of four 301 redirects on the test site with hit counts and last access dates
The real redirects on our test site. The highlighted one was created automatically (see the next section).

Create redirects automatically when you change a slug

Redirection can watch your posts and pages and add a redirect every time a slug changes. Turn it on under Tools, then Redirection, then Options, then URL Monitor, and pick posts and pages.

On our test site we changed a post's slug from water-heater-signs to water-heater-warning-signs with Quick Edit. The plugin added the 301 from the old address to the new one by itself, in a group called Modified Posts. This matters most for pages, which WordPress does not redirect on its own.

WordPress Quick Edit with the slug changed to water-heater-warning-signs
Changing a slug in Quick Edit. With URL Monitor on, the redirect is created for you.

Find the 404s worth redirecting

Redirects are not only for pages you move yourself. Old links on other sites, typos and pages from a previous version of your site all end in 404 errors. Redirection keeps a log of them under Tools, then Redirection, then 404s.

Look for URLs that repeat. On our test site, /water-heater-installation/ was hit three times: real people looking for a page that does not exist, and we have a close match, so it gets a redirect. Not every 404 deserves one. Random paths from bots (/coupons/ here) can be ignored. Do not send every 404 to the home page: Google treats that like a 404 anyway, and visitors are confused.

Redirection 404 log listing missed URLs with /water-heater-installation/ appearing three times
The real 404 log. The repeated URL is the one worth redirecting.

Method 2: Redirect with .htaccess (no plugin)

On Apache and LiteSpeed hosting, you can add redirects to the .htaccess file in your site's root folder, above the # BEGIN WordPress block:

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

These run before WordPress loads, so they are fast. The downsides: one typo can take the whole site down with a 500 error, there are no hit counts, and nothing warns you about loops. Download a copy of the file first, and take a backup before editing it. On Nginx hosting there is no .htaccess; your host adds a return 301 rule to the server config.

Method 3: Ask your AI to fix 404s with redirects

If your site is connected to Claude or ChatGPT through wptaskify, you can hand this job over in one sentence. list_404_log reads the Redirection 404 log, create_redirect adds a 301 (or another code you name), and list_redirects and delete_redirect help clean up duplicates. These tools work through the Redirection plugin, so it needs to be installed, and creating redirects needs a paid plan. There is also a free redirect tool page.

Example conversation: the AI reads the 404 log and creates a 301 redirect for the URL that has a matching page
An example conversation using the real list_404_log and create_redirect tools, with the 404s from our test site.

How to check that a redirect works

Open the old URL in a private window: you should land on the new page. To see the code, use your browser's developer tools (Network tab) or any HTTP header checker, or run curl -I with the old URL. You want 301 Moved Permanently and a Location header with the new address.

curl -I output showing HTTP/1.1 301 Moved Permanently, X-Redirect-By: redirection and Location: /emergency-plumbing-24-7/
The real response for one of our test redirects.

Common redirect mistakes

  • Chains. A goes to B, B goes to C. Point A straight at C. Each extra hop slows visitors down.
  • Loops. A goes to B and B goes back to A. The browser shows "too many redirects". Usually two rules, or a plugin rule fighting an .htaccess rule.
  • 302 for a permanent move. Search engines keep the old URL. Switch it to 301.
  • Everything to the home page. Redirect to the closest matching page, or let the URL return 404 if nothing matches.
  • Internal links still pointing at old URLs. The redirect works, but update your menus and links so they point to the new address directly.

Redirects are one part of site health. See the WordPress SEO checklist for the rest.

Frequently asked questions

How do I redirect a page in WordPress without a plugin?

Add a line such as Redirect 301 /old-page/ https://example.com/new-page/ to the .htaccess file in your site's root, above the WordPress block. This works on Apache and LiteSpeed hosting. Back up the file first, because a mistake can break the site.

What is the best WordPress redirect plugin?

Redirection is free and covers most sites: 301s, a 404 log, hit counts and automatic redirects when slugs change. SEO plugins such as Rank Math and Yoast Premium also include a redirect manager. Use one, not several.

Does WordPress redirect automatically when I change a URL?

Only for posts. WordPress remembers a post's old slug and redirects it. It does not do this for pages. A plugin like Redirection with URL Monitor turned on covers both.

Do 301 redirects hurt SEO?

No. A 301 to a relevant page passes the old page's signals to the new one. Problems come from redirect chains, loops, and sending unrelated pages to the home page.

How long should I keep a 301 redirect?

At least a year, as Google recommends, and longer if the old URL still gets visits or has links from other sites.

Find your 404s and fix them with redirects, using your AIBring your own Claude or ChatGPT. Nothing goes live without your approval.
Get started free

Your AI is ready to work.

Connect WPTaskify and turn conversations into real actions.

Start Free