Site AI Auditpor Internet Solutions

301 or 302? Choosing the Right Redirect for Your Website

7 de agosto de 20267 min de lecturaFundamentos de SEO
301 or 302? Choosing the Right Redirect for Your Website

Short answer: Use a 301 (or 308) redirect when a page has moved permanently, so search engines transfer its signals to the new URL and eventually show the new address. Use a 302 (or 307) only when the move is genuinely temporary and the original URL will return. Choosing the wrong type rarely breaks a site, but it can delay search engines in showing the right URL, so always tell them the truth about how long the change will last.

What a redirect is

A redirect is an instruction from the server that says: “the page you asked for is somewhere else, go there instead.” The browser receives a status code in the 300 range together with a Location header containing the new address, and it loads that address automatically. Visitors usually do not notice anything except the changed URL in the address bar.

Search engine crawlers receive the same instruction. What they do with it depends on the status code. Some codes say the move is permanent, others say it is temporary. That difference decides which URL search engines keep in their index and show in results.

The MDN guide to HTTP redirections is a good technical reference if you want the full picture of how browsers handle each code.

The four redirect codes you will meet

Most websites only ever need four redirect types. Here is how they compare:

CodeMeaningSearch enginesTypical use
301 Moved PermanentlyThe page has a new permanent addressMove signals to the new URL and show it in resultsRenamed pages, merged content, domain changes, HTTPS
308 Permanent RedirectSame as 301, but the request method must stay the sameTreated like a 301Permanent moves on sites or APIs that handle form submissions
302 FoundThe page is temporarily somewhere elseUsually keep the original URL in resultsShort promotions, maintenance, testing
307 Temporary RedirectSame as 302, but the request method must stay the sameTreated like a 302Temporary moves where forms or API calls are involved

The difference between 301 and 308, or between 302 and 307, matters mostly to developers. With 301 and 302, browsers may change a form submission (a POST request) into a normal page load (a GET request) when following the redirect. The 307 and 308 codes forbid that. For ordinary pages, a 301 and a 308 behave the same for SEO.

When to use a 301 redirect

A 301 is the right choice whenever the old URL is not coming back. Common situations include:

Search engines follow a 301, move ranking signals such as links to the new URL, and replace the old URL in results over time. Google has stated that permanent redirects do not cause a loss of PageRank, so there is no reason to fear them. The main risk is not the redirect itself, but pointing it to a page that does not match what the old page offered.

When to use a 302 redirect

A 302 makes sense only when you plan to bring the original URL back. Examples:

With a 302, search engines usually keep the original URL indexed, because you told them the move is temporary. That is exactly what you want for a two-week sale, and exactly what you do not want when the page has moved for good.

What happens if you use the wrong one

The mistakes go in both directions, and neither is catastrophic, but both are worth avoiding:

The fix in both cases is simple: change the redirect to the correct type as soon as you notice. The sooner you correct it, the less confusion search engines and browsers have to undo.

Redirect best practices

Whatever type you use, a few rules keep redirects clean:

  1. Redirect to the most relevant page. Match topic and intent. Sending every old URL to the home page is treated by search engines much like a missing page and frustrates visitors.
  2. Use one hop. Redirect old URLs directly to the final destination. Chains such as A to B to C slow down loading and may not be followed to the end by crawlers.
  3. Update internal links. Your own menus, footers and content should link straight to the final URL, not rely on redirects. Redirects are for outside links and bookmarks.
  4. Update the sitemap. The XML sitemap should list only final URLs that return a 200 status, never redirected ones.
  5. Use server-side redirects. Redirects configured in the server, the CMS or a plugin that returns a proper status code are clearer than JavaScript redirects or meta refresh tags, which search engines may process later or less reliably.
  6. Keep redirects in place. Leave permanent redirects for at least a year, and in practice as long as the old URLs still receive visits or links. Removing them early brings back broken links.
  7. Document them. Keep a simple list of redirects with dates and reasons, especially after a redesign. It makes later clean-ups much safer.

How to check which redirect a page uses

You do not need special software to check a single URL:

For a whole site, a crawler is the practical choice. It finds every internal link that points to a redirect, shows the redirect type, and highlights chains and loops.

How Site AI Audit helps

Site AI Audit crawls your pages like a search engine and reports broken links and redirects in its SEO section, including internal links that point to redirected URLs. Each finding lists the affected pages and a plain-language fix, and findings are ranked by impact so you can see whether redirects are worth your time right now. Run a free check of up to 50 pages to see your redirect findings.

Related reading

The bottom line

Use a 301 or 308 when a page has moved for good and a 302 or 307 only when the original URL will return soon. Redirect to the most relevant page in a single hop, update your internal links and sitemap to the final URLs, and keep permanent redirects in place for the long term. If you find the wrong type in use, correct it promptly.

FAQ

Do 301 redirects lose SEO value?

Google has said that permanent redirects do not lose PageRank. Signals such as links are passed to the new URL. Problems usually come from redirecting to irrelevant pages or creating long chains, not from the redirect itself.

How long should I keep a 301 redirect?

At least a year, and ideally as long as the old URL still receives visits or has links from other websites. Redirects cost very little to keep and removing them turns old links into broken links.

Is a 302 redirect bad for SEO?

No, a 302 is correct for temporary changes. It becomes a problem only when used for a permanent move, because search engines may keep the old URL in results for longer than you want.

What is the difference between 301 and 308?

Both are permanent redirects and search engines treat them the same way. A 308 also requires the browser to keep the original request method, which matters for form submissions and APIs rather than normal pages.

Are JavaScript redirects OK for SEO?

Search engines can follow them, but server-side redirects are faster and clearer. Use a JavaScript or meta refresh redirect only when you cannot configure the server or CMS.

#Broken links#Redirects#Site migration#Technical SEO
Analiza tu propia web — gratis.Qué corregir en tu web — y por dónde empezar.
Empieza gratis
Internet Solutions

Más de nuestro equipo

Creadas por Internet Solutions. Prueba nuestros otros productos: cada uno te ahorra tiempo de una forma distinta.

internet-solutions.net ↗
Site AI Audit
Resumen de privacidad

Este sitio web utiliza cookies para ofrecerte la mejor experiencia de usuario posible. La información de las cookies se guarda en tu navegador y realiza funciones como reconocerte cuando vuelves a nuestro sitio web o ayudar a nuestro equipo a comprender qué secciones del sitio te resultan más interesantes y útiles.