Skip to content

How to Redirect a WordPress Page to Another URL (2026): 3 Methods

How to redirect a WordPress page the right way: the free Redirection plugin, a one-line .htaccess rule, or wp_redirect() in code, plus 301 vs 302 done right.

Sunny Kumar
Sunny Kumar5 min read
TL;DR

The easiest way to redirect a WordPress page is the free Redirection plugin: go to Tools, Redirection, enter the old URL and the new URL, choose 301 for a permanent move, and save. You can also add a one-line rule to .htaccess, or use wp_redirect() in code. Use a 301 for permanent moves so the page keeps its rankings, and a 302 only for genuinely temporary ones.

Move or delete a WordPress page and the old URL does not just vanish. People bookmarked it. Other sites link to it. Google still has it indexed.

Leave it to 404 and you throw away every bit of ranking that page earned.

A redirect fixes that. It sends anyone hitting the old URL straight to the new one, and tells Google to carry the page's value across with it.

I set these up on client sites all the time, in a plugin and by hand.

Three methods work. Only one decision actually moves your rankings: 301 or 302.

301 vs 302: pick this first

Before you touch anything, decide which redirect you need.

This is the one people get wrong, and it is the one that costs rankings.

TypeUse it whenWhat it does to SEO
301 (Permanent)The page moved for good: renamed slug, deleted page, domain movePasses the old page's ranking to the new URL
302 (Temporary)A genuinely short-term change: maintenance, an A/B testKeeps the old URL indexed, passes little to none

The rule of thumb is simple. Permanent move? Always 301. A 301 tells Google to transfer the page's authority to the new URL, per Google's own redirect guidance.

Using a 302 for a permanent move is the most common redirect mistake I see. Google keeps the old URL in the index, the new one struggles to rank, and the equity sits in limbo.

When in doubt, it is a 301.

The three methods at a glance

MethodDifficultyBest for
1. Redirection pluginEasyAlmost everyone
2. .htaccess ruleMediumNo-plugin Apache sites
3. wp_redirect() in codeHardDevelopers, one or two redirects

Method 1

The Redirection plugin (easiest)

Best for: Almost every site. Free, no code, and it logs hits so you can confirm the redirect works.

This is what I reach for first. Redirection by John Godley is the most-used WordPress redirect tool, free, with over 2 million active installations. It handles 301s and 302s, tracks 404s, and needs no knowledge of Apache or Nginx.

4.4/52,000,000+ installsFreeTested to 7.0on WordPress.org

How to set up a redirect

  1. Go to Plugins → Add New, search Redirection, then install and activate it.
  2. Open Tools → Redirection and run the quick setup wizard once.
  3. On the Redirects screen, enter the old path in Source URL and the new one in Target URL.
  4. Click Show advanced options, set HTTP code to 301 - Moved Permanently (or 302 for a temporary move), and click Add Redirect.
The Redirection plugin Add new redirection form in WordPress, with a source URL of /old-page, target of /new-page, and the HTTP code set to 301 Moved Permanently
The Redirection plugin's Add Redirect form in a live WordPress install: old URL in, new URL out, 301 selected. The plugin then logs every hit so you can confirm it fires.

That is it, the redirect is live. The plugin logs every hit, so you can prove it is firing instead of hoping.

Tip

Already running Rank Math or Yoast?

You may not need a separate plugin. Rank Math has a built-in redirect manager at Rank Math → Redirections, and Yoast SEO Premium includes one too. Same 301/302 setup, one less plugin to install.

Get the Redirection plugin →

Method 2

The .htaccess file (no plugin)

Best for: Apache sites where you would rather not add another plugin.

If you prefer not to install a plugin, you can add redirects straight to your .htaccess file. This works on Apache, which covers most shared hosting.

