301 vs 302 Redirects: A Practical Guide for Site Migrations

A 301 redirect tells browsers and search engines that a page has moved permanently, so Google transfers the old URL's signals to the new one. A 302 says the move is temporary, so Google keeps the old URL in mind. Using the right one, and avoiding chains of several redirects, is what keeps rankings intact when URLs change. This guide explains the status codes, the mistakes that cost traffic and a checklist for moving a site safely.
The redirect codes you will meet
| Code | Meaning | Use it for |
|---|---|---|
| 301 Moved Permanently | Permanent | Most moves: new URL, new domain, merged pages |
| 308 Permanent Redirect | Permanent, keeps the request method | The same as 301; common on modern platforms |
| 302 Found | Temporary | A short-term change, such as a page under maintenance |
| 307 Temporary Redirect | Temporary, keeps the request method | The same as 302 |
| Meta refresh or JavaScript | Client-side | Only when you cannot redirect on the server |
Google's redirects documentation treats 301 and 308 as a strong signal that the new URL should be the canonical one, and 302 and 307 as a weak signal. Server-side redirects are the most reliable; meta refresh and JavaScript redirects work, but more slowly and less consistently.
When to use 301 and when 302
Use a 301 or 308 whenever you do not plan to bring the old URL back: a renamed page, a new site structure, a domain change, two pages merged into one, HTTP to HTTPS. Use a 302 or 307 only when the original page will return, for example a product temporarily replaced by a holding page or a seasonal campaign that redirects for a few weeks.
The most common mistake is the opposite: permanent moves made with 302s because that is what a plugin or framework does by default. Check what your platform actually sends rather than assuming.

Redirect chains and loops
A chain is a redirect that leads to another redirect: page A to B, then B to C. Google's status code guide says its crawlers follow up to 10 hops, but every hop adds a delay for visitors and a chance for something to break. The goal is one hop, from the old URL straight to the final one.
Chains usually build up over several migrations. A page moved in 2021, moved again in 2024, and both redirects still point forward rather than to the final address. When you add a new redirect, update older ones that point to the URL you are now moving.
A loop is worse: A redirects to B and B redirects back to A. Browsers show an error and search engines give up. Loops often appear when two rules disagree, such as one rule forcing www and another removing it.
www and HTTPS in one hop
Every site has four versions of its home page: http and https, each with and without www. Three of them should redirect to the one you chose, ideally in a single step. A common setup sends http://example.com to https://example.com, then to https://www.example.com. That is two hops, because one rule upgrades the protocol and a different rule adds www.
We found exactly this on our own site while testing our redirect checker. The fix is usually at the CDN or hosting layer: one rule that sends every variant straight to the final https and www form. It is a small gain, but it is free and it applies to every old link that still uses the short address.
A site migration checklist
Most traffic drops after a redesign come from missing or wrong redirects rather than from the new design itself. Work through these steps, which follow Google's site move guidance:
- List every old URL. Use your sitemap, a crawl, Search Console's Pages report and your analytics landing pages.
- Map each old URL to its new equivalent. One to one wherever possible, not everything to the home page.
- Implement 301 or 308 redirects on the server or CDN, not with JavaScript.
- Update internal links so they point at the new URLs directly, not through the redirects.
- Update canonical tags, hreflang tags and the XML sitemap to use the new URLs.
- Submit a Change of Address in Search Console if the domain changes.
- Test before and after launch with a list of your most important old URLs.
- Keep the redirects for as long as possible; Google says generally at least a year.

Test your redirects
Check the URLs that matter most: your home page variants, top landing pages and any addresses printed on materials or linked from other sites. For each one you want a single 301 or 308 to the right page, and a final 200 status.
Our free redirect checker takes a list of URLs and shows every hop, whether each redirect is permanent or temporary, and the final status code, and it flags chains, loops and redirects to another domain. After launch, look for redirected internal links with our broken link checker, and read our guide to broken links and duplicate content for the clean-up that follows.
Large migrations with hundreds of URLs are where mistakes become expensive. If you are planning one, we can build the redirect map, write the rules and monitor traffic afterwards as part of our technical SEO service.
Frequently asked questions
How long should I keep 301 redirects after a migration?
Google recommends keeping them for as long as possible, and generally for at least a year. In practice, keep redirects for important pages indefinitely: old links on other websites, bookmarks and printed material keep sending people to the old addresses for years. A redirect costs almost nothing to maintain, while removing it turns every old link into a 404.
I used a 302 by mistake. Have I lost my rankings?
Usually not for good. Google has said that a temporary redirect left in place for a long time may eventually be treated like a permanent one, but there is no guarantee and it takes longer. Change it to a 301 or 308 as soon as you notice, so the signal is clear from then on. The fix is usually a single line in your server, CDN or plugin settings.