Redirects look like a tiny technical detail until a site migration goes wrong. Choose the wrong status code and the old URL can linger in search results for months; build a chain of redirects and crawlers waste time hopping from URL to URL before reaching the real page.
The good news is that the choice between a 301 and a 302 is simple once you understand what each one tells search engines. In this guide you will learn how Google interprets every common redirect type in 2026, when to use a permanent or temporary redirect, how to implement them on Apache, Nginx and WordPress, and how to audit redirects you already have.
Key Takeaways
- A 301 (or 308) says “this URL has moved permanently”; a 302 (or 307) says “this is temporary, keep the original”.
- Google uses permanent redirects as a strong signal that the target should become canonical; temporary ones do not send that signal.
- Server-side redirects are best. Instant meta refresh is acceptable; JavaScript redirects are a last resort.
- Keep redirects for at least a year, and redirect straight to the final URL to avoid chains.
- Always redirect to the most relevant equivalent page, not blanket-redirect everything to the homepage.
What Is a Redirect?
A redirect is a server response that sends browsers and crawlers from one URL to another. Instead of returning the page with a 200 OK status, the server returns a 3xx status code plus a Location header naming the new address. Browsers follow it instantly, so most users never notice.
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/new-page/
For search engines, the status code carries meaning. It tells Google whether to replace the old URL in its index or keep the old one and treat the move as temporary.
301 vs 302: The Core Difference
Google's documentation is direct about how to pick one:
“Use permanent redirects when you're sure that the redirect won't be reverted.”
— Google Search Central, Redirects and Google Search
Under the hood, the difference is about canonicalisation. With a permanent redirect, Google's indexing pipeline uses the redirect as a signal that the target should be canonical. With a temporary redirect, it does not, so the original URL is more likely to stay in the index. Ranking signals are consolidated onto whichever URL Google chooses as canonical, which is why choosing correctly matters.
| Status / method | Meaning | How Google Search treats it | Typical use |
|---|---|---|---|
| 301 Moved Permanently | Permanent | Strong signal the target is canonical | URL changes, HTTPS move, domain migration, merging pages |
| 308 Permanent Redirect | Permanent, method preserved | Same as 301 | Permanent moves where POST must stay POST (APIs, forms) |
| 302 Found | Temporary | Not used as a canonical signal for the target | Short promotions, A/B tests, temporary maintenance pages |
| 307 Temporary Redirect | Temporary, method preserved | Same as 302 | Temporary moves where the request method must not change |
| 303 See Other | Temporary | Same as 302 | Sending a user to a confirmation page after a form POST |
| Instant meta refresh (0 s) | Permanent | Treated as permanent | When you cannot change server config |
| Delayed meta refresh (>0 s) | Temporary | Treated as temporary | Rarely recommended |
JavaScript location | Permanent | Treated as permanent if Google renders it | Last resort only |
One note on browsers: a 301 is cached aggressively by browsers. If you set one by mistake, some visitors' browsers may keep following it even after you remove it. That is another reason to reserve 301s for genuine permanent moves.
When to Use a 301 Redirect
- You change a page's URL slug or folder structure.
- You move from HTTP to HTTPS, or from non-www to www (or the reverse).
- You migrate to a new domain or rebrand.
- You merge two thin or overlapping articles into one stronger page, which is a common fix for keyword cannibalisation.
- You retire a product and have a close replacement or a highly relevant category page.
When to Use a 302 (or 307) Redirect
- A product is temporarily out of stock and you want to point users elsewhere for a few days.
- You are running a short seasonal campaign and will restore the original URL afterwards.
- You are testing a new page design and want the original URL to remain the indexed version.
- You send users to a location- or language-specific page based on their settings, while keeping the main URL as the canonical one.
The key question is simple: will the original URL come back? If yes, use a temporary redirect. If no, use a permanent one.
How to Implement Redirects: Step by Step
- Map old URLs to new ones. Build a spreadsheet with every old URL and its best-matching new URL. Prioritise pages with backlinks and organic traffic.
- Pick the right status code for each row using the table above.
- Implement server-side. Use your server or CMS (examples below) rather than JavaScript.
- Update internal links so they point directly at the new URLs instead of relying on redirects. Our guide to internal linking explains why this matters.
- Update canonicals, hreflang and the XML sitemap to list only final destination URLs. See our XML sitemap guide.
- Test every redirect with a crawler or
curl -Ito confirm one hop and the correct status code. - Monitor Search Console for crawl errors and indexing changes over the following weeks.
Apache (.htaccess)
# Single permanent redirect
Redirect 301 /old-page/ https://www.example.com/new-page/
# Temporary redirect
Redirect 302 /summer-sale/ https://www.example.com/offers/
Nginx
location = /old-page/ {
return 301 https://www.example.com/new-page/;
}
Meta refresh (when you cannot touch the server)
<meta http-equiv="refresh" content="0; url=https://www.example.com/new-page/">
On WordPress, a redirect plugin or the redirect manager in your SEO plugin handles this without editing server files. On Shopify, use the built-in URL redirects in the admin.
Redirect Chains and Loops
A chain happens when URL A redirects to B, which redirects to C. Chains usually build up over years of migrations. Google's crawlers follow up to 10 hops, but its site-move documentation advises redirecting straight to the final destination and, if that is impossible, keeping chains to ideally no more than three hops. Long chains also slow users down because each hop is a new request, which hurts page speed.
A loop happens when URLs redirect back to each other. Neither users nor crawlers ever reach a page, so loops must be fixed immediately.
How Long Should Redirects Stay in Place?
Google's site-move guidance says to keep redirects for as long as possible, generally at least one year, and from a user's perspective to consider keeping them indefinitely. Old URLs live on in backlinks, bookmarks and emails. Removing redirects too early turns those visits into 404 errors; our post on fixing 404 errors covers what to do if that has already happened.
Common Mistakes With Redirects
| Mistake | Why it hurts | Fix |
|---|---|---|
| Using 302 for a permanent migration | Old URLs may remain indexed longer | Switch to 301 or 308 |
| Redirecting everything to the homepage | Google may treat irrelevant redirects as soft 404s | Redirect to the closest relevant page, or return 404/410 |
| Redirect chains after repeated migrations | Wasted crawl requests and slower page loads | Point every old URL directly at the final URL |
| Leaving internal links pointing at redirected URLs | Unnecessary hops for users and bots | Update links in menus, content and templates |
| Removing redirects after a few weeks | Lost backlink value and broken user journeys | Keep for at least a year, ideally permanently |
| Relying on JavaScript redirects | Google may not see them if rendering fails | Use server-side redirects |
How to Audit Your Existing Redirects
Run a full crawl with a tool such as Screaming Frog, Sitebulb or Semrush Site Audit and filter for 3xx responses. Look for temporary redirects that have been live for months, chains, loops and internal links pointing at redirects. Then cross-check Search Console's Page indexing report for “Page with redirect” to see which URLs Google has dropped in favour of their targets. A redirect review is a core part of every SEO audit.
Related Guides
- 404 Errors: How to Find and Fix Broken Pages
- Duplicate Content in SEO: Causes and Fixes
- Hreflang Tags: A Guide to International SEO
Frequently Asked Questions
Does a 302 redirect lose link equity?
Not in the way older SEO advice suggested. The real difference is canonicalisation: Google treats a 301 as a strong signal that the target should be the canonical URL, while a 302 does not send that signal, so the old URL may stay indexed.
What happens if I use a 302 for a permanent move?
Google may keep showing the old URL in search for longer. If the redirect stays in place for a long time, Google can eventually treat it like a permanent one, but using a 301 from the start is clearer and faster.
What is the difference between 301 and 308?
Both are permanent and Google treats them the same way. A 308 guarantees the request method (such as POST) is preserved, which matters for APIs and forms, while browsers may change POST to GET on a 301.
How long should I keep a 301 redirect?
Google recommends keeping redirects for as long as possible, generally at least one year. For URLs with backlinks or bookmarks, keeping them indefinitely is the safest choice.
Are JavaScript redirects bad for SEO?
They are a last resort. Google can follow them only if it renders the page successfully, so use server-side redirects or an instant meta refresh when you can.
How many redirects in a chain will Google follow?
Google's crawlers follow up to 10 redirect hops by default, but Google advises redirecting straight to the final destination and keeping chains very short.
Conclusion
Use a 301 (or 308) when a URL is gone for good and a 302 (or 307) when the original is coming back. Implement redirects on the server, link directly to final URLs, keep redirects for at least a year, and audit for chains after every migration. Get those basics right and your rankings will follow your content to its new address. For a deeper look at preferred URLs, read our explainer on the canonical tag.
Planning a migration or redesign? Our web development and SEO teams build redirect maps that protect your traffic. Request a free quote before you launch.
References
- Google Search Central: Redirects and Google Search
- Google Search Central: Site moves with URL changes
- Google Search Central: How HTTP status codes and network errors affect Google Search
- Google Search Central: How to specify a canonical URL
- MDN Web Docs: Redirections in HTTP
- Semrush: 301 vs. 302 Redirect — Which to Choose for SEO and UX