Open .htaccess in your site root (via your host's file manager or FTP) and add this above the # BEGIN WordPress block:

apache
Redirect 301 /old-page/ https://yoursite.com/new-page/

Replace the old path and the full destination URL with your own. For a same-domain move you can shorten the target to a path:

apache
Redirect 301 /articles/ /blog/
Warning

Back up first

One syntax error in .htaccess can take your whole site offline with a 500 error. Download a copy before you edit, so you can restore it in seconds if something breaks. This method is Apache-only, on Nginx you add a rewrite rule to the server config instead.

Method 3

wp_redirect() in code

Best for: Developers handling one or two redirects in a child theme or small plugin.

WordPress has a built-in wp_redirect() function you can call from your child theme's functions.php (or a small custom plugin):

php
add_action( 'template_redirect', function () {
    if ( is_page( 'old-page-slug' ) ) {
        wp_redirect( 'https://yoursite.com/new-page/', 301 );
        exit;
    }
} );

Swap old-page-slug for the page's slug and the URL for your destination. The 301 is the status code, and exit is essential, without it the page keeps loading.

This is fine for one or two redirects. Past a handful it gets hard to track, and a plugin is the better tool.

Which method should you choose?

For almost everyone, the Redirection plugin wins. It is free, it logs hits, and you never touch a server file.

Reach for .htaccess only if you are avoiding plugins and you are comfortable editing server files with a backup ready. Use wp_redirect() when you are a developer handling a redirect or two in code you already maintain.

Redirecting a whole site or your homepage

Two related jobs come up a lot.

Moving the whole domain. Send every old path to the same path on the new domain in one rule, so /about lands on /about, not the homepage. In .htaccess:

apache
RewriteEngine On
RewriteRule ^(.*)$ https://newsite.com/$1 [R=301,L]

Redirecting the homepage. Use the Redirection plugin with a source of / and your target URL, set to 301.

Either way, keep it to one hop, point each redirect straight at the final URL, not through another redirect, and update your internal links to match. The same rules apply when you are moving a blog between a subdomain and a subdirectory: map every URL one to one.

Common mistakes that cost rankings

Redirects are simple, but a few habits quietly leak SEO value. Treat this as a technical SEO job, not a one-click fix.

  • Using a 302 for a permanent move. The old URL stays indexed and the new one never fully ranks. Use a 301.
  • Redirect chains. Old → middle → new bleeds equity at every hop. Always redirect straight to the final URL.
  • Redirecting everything to the homepage. Sending unrelated dead pages to your homepage reads as a soft 404 to Google, which passes nothing. Redirect to the closest matching page, or let it 404 honestly.
  • Forgetting internal links. After a redirect, update the links inside your own site so they point to the new URL directly. If you are cleaning these up, our guide to fixing broken links walks through finding them.

Final take

A redirect is the difference between a moved page keeping its rankings and losing them.

The mechanics are easy. The decision is what matters.

For most sites, install the Redirection plugin, enter the old and new URLs, and pick 301. Reach for .htaccess or code only when you have a specific reason. And whatever you do: use a 301 for permanent moves, keep it one hop, and fix your internal links.

Migrating a site or cleaning up redirects?

A botched redirect map is one of the fastest ways to lose rankings in a move. Send us the site and we will map the 301s, kill the chains, and keep the equity where it belongs. The first reply comes from Sunny, not a sales team.

See technical SEO

Common questions

What is the easiest way to redirect a page in WordPress?

The free Redirection plugin. Install it, go to Tools, Redirection, enter the old URL as the source and the new URL as the target, choose 301, and click Add Redirect. No code, and it logs hits so you can confirm it works.

Should I use a 301 or 302 redirect?

Use a 301 for any permanent move, a renamed slug, a deleted page, or a migration, because it passes the old page's ranking to the new URL. Use a 302 only for genuinely temporary changes like maintenance or a short test, where you want the original URL to keep ranking.

How do I redirect a WordPress page without a plugin?

Add a rule to your .htaccess file on Apache: Redirect 301 /old-page/ https://yoursite.com/new-page/. Place it above the WordPress rules. Back up the file first, because one syntax error can take the whole site down. On Nginx you edit the server config instead.

Will redirecting a page hurt my SEO?

No, if you use a 301 for permanent moves. A 301 passes almost all of the old page's ranking value to the new URL. SEO damage comes from using a 302 by mistake, chaining several redirects, or redirecting old pages to an unrelated homepage, which Google treats as a soft 404.

How do I redirect my whole WordPress site to another URL?

For a full domain move, add a wildcard 301 in .htaccess that sends every path to the same path on the new domain, or use the Redirection plugin's Site option. Keep it one hop to the final URL, and update internal links so they point straight to the new domain.

Why is my WordPress redirect not working?

Common causes: a caching plugin or CDN serving the old version (clear both), a conflicting redirect in another plugin or .htaccess, or the rewrite rules needing a flush. Go to Settings, Permalinks and click Save once to rebuild them, then test in a private window.

Written by
Sunny Kumar
Sunny KumarSEO Specialist & product builder

SEO Specialist and product builder with 10+ years in search. The notes come from the work, not the theory.

Work with TheGuideX

Reading about it is the easy part.

Send us the site and the problem. Your first reply comes from Sunny Kumar — not a sales team — and tells you if it is a fit.