301 vs. 302 Redirect

Category: Errors & Troubleshooting ยท Updated 2026-11-09

A 301 redirect tells browsers and search engines that a page has moved permanently to a new URL, so the new address should be used and indexed going forward. A 302 redirect says the move is only temporary, so the original URL should still be treated as the real one. Using the wrong type is a common SEO mistake because it affects whether ranking value transfers to the new URL.

What each status code means

CodeMeaningTypical use
301Moved PermanentlyA page or domain has permanently changed address
302Found (temporary redirect)A short-term redirect, such as during maintenance or A/B testing
303See OtherRedirect after a form submission, telling the browser to use GET on the new URL
307Temporary RedirectSame as 302 but guarantees the request method does not change
308Permanent RedirectSame as 301 but guarantees the request method does not change

In practice, 301 and 302 are by far the most common, and most browsers and search engines handle method changes on them loosely enough that 307 and 308 exist specifically to remove that ambiguity.

Why the choice matters for SEO

Search engines treat a 301 as a strong signal to transfer the old URL's ranking signals, including most of its link authority, to the new URL, and to update the index to show the new address going forward. A 302 tells search engines the original URL is still the canonical one, so they generally keep indexing and ranking the old URL rather than the temporary destination. Using a 302 for a change meant to be permanent can leave ranking value stuck on a URL you no longer want visitors to see, sometimes for weeks or longer.

How to set up each redirect

On an Apache server using .htaccess:

# Permanent (301)
Redirect 301 /old-page/ https://example.com/new-page/

# Temporary (302)
Redirect 302 /sale-page/ https://example.com/temporary-offer/

On Nginx, inside a server block:

# Permanent (301)
rewrite ^/old-page/$ https://example.com/new-page/ permanent;

# Temporary (302)
rewrite ^/sale-page/$ https://example.com/temporary-offer/ redirect;

Content management systems such as WordPress also offer plugins that manage redirects from an admin screen without editing server configuration files directly.

Common redirect mistakes

  • Redirect chains: URL A redirects to B, which redirects to C, adding delay and sometimes losing SEO value along the way. Point A directly to the final destination.
  • Using 302 for permanent changes such as a domain migration or a permanent URL restructure, which can leave old URLs ranking instead of the new ones.
  • Redirecting an entire site to the homepage instead of to the matching new page, which frustrates visitors and wastes the specific relevance of old pages.
  • Forgetting HTTPS redirects, which should normally use 301 since the move to HTTPS is permanent.

You can check which redirect a URL returns from a terminal:

curl -I https://example.com/old-page/

Frequently asked questions

What is the main difference between a 301 and a 302 redirect?

A 301 tells browsers and search engines a page has moved permanently and the new URL should be used going forward, while a 302 says the move is temporary and the original URL should still be treated as the real one.

Which redirect should I use when I permanently change a URL?

Use a 301 redirect. It passes ranking signals to the new URL and tells search engines to update their index to the new address instead of the old one.

Does a 302 redirect hurt SEO?

Not inherently, since it is doing exactly what it is meant to: signal a temporary change. It becomes a problem only when it is used for a change that is actually permanent, because search engines may keep the old URL indexed longer than intended.

What redirect should I use for an HTTPS upgrade?

A 301 redirect, since moving a site from HTTP to HTTPS is a permanent change and you want all ranking signals and bookmarks to transfer to the HTTPS version going forward.

Can I check which type of redirect a page is using?

Yes. Running curl -I against the URL from a terminal, or using your browser's network inspector, shows the HTTP status code the server returns, such as 301 or 302.

What is a redirect chain and why is it a problem?

A redirect chain happens when one URL redirects to a second URL that then redirects again to a third. Each extra hop adds load time and, in long chains, can cause search engines to pass through less ranking value to the final destination.

Related topics