freeseobot

301 vs 302 Redirects: Which Type to Use for SEO

Which redirect types Google treats as permanent or temporary, why server-side redirects are safest, and how to move a page without losing its place in search.

By freeseobot Editorial · Published · 5 min read

Use a 301 redirect when a page has moved for good, and a 302 when the move is temporary. Google's documentation explains why: a permanent redirect tells Google that the new URL should be the canonical one, and a temporary redirect does not carry that signal. Pick the wrong type and the old URL can stay in search results when you wanted the new one to replace it.

This guide covers the redirect types Google recognizes, how it treats each, and a short routine for moving pages safely.

What is a redirect?

A redirect sends anyone who requests one URL to a different URL. It applies to people and to crawlers. You need one whenever a page moves, a URL changes, you merge two pages, or you switch domains. Without it, visitors and links land on an error page. Our guide on fixing broken links and 404 errors covers the cleanup side of that problem.

Which redirects does Google call permanent and temporary?

Google's documentation on redirects and Google Search sorts them like this:

Type Examples
Permanent HTTP 301 and 308, meta refresh at 0 seconds, HTTP refresh at 0 seconds, JavaScript location, crypto redirects
Temporary HTTP 302, 303 and 307, meta refresh and HTTP refresh with a delay greater than 0 seconds

Two details are easy to miss. An instant meta refresh counts as permanent, while one with a delay counts as temporary. And a crypto redirect is only a link to the new page with an explanation. Google notes that "not all search engines may recognize this pseudo-redirect as an official redirect," so treat it as a last resort.

How does Google treat each type?

For a permanent redirect, Google says that "Googlebot follows the redirect, and the indexing pipeline uses the redirect as a signal that the redirect target should be canonical."

For a temporary redirect, the signal is missing. Google says the target page "might still be indexed if other canonicalization signals are present." In practice, a 302 is the right choice when you want the original URL to stay in results, such as during a short maintenance page or a test.

The key phrase in the documentation is about certainty: use a permanent redirect when you are sure the redirect will not be reverted. If you might undo it, use a temporary one.

Why are server-side redirects better?

Google says "a server side redirect has the highest chance of being interpreted correctly by Google." These are the HTTP 301, 302, 307 and 308 responses your web server or CDN sends before any page loads.

JavaScript redirects are a fallback. Google needs to render the page to see them, and rendering can fail. Google warns it "might never see" a redirect that depends on it. Use JavaScript redirects only when you cannot change the server configuration.

Not sure which kind your site uses? Request the old URL in your browser's developer tools (Network tab) and look at the status code on the first response. A 301 or 302 there means a server-side redirect.

What happens to my rankings when I redirect?

Google keeps both the old and new URL. One becomes the canonical, and the other becomes an alternate name. After a domain move, the old URLs may keep showing in results for a while. Google's documentation says "the alternate names will fade away without you doing anything."

For the canonical side of this, read our guide to canonical tags. A redirect is one of the strongest canonical signals Google lists, alongside the rel="canonical" link.

The documentation does not give a number of months to keep redirects in place. Do not remove them early. If external sites or old bookmarks still use the old address, the redirect keeps working for those visitors.

How do I move a page safely?

  1. List the old and new URLs in a spreadsheet, one row per page.
  2. Map each old URL to the closest new page. Send it to a page on the same topic, not always to the home page.
  3. Set up server-side redirects. Use 301 or 308 for a permanent move, 302 or 307 for a temporary one.
  4. Update internal links to point straight at the new URLs, so visitors skip the redirect. The internal linking guide shows how to find them.
  5. Update your sitemap so it lists only the new URLs. See the XML sitemap guide.
  6. Test every old URL. Each should return one redirect and then a 200 page.
  7. Crawl the site again to catch loops and chains.

What mistakes should I avoid?

  • Redirect chains. URL A to B to C wastes time for crawlers and visitors. Point A straight to C.
  • Redirect loops. A sends to B and B sends back to A. Neither page ever loads.
  • Using a 302 for a permanent move. The old URL may stay indexed because the canonical signal is missing.
  • Sending every old URL to the home page. Visitors do not find what they wanted. Match the topic.
  • Redirecting to a page that errors. Check the final destination returns a 200 status.

Check your redirects

The freeseobot SEO checker crawls your site and flags redirect chains and broken internal links, so you can see problems after a move. Run it right after you launch redirects, and again a week later.

Questions

Is a 301 or 302 better for SEO?

Neither is better in general. Use a 301 when the move is permanent so the new URL becomes canonical, and a 302 when you plan to bring the old URL back.

Is a 308 the same as a 301?

Google lists both 301 and 308 as permanent redirects, and both 302 and 307 as temporary ones. Treat the pairs as equivalent for search purposes.

Do I lose ranking with a 301 redirect?

Google's documentation says permanent redirects signal that the target should be canonical, and that the old URL becomes an alternate name that fades away. It does not publish a percentage loss, so we do not quote one.

Can I use a meta refresh instead of a server redirect?

You can, and an instant one counts as permanent. But server-side redirects have "the highest chance of being interpreted correctly," so use them when you can.

How long should I keep a redirect?

Google gives no fixed duration. Keep it while old links, bookmarks or search results still point to the old URL.

Sources

More guides