You changed a page slug, deleted an old service page, or moved your blog from /blog/ to /news/ — and now the old URL returns a 404. Every visitor and search link pointing there hits a dead end. Learning how to add 301 redirects in WordPress fixes that in minutes: a 301 redirect tells browsers and Google that a page has moved permanently, and sends everyone to the new address automatically.
This guide covers four ways — Rank Math, the Redirection plugin, .htaccess, and NGINX — so you can pick the method that fits your setup. The first two need no code at all.
What Is a 301 Redirect (and When Do You Need One?)
When someone requests the old URL, the server answers with a 301 status and the new address, and the visitor is sent there automatically. Google treats a 301 as a permanent move and passes ranking signals from the old URL to the new one, which is why it is the correct choice when you add 301 redirects in WordPress after a page has genuinely moved.
You need a 301 redirect whenever:
- You change a post or page slug, even by one word.
- You delete a page that other sites still link to.
- You restructure your site — for example, moving posts from /blog/ to /news/.
- You merge two pages into one stronger page.
- You move to HTTPS, change your domain, or switch between www and non-www.
Do not use a 301 for a temporary change — a seasonal offer or a product briefly out of stock deserves a 302 instead. A 301 tells Google to forget the old URL, so undoing one later takes time to recover from.
Before You Start: Two Rules That Save You Headaches
Rule 1: back up first. A wrong redirect can lock you out of your own admin area. If you have never made a backup, read my guide on how to back up your WordPress site first.
Rule 2: redirect to the closest matching page. Sending every deleted URL to your homepage looks like a soft 404 to Google. An old pricing page should point at the new pricing page, and only genuinely unmatched URLs at a relevant category page or a custom 404 page that helps visitors find their way.
Method 1: Add 301 Redirects with Rank Math (Free)
If you already run Rank Math — this site does — this is the fastest way to add 301 redirects in WordPress, because nothing extra needs installing. The Redirections module is included in the free version and supports 301, 302, 307, 410, and 451 status codes. One quirk: Rank Math needs Advanced mode before the module appears, and it will not redirect the homepage — doing so would lock you out of your site.
- In your WordPress dashboard, go to Rank Math SEO > Dashboard and switch on Advanced Mode.
- On the same dashboard, find the Redirections module and enable it. Enable the 404 Monitor too — it logs URLs returning a 404, so you know which need redirects.
- Go to Rank Math SEO > Redirections and click Add New.
- In Source URLs, enter the old path, for example
/old-services/— relative, not the full domain. - In Destination URL, enter the new address, for example
/services/. - Leave the type set to 301 Permanent Move and the match to Exact Match, then click Add Redirection.
- Test the old URL in a private window — it should land on the new page.
Rank Math also creates redirects automatically when you change a post slug — check the list after renaming a post. My Rank Math setup guide covers the full configuration.
Method 2: Add 301 Redirects with the Redirection Plugin
Without Rank Math, the Redirection plugin by John Godley is the standard choice. It is completely free, has over 2 million active installs, and version 5.10.1 (September 2026) is tested up to WordPress 7.1.5. It also logs 404 errors, supports regular expressions, and imports and exports redirects as CSV files.
- Go to Plugins > Add New, search for “Redirection,” install it, and activate it.
- On first launch it runs a short setup — accept the defaults.
- Go to Tools > Redirection and click Add New.
- In Source URL, enter the old path, for example
/old-pricing/. - In Target URL, enter the new address, for example
/pricing/. - Click Add Redirect — the plugin defaults to a 301.
- Open the 404s tab: any URL that keeps appearing there still needs a redirect — start with the most-visited.
For bulk work, import a CSV of source and target columns in one go — the practical way to handle a restructure with dozens of moved pages.
Method 3: Add 301 Redirects in .htaccess (No Plugin)
On an Apache server, add redirects directly to the .htaccess file in your site’s root folder, via FTP or your host’s file manager. It fires before WordPress loads, so it is slightly faster than a plugin — but a typo can take your whole site down, so back up the file first.
To redirect a single page, add this line above the # BEGIN WordPress block:
Redirect 301 /old-services/ https://example.com/services/
Replace example.com with your own domain.
To redirect a whole folder to a new folder, use mod_rewrite instead:
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^blog/(.*)$ /news/$1 [R=301,L] </IfModule>
This sends every URL under /blog/ to the same path under /news/. R=301 sets the status; L stops further rules.
Never edit .htaccess inside the WordPress block markers — WordPress overwrites that section — and never use it on NGINX, where .htaccess is ignored entirely.
Method 4: Redirects on NGINX
On NGINX, redirects live in the server block of your site’s configuration file, reached through your host’s control panel or their support team. The syntax is short:
rewrite ^/old-page/$ https://example.com/new-page/ permanent;
The word permanent is NGINX’s way of saying 301. After saving, reload NGINX — most managed hosts do this when you save. If your host gives you no server access, use Method 1 or 2 instead.
How to Test Your Redirects
Test every redirect you create:
- Private browser window: open the old URL and confirm you land on the new page. A private window stops your browser cache showing a stale result.
- curl: run
curl -I https://example.com/old-page/— the response should showHTTP/2 301and alocation:header with the new URL. - An online checker like httpstatus.io shows the full redirect chain.
- Search Console: after a few days, check the Pages report. The old URLs should stop appearing as errors.
5 Mistakes That Break Redirects
1. Redirect chains. Page A redirects to B, and B redirects to C. Every extra hop slows the page down and dilutes the ranking signal. Point old URLs directly at their final destination.
2. Redirect loops. Page A redirects to B, and B redirects back to A. Browsers stop with a “too many redirects” error. If you see it, read my guide on how to fix a WordPress redirect loop.
3. Redirecting to a 404. A redirect that points at a deleted page just moves the dead end. Test the destination URL before saving the rule.
4. Redirecting everything to the homepage. Google treats mass homepage redirects as soft 404s, and visitors who wanted a specific page will leave. Redirect each URL to its closest living equivalent.
5. Using 302 for a permanent move. A 302 tells Google the old page will return, so it keeps the old URL indexed. If the move is permanent, use a 301.
Frequently Asked Questions
Do 301 redirects hurt SEO?
No — a correct 301 protects your SEO, passing ranking signals to the new URL. What hurts is not redirecting at all and letting old URLs return 404s. If you are seeing 404s in Search Console, my guide on fixing WordPress 404 errors explains how to track them down.
Can I redirect without a plugin?
Yes — .htaccess on Apache, a rewrite rule on NGINX, or a small snippet using WordPress’s own wp_redirect() function. The snippet below redirects one page; put it in a code-snippet plugin such as WPCode, not directly in your theme files, so a theme update cannot wipe it out:
add_action( 'template_redirect', function() {
if ( is_page( 'old-services' ) ) {
wp_safe_redirect( home_url( '/services/' ), 301 );
exit;
}
} );
For anything beyond a handful of one-off redirects, a plugin is easier to manage and safer to hand over to someone else later.
Wrapping Up
When you add 301 redirects in WordPress, the job takes about ten minutes once you know the method: Rank Math if you already run it, the Redirection plugin if you want a dedicated free tool, .htaccess on Apache, or a rewrite rule on NGINX. What matters most: redirect to the closest matching page, avoid chains and loops, use 301 only for permanent moves, and test every rule.
If your site has broken links or a restructure you keep putting off, I can sort it out — see my services or get in touch and I will map the redirects and fix the structure properly.