301 vs 302 redirects: which to use

Kitwise guide ยท updated

When a page moves, a redirect sends visitors and search engines to the new address. The status code tells them whether the move is permanent. This guide explains the codes and the mistakes the 301 Redirect Generator checks for.

Free tools for this

1. The codes

CodeMeaningUse it when
301Moved permanentlyA page has a new address for good
308Moved permanently, same request methodLike 301, mainly for forms and APIs
302Found (temporary)The old address will come back, such as during maintenance
307Temporary, same request methodLike 302, for forms and APIs

Google's documentation says it treats 301 and 308 as a strong signal that the new address should be the one shown in search, and 302 and 307 as a weak one. For a page that has really moved, use 301.

2. Mistakes that break redirects

3. Where the rules go

4. Test before you move on

  1. Open each old address and confirm it lands on the right page.
  2. Check the status code with your browser's developer tools (Network tab) or a command such as curl -I.
  3. Update internal links and your XML sitemap to the new addresses, so the redirect is only a safety net.

Source: Google Search Central, Redirects and Google Search (developers.google.com/search/docs/crawling-indexing/301-redirects).

Questions

Does a 301 redirect lose SEO value?

Google uses a 301 as a strong signal to show the new address instead of the old one; keep the redirect in place and update your own links.

How long should I keep a 301 redirect?

As long as people or other sites might still use the old address; for most sites that means keeping it permanently.

Can I redirect a URL with a query string?

Yes, but not with a plain Redirect line. Use the generator, which writes the matching RewriteCond or $request_uri rule.

More guides All tools