What a Redirect Is and Why It Matters
A WordPress redirect is an instruction that tells a browser or a search engine crawler that the page it asked for now lives at a different address. Instead of loading the old address, the visitor is sent onward to the new one, usually so quickly that they never notice the hop. Behind the scenes, the server answers the request with a status code in the 300 range and a header that names the destination, and the browser follows it.
To picture it, imagine a shop that moved to a new street. The old door is locked, but there is a clear sign that says the shop is now around the corner, with an arrow pointing the way. A redirect is that sign. Without it, a customer stands at a locked door, gives up, and leaves. With it, they walk the extra few steps and arrive where they wanted to be. On the web, the sign is instant and automatic, and it works for search engines just as well as it works for people.
Why redirects matter so much
Addresses change more often than most site owners expect. You rename a blog post to a clearer title, merge two thin pages into one strong page, retire a product line, move from an insecure address to a secure one, or shift your whole site to a new domain. Every one of those changes leaves an old address that people and search engines may still request. A redirect turns each of those old addresses from a dead end into a smooth handoff.
There are three payoffs worth naming. First, visitor experience: nobody lands on a not found page, so you keep the click you already earned. Second, search value: a permanent redirect passes most of the ranking strength the old page built up to the new page, so you do not start from zero. Third, cleanliness: search engines slowly drop the old address from their index and settle on the new one, which keeps your reports tidy and your crawl budget focused. Skip the redirect and you lose all three at once.
Where redirects fit alongside other fixes
Redirects are close cousins of the work you do when you clean up broken links. If a page still exists but the address is wrong, a redirect points to the right place. If a page is gone for good with no replacement, sometimes the honest answer is to let it return a clean not found response rather than force a redirect to something unrelated. Knowing which situation you are in is half the skill, and the rest of this guide will help you decide quickly. Redirects also pair naturally with performance work, because every extra hop adds a little delay, which is one reason the WordPress caching guide and this guide reinforce each other.
Redirect Types: 301, 302, 307, 308, 410
Not all redirects are the same. The status code you choose changes how browsers cache the redirect and how search engines treat the move. Pick the wrong one and you can either keep a dead page alive in search results or fail to pass the ranking value you meant to pass. The good news is that day to day you only need two of them, and the rest are easy to understand once you see them side by side.
The two you will use most
A 301 is a permanent redirect. It says the content has moved for good and the old address should be forgotten in favour of the new one. Search engines pass the bulk of the old page ranking value to the new page and, over time, swap the old address for the new one in their index. For renamed slugs, merged pages, moved sections, and migrations, the 301 is the default and correct choice.
A 302 is a temporary redirect. It says the move is short term and the old address should be kept, because you intend to bring the original page back. Because the move is temporary, search engines generally keep indexing the old address and do not transfer ranking value the same way a 301 does. Use a 302 only when you genuinely plan to restore the original page, such as during a short promotion or a brief maintenance window.
The three you will meet less often
A 307 is the strict temporary redirect defined by the modern HTTP standard. Its key promise is that the request method is preserved, so a form submission sent with a POST stays a POST rather than quietly turning into a GET. For ordinary page moves this detail rarely matters, but it becomes important for applications and forms, which is why some server level rules use 307 for secure connections.
A 308 is the strict permanent version of the same idea. It behaves like a 301 in that it is permanent and passes value, but like a 307 it preserves the request method. You will see 308 more in application and API contexts than in everyday content moves, but it is worth recognising when you read a server configuration.
A 410 is not a redirect at all, and that is exactly why it belongs here. A 410 means Gone. It tells search engines that the content was removed on purpose and is not coming back, which prompts them to drop it faster than a plain not found response would. When you deliberately retire a page with no suitable replacement, a 410 is often cleaner than forcing a redirect to a loosely related page.
| Code | Meaning | Permanent | Passes ranking value | When to use it |
|---|---|---|---|---|
| 301 | Moved permanently | Yes | Yes, most of it | Renamed slug, merged pages, moved section, migration. The default. |
| 302 | Found, temporary | No | Not the same way | Short term move where you will restore the original page. |
| 307 | Temporary, strict | No | Not the same way | Temporary move that must keep the request method, such as a form POST. |
| 308 | Permanent, strict | Yes | Yes | Permanent move that must keep the request method, common for apps and APIs. |
| 410 | Gone | Yes, removal | No, it removes | Content retired on purpose with no replacement. |
Plugins vs Editing Server Files
There are two broad ways to set up a WordPress redirect. You can use a plugin that manages redirects from inside the dashboard, or you can write the rule directly into your server configuration, which means the Apache .htaccess file or an Nginx server block. Both get the visitor to the right place. They differ in where the rule lives, how fast it runs, and how easy it is to manage over time.
The plugin route
A redirect plugin stores your rules in the WordPress database and applies them as WordPress loads. This is the friendliest option for most site owners. You never touch a server file, you get a clean interface with a list of every redirect, most plugins log the not found requests that visitors trigger so you can spot addresses that need attention, and you can undo a mistake with a click. The trade off is a small one: because the redirect runs after WordPress starts loading, it is a touch slower than a rule that runs at the server, and a broken database or a plugin conflict can affect it.
The server route
A server level redirect runs before WordPress even wakes up. Apache reads the rule from .htaccess on each request, and Nginx reads it from the site configuration. Because the rule fires so early, it is the fastest option and it keeps working even if WordPress itself is unavailable. That speed and reliability is why large sites and migrations often live at the server level. The catch is that these files are powerful and unforgiving. One misplaced character in an Nginx block can take the whole site offline until you fix it, and .htaccess rules can conflict with the block WordPress manages. Server edits also require file or shell access that many managed hosts restrict.
| Factor | Redirect plugin | Server level (.htaccess or Nginx) |
|---|---|---|
| Where the rule lives | WordPress database | .htaccess file or Nginx config |
| Skill needed | Low, dashboard only | Higher, careful file editing |
| Speed | Runs after WordPress loads | Fastest, runs before WordPress |
| Logging and undo | Built in, easy to reverse | None built in, edit by hand |
| Works if WordPress is down | No | Yes |
| Best for | Everyday moves, small to medium lists | Site wide rules, migrations, high traffic |
| Main risk | Plugin conflict or DB issue | A typo can break the whole site |
For most people the plugin route is the right starting point, and you can always graduate a stable, long lived rule to the server later. If you are unsure which fits your setup, our WordPress services team is happy to advise, and a quick review is free.
Adding a 301 With the Redirection Plugin
The free Redirection plugin is the most popular way to manage redirects in WordPress, and for good reason. It handles single redirects and bulk imports, it logs every not found request so you can find addresses that need a redirect, and it groups rules so a large site stays organised. Here is how to add a single 301, which covers the most common case of a renamed or moved page.
Step by step
- In your dashboard, go to Plugins, then Add New, search for Redirection, and install and activate it.
- Open Tools, then Redirection. The first time, complete the short setup wizard, which asks a few questions and prepares the database tables.
- On the Redirects screen, find the Add new redirection form near the bottom.
- In Source URL, enter the old address as a path, for example
/old-service-page. You do not need the full domain. - In Target URL, enter the new address, for example
/services/new-service-page. - Open the small gear or settings icon if you want to set the type. Leave it as 301 Moved Permanently for a permanent move.
- Click Add Redirect. The rule appears in the list straight away and is live immediately.
- Test it in a private browser window by visiting the old address. You should land on the new page with the address in the bar updating to the new one.
That is the whole flow. The plugin approach is reversible, so if you make a mistake you can edit or delete the rule from the same list. Because it logs traffic, the plugin doubles as a discovery tool: the 404s tab shows addresses that visitors requested and could not find, which is a ready made list of pages that may need a redirect.
Matching patterns and query strings
Redirection can match a single exact address or a pattern. For a one off move, an exact match is simplest and safest. When you need to move a whole group of addresses that share a shape, you can switch the source to a regular expression and capture part of the old path to reuse in the target. Regular expressions are powerful and easy to get wrong, so test each one on a staging copy before you trust it on a busy site. A pattern that is slightly too greedy can catch addresses you never meant to touch.
A note on order and precedence
When you have many rules, order matters. Redirection checks rules in sequence, so a broad pattern placed above a specific rule can swallow the request before the specific rule ever runs. Keep exact, specific redirects near the top and broad patterns lower down, and give each rule a quick test after you add it. This habit prevents the confusing situation where a redirect seems to point at the wrong place because a different rule caught it first.
Redirects in Yoast Premium and Rank Math
If you already use an SEO plugin, you may not need a separate redirect tool at all. Both Yoast and Rank Math include redirect managers, and they add a feature the standalone plugins cannot: they can offer to create a redirect automatically the moment you change a slug or delete a post, which closes the single most common gap that produces broken links.
Yoast SEO Premium
The redirect manager in Yoast is part of the paid Premium tier. Its standout behaviour is the prompt. When you change the slug of a published post or move it to the trash, Yoast notices and asks whether you want to create a redirect from the old address to the new one, or to the page of your choice. Say yes and the redirect is made for you, which means you never forget the step at the exact moment it is easiest to forget. You can also open the redirect manager under the SEO menu to add, edit, and remove redirects by hand, and choose the type for each.
Rank Math
Rank Math includes a redirect module in its free tier, which many site owners appreciate. Enable the Redirections module from the Rank Math dashboard, then open Redirections to add a rule. You choose the source, the destination, and the redirect type, including 301, 302, 307, and 410, and you can match by exact address, by a contains rule, or by a regular expression. Like Yoast, Rank Math can prompt you to set up a redirect when you delete a post, so the gap between removing content and covering its old address stays small.
Which one to pick
If you already run one of these plugins for your titles and meta descriptions, using its built in redirect manager keeps everything in one place and avoids a second plugin. If you do not run an SEO plugin, or you want the richest logging and import tools, the standalone Redirection plugin is a fine choice. There is no wrong answer here, and mixing tools is the main thing to avoid: pick one home for your redirects so two systems never fight over the same address. For a store that constantly retires and renames products, choosing this early saves real cleanup later, a point we return to in the guide to building a WooCommerce store.
Manual Redirects in .htaccess and Nginx
Sometimes the right place for a redirect is the server itself. Site wide rules such as forcing a secure connection, or a permanent domain change, belong here because they are fast, reliable, and apply to every request before WordPress loads. This section shows the core patterns for both Apache and Nginx. Always back up the file first and, on Nginx, test the configuration before you reload it.
Apache .htaccess
On Apache, redirects live in the .htaccess file in your site root, the same file that holds the WordPress rewrite block. Keep your custom rules outside the block marked by the WordPress comment lines, so WordPress does not overwrite them. For a single page, the simplest form is a Redirect line.
# A single permanent redirect
Redirect 301 /old-page /new-page
# Redirect an old path to a full new address
Redirect 301 /retired-service https://example.com/services/current-service
For pattern based rules you use mod_rewrite, which gives you the power to match many addresses at once. The block below forces every request onto HTTPS, then forces the non www version of the domain. Read it from the conditions down: if the connection is not secure, rewrite it to the secure address, and if the host starts with www, rewrite it to the bare domain.
<IfModule mod_rewrite.c>
RewriteEngine On
# Force HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
</IfModule>
The R=301 flag sets the status code, and L means stop processing further rules once this one matches. Place these rules above the WordPress block so they run first. After saving, load your site over the insecure address and confirm it jumps to the secure one in a single hop.
Nginx
Nginx does not read .htaccess. Redirects live in the server block, and you apply them with a return directive for whole host rules or a rewrite directive for pattern based ones. A clean pattern is to keep a small server block whose only job is to catch the addresses you want to move and return a permanent redirect to the canonical one.
# Redirect HTTP and www to the canonical HTTPS non-www host
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
# A single page redirect inside the main server block
location = /old-page {
return 301 /new-page;
}
The $request_uri variable keeps the rest of the path and query string intact, so a deep link like /blog/post?ref=news lands on the matching deep address rather than the homepage. After editing, test the configuration with sudo nginx -t so a typo cannot take the site down, then apply it with sudo systemctl reload nginx. Because Nginx changes usually need server access, people on managed hosting often ask their host or developer to add these rules. If your stack is managed for you and you want these rules set up safely, you can request a free quote and we will handle it.
Common Redirect Scenarios
Most redirects fall into a handful of familiar situations. Recognising which one you are in tells you the type to use and where to put the rule. Here are the ones that come up again and again on real sites.
Renamed slug
You publish a post at one slug, then rename it for clarity. The old slug still has links from search results and other sites, so add a 301 from the old slug to the new one at the moment you rename. If you use Yoast Premium or Rank Math, let the prompt create it for you so the step never gets skipped.
Moved or merged page
You combine two overlapping pages into one stronger page, or move a page into a new section. Point the retired addresses at the surviving page with a 301. Send each old address to the closest match, not to a generic hub, so both visitors and search engines land somewhere relevant.
HTTP to HTTPS
After installing an SSL certificate, every insecure address should redirect to its secure twin. This is a site wide rule and belongs at the server level for speed, using the Apache or Nginx patterns above. Getting this right also removes the duplicate address problem where the same page is reachable at two protocols.
www vs non www
A site should answer at one canonical host, either with www or without, and redirect the other. Pick one, set it as your WordPress address, and add a permanent redirect from the other so links, shares, and old bookmarks all consolidate onto a single version. Splitting traffic across both hosts weakens your signals for no benefit.
Trailing slash
Servers can treat /page and /page/ as two different addresses. WordPress usually settles on one form for you, but custom setups can leave both live. Choose one style and redirect the other so you do not create duplicate addresses that dilute ranking value.
After a migration
Moving to a new domain or restructuring a site produces the largest batch of redirects. Every old address that changed needs a rule to its new home, ideally as a single set of 301s applied in one pass. This is where a redirect map, covered next, earns its keep. Our maintenance guide explains how ongoing care keeps these rules healthy after the move.
Retiring products
An online store constantly discontinues products. When a product goes for good, decide between a 301 to the nearest category or a similar product, and a 410 when nothing suitable remains. A redirect keeps the visit alive; a 410 tells search engines the item is gone. Both are better than a silent not found page.
Bulk Redirects and Importing a Redirect Map
Adding redirects one at a time is fine for a handful of moves. For a migration or a big restructure, you need a redirect map: a simple two column list that pairs each old address with its new destination. Building the map carefully up front turns a stressful launch into a calm, checkable process.
Build the map first
Start with a full list of your current addresses. You can gather these from your sitemap, from a crawl of the live site, and from the top pages in your search analytics so you never miss a page that actually earns traffic. Put each old address in one column. In the next column, write the best new destination for it. Where a page maps cleanly to a new one, the pairing is obvious. Where content was merged or removed, decide deliberately between the nearest live page and a clean removal. The goal is that every old address that matters has a thought out destination before you flip the switch.
What a redirect map looks like
old_url,new_url
/services/old-name,/services/new-name
/2019/06/old-post-title,/blog/new-post-title
/shop/discontinued-item,/shop/category/replacement
/about-old,/about
/promo-temporary,/
Keep the map as a spreadsheet or a CSV so it is easy to review, sort, and hand to whoever does the import. A tidy map is also a record you will be grateful for months later, because it explains why each redirect exists.
Import it
The Redirection plugin can import a CSV of source and target pairs from its Import/Export screen, which creates all the rules in one action. Rank Math and Yoast Premium offer similar import features. For very large sites, or when you want the speed of server level rules, a developer can translate the same map into a batch of Apache or Nginx directives. Whichever path you choose, import into a staging copy first, spot check a sample of the redirects, and only then apply the map to the live site.
Verify after import
- Spot check a sample of old addresses across different sections and confirm each lands on the right page in a single hop.
- Check high traffic pages from your analytics first, since those affect the most visitors and the most search value.
- Watch for chains, which happen when an old address points to another old address that was itself moved. Point every source at the final destination.
- Re-crawl the site after go live and confirm the not found count falls rather than climbs.
A migration is the moment redirects matter most and the moment they are easiest to get wrong at scale. If you would rather not build and test a large map yourself, this is exactly the kind of job our team does in one clean pass, and you can get a free quote for it.
Redirect Chains and Loops to Avoid
Two specific mistakes turn helpful redirects into harmful ones. Both are easy to create by accident over the life of a site, and both are easy to prevent once you know what to look for.
Redirect chains
A chain happens when one redirect points to another redirect. Address A sends the visitor to B, and B sends them on to C. Each hop adds a little delay, and search engines can pass a little less value through each step, so a long chain both slows the page and weakens the move. Chains creep in naturally: you redirect A to B this year, then move B to C next year and forget that A still points at B. The fix is to always point the original source at the final destination, so A goes straight to C, and to revisit old rules whenever you move a page that other rules already target.
Redirect loops
A loop is worse because it never resolves. A points to B and B points back to A, so the browser bounces between them until it gives up and shows an error, often reported as too many redirects. Loops usually come from conflicting rules: a plugin redirect and a server rule that disagree, or an HTTPS rule fighting a www rule that was written in the wrong order. When you see a too many redirects error, look for two systems trying to control the same address, and make sure only one of them wins.
How to stay clean
Three habits keep chains and loops away. Always point a source at the final destination, not at an intermediate address. Keep all your redirects in one place so two systems never argue over the same address. And after any move, test the affected addresses and confirm each resolves to its destination in a single hop. A redirect checker tool, or your browser developer tools with the network tab set to preserve the log, will show you the full sequence of hops so you can spot a chain instantly.
How Redirects Affect SEO and How to Test
Redirects are a core part of technical SEO because they decide what happens to the value a page earned when its address changes. Used well, they preserve rankings through a move. Used carelessly, they leak value, confuse crawlers, and slow the site. This section covers the SEO effects and the practical ways to test that a redirect does what you intended.
What redirects do for rankings
A permanent redirect passes most of the ranking strength of the old page to the new one, which is why a 301 is the tool of choice when content moves. That transfer is not always complete or instant, so it is normal for rankings to wobble briefly after a big move before settling. A temporary redirect does not pass value the same way, which is exactly why you reserve a 302 for genuinely temporary situations. Sending many old addresses to a single unrelated page, such as pointing everything at the homepage, can be read as a soft not found and wastes the value you hoped to keep. Match each old address to the most relevant live page instead.
Speed and crawl budget
Every redirect adds a small delay because the browser makes an extra request before it reaches the real page. One hop is nothing to worry about, but chains of hops add up and drag on the experience, especially on mobile connections. Crawlers also spend effort following redirects, so a site riddled with unnecessary hops uses more crawl budget on plumbing and less on real content. Keeping redirects direct and pruning ones you no longer need is a quiet performance win, and it pairs naturally with the broader advice in our guide on how to speed up a WordPress website.
How to test a redirect
Never trust a redirect you have not tested. There are several quick ways to confirm one works.
- Private browser window. Visit the old address in an incognito or private window so no cache or login interferes. Confirm you land on the intended page and the address updates.
- Developer tools network tab. Open the tools, switch to the network tab, enable preserve log, and load the old address. The request list shows each hop and its status code, so you can confirm a single 301 rather than a chain.
- A redirect checker tool. Online header checkers show the exact status code and destination for any address, which is handy when you want to confirm a 301 versus a 302 without opening developer tools.
- Command line. If you are comfortable in a terminal, a header request confirms the code and destination quickly. The command below prints the response headers so you can read the status line and the location.
# Show the response headers, following redirects
curl -sSL -D - https://example.com/old-page -o /dev/null
Whatever method you use, the checklist is the same. Confirm the status code is the one you intended, confirm the destination is the right page, and confirm it takes a single hop. After a large change, re-crawl the site and watch your search console reports to be sure the not found count drops and the new addresses are being indexed. That before and after habit is what turns redirects from a source of anxiety into a routine, reliable tool.
When to Hand It to a Developer
Most redirects are well within reach of a confident site owner, and this guide gives you everything you need for the everyday cases. There are still moments where handing the work to a developer saves time, protects your rankings, and removes real risk. Knowing where that line sits is part of doing the job well.
Signs it is time to get help
- A large migration. Moving to a new domain or restructuring hundreds of addresses means building, testing, and importing a full redirect map, then verifying it under load. The stakes and the volume both favour experienced hands.
- Server level rules on managed hosting. If forcing HTTPS, consolidating www, or fixing trailing slashes needs Nginx changes you cannot safely make, a developer can implement and test them without risking downtime.
- A too many redirects error you cannot trace. Loops that come from conflicting plugin and server rules can be tricky to untangle. A developer can find the two systems fighting and settle it cleanly.
- Regular expression rules at scale. Pattern based redirects across a big site are powerful and easy to get subtly wrong. Testing them properly on staging takes care and tooling.
- Performance already suffering. If chains have piled up over years, a developer can audit every rule, flatten the chains, and remove the dead weight in one pass.
What good redirect work looks like
When a developer handles your redirects, you should expect a clear redirect map you can read, every rule pointing straight at its final destination, a single home for all redirects so nothing conflicts, tests on a staging copy before go live, and a check of your reports afterward to confirm the not found count falls and the new pages get indexed. You should also come away owning the map and the rules, with no lock in, so you or anyone you choose can maintain them later.
Getting started
Whether you set up a single 301 from your dashboard or you are staring at a migration with a thousand old addresses, the principles in this guide hold: choose the right type, keep every rule direct, keep them all in one place, and test before you trust. Do that and redirects become a quiet, dependable part of running your site rather than a source of broken links and lost rankings. When the job is bigger than you want to take on, our team maps and implements redirects for WordPress sites every week, and getting a plan is free. You can get a free quote and we will make sure every old address lands exactly where it should.