What Is a 301 Redirect? How It Works and When to Use One
A 301 redirect is a permanent instruction that sends visitors and search engines from one URL to another. When someone opens the old address, the server answers "this page has moved for good" and delivers the new page instead. If you have changed a page address, merged two pages, or moved to a new domain, a 301 redirect is usually the right tool.
In short: use a 301 when the move is permanent, point it at the most relevant new page, and keep it to a single hop. The rest of this guide explains how redirects work, when to choose 301 over 302, and the mistakes that quietly cost traffic.
What Is a 301 Redirect?
"301" is an HTTP status code. Every time a browser or search crawler requests a page, the server replies with a code. 200 means "here it is", 404 means "not found", and 301 means "moved permanently, look over there".
The visitor never sees the code. They type or click the old link and simply land on the new page. For search engines, the code carries meaning: the old URL has been replaced, so the new one should be the version that shows up in results.
Why 301 Redirects Matter for SEO
Without a redirect, an old URL that other sites link to becomes a dead end. Visitors see an error, and the value of those links has nowhere to go. A redirect solves three problems at once:
- Visitors: they reach useful content instead of an error page.
- Search engines: they learn which URL should replace the old one in results.
- Links and bookmarks: existing links from other sites keep working and keep pointing at something real.
Google's own documentation says permanent redirects signal that the target should become the canonical URL shown in search results. That makes the 301 one of the clearest signals you can send during a move.
301 vs 302: Which Redirect Should You Use?
The difference is intent. A 301 says "permanent". A 302 says "temporary". Google treats temporary redirects as a sign that the original page should stay in search results, so using the wrong one can leave the old URL showing for longer than you want.
| Redirect | Meaning | Use it when |
|---|---|---|
| 301 | Moved permanently | New URL, domain change, merged pages, HTTP to HTTPS |
| 308 | Permanent (strict) | Same as 301, and the request method must stay the same |
| 302 | Found (temporary) | Short-term change you plan to undo |
| 307 | Temporary (strict) | Temporary, and the request method must stay the same |
For most websites, the rule is simple: if the change will not be reversed, use 301. If you are testing something or running a short promotion, use 302.
When Should You Use a 301 Redirect?
These are the most common situations where a permanent redirect is the right answer:
- You changed a URL. Renaming
/services-oldto/services? Redirect the old one to the new one. Our guide to SEO-friendly URL structure covers how to choose addresses you will not need to change later. - You moved to a new domain. Redirect each old page to its matching page on the new domain, not everything to the homepage.
- You switched from HTTP to HTTPS. Every HTTP address should permanently redirect to its HTTPS version.
- You merged duplicate or overlapping pages. Redirect the weaker page to the stronger one.
- You deleted a page that has a close replacement. Send visitors to the nearest relevant page.
- You want one version of your address. Pick www or non-www and redirect the other.
When You Should Not Use a 301 Redirect
Redirects are not a cure-all. Skip the 301 in these cases:
- The page is gone and nothing replaces it. An honest 404 (or 410) page is better than redirecting to something unrelated.
- The change is temporary. Use a 302 or 307.
- You only need to tell Google which of two live pages to prefer. That is a job for a canonical tag. We compare the two in What Is a Canonical Tag?.
Redirecting every deleted page to the homepage is a common shortcut. It confuses visitors, who expected specific content, and search engines can treat it like a missing page anyway.
How to Set Up a 301 Redirect
Google recommends server-side redirects whenever possible because they are the most reliably understood. Your options depend on how your site is built.
On an Apache server
Add a line to your .htaccess file in the format Redirect 301 /old-page https://example.com/new-page. Back up the file first, because a typo can take down the whole site.
On an Nginx server
Add a return 301 rule in the server configuration that matches the old path and points to the full new address.
On WordPress
Most SEO plugins and dedicated redirect plugins have a redirect manager. Enter the old path and the new URL, choose 301, and save. Changing a post's address in WordPress often creates a redirect automatically, but check that it did.
On website builders
Platforms such as Wix, Squarespace, Shopify and Webflow include a redirects screen in settings. The steps differ, but the fields are always the same: old URL, new URL, and type.
Other methods
Google also reads a meta refresh with a zero-second delay as permanent, and JavaScript redirects as a last resort. Both are less reliable than a server-side redirect, because rendering can fail and the redirect may never be seen.
Redirect Chains and Loops
A redirect chain happens when page A redirects to B, and B redirects to C. A loop is worse: A sends you to B and B sends you back to A, so the page never loads.
Chains slow down loading and make debugging harder. The fix is easy. Whenever you add a redirect, point the old URL straight at the final destination, and update older redirects that now lead through an extra step. One hop is the goal.
Common 301 Redirect Mistakes
| Mistake | Why it hurts | Fix |
|---|---|---|
| Everything goes to the homepage | Visitors lose context | Redirect to the closest matching page |
| Using 302 for a permanent move | Old URL may stay in results | Switch to 301 |
| Redirect chains | Slower, harder to maintain | Point straight to the final URL |
| Internal links still use old URLs | Forces an unnecessary extra hop | Update links to the new address |
| Old URLs left in the sitemap | Sends mixed signals | List only final URLs |
That last point is easy to miss. After a move, your sitemap should contain only the new addresses. If you are unsure how to do that, see What Is an XML Sitemap?.
How to Test Your Redirects
Never assume a redirect works. Check it:
- Visit the old URL in a browser and confirm you land on the right page.
- Check the status code with your browser's developer tools (Network tab) or a free redirect checker. You want to see a 301 followed by a 200.
- Test several pages, not just one, especially after a large migration.
- Watch Search Console for new errors or "page with redirect" notices over the following weeks.
How Long Should You Keep a 301 Redirect?
Google's documentation does not give a fixed time. A sensible approach is to keep redirects in place for as long as the old URL still receives visits or has links pointing to it. In practice, that often means leaving them for the long term. They are small, cost almost nothing to keep, and removing them early risks recreating the dead ends you set out to fix.
Frequently Asked Questions
Does a 301 redirect hurt SEO?
A correctly set up 301 is a normal, supported part of running a website. Problems come from poor implementation, such as chains, loops, or sending pages to irrelevant destinations.
Is a 301 redirect permanent?
It tells search engines the move is permanent. You can technically change it later, but treat it as a long-term commitment.
What is the difference between a 301 and a canonical tag?
A 301 physically sends visitors to a different page. A canonical tag leaves both pages accessible and only hints which one search engines should prefer.
Will my rankings change after a redirect?
Search engines need time to recrawl and process the change, so some movement while they catch up is normal. Redirecting each page to its closest match gives the new URL the best chance of taking over smoothly.
Can I redirect without code?
Yes. Most website builders and WordPress plugins offer a simple redirect screen where you enter the old and new address.
Key Takeaways
A 301 redirect is the standard way to say "this page has moved permanently". Use it for permanent changes, send each old URL to its closest equivalent, keep it to one hop, update your internal links and sitemap, and test the result. Do that and a move stays almost invisible to visitors.
If you would rather have an expert check your redirects or plan a site move, you are welcome to get in touch.