In short
Ahrefs flags "302 redirect" for internal URLs that use a temporary redirect. Google treats permanent redirects (301 or 308) as a strong signal that the new URL should be shown in results, and temporary ones as a weak signal. If the move is permanent, change the 302 to a 301. If it's truly temporary, such as a short promotion or maintenance, keep it.
A 302 says "this page is somewhere else for now." Many 302s on real sites are permanent moves set up with the wrong code.
Decide: temporary or permanent?
| Situation | Use |
|---|---|
| Page moved for good, site migration, merged content | 301 |
| Seasonal or short promotion, then the original returns | 302 |
| Redirect based on login, language choice or device | 302 (and keep it consistent) |
| Out-of-stock product sent to a category for a few days | 302 |
If a 302 has been in place for months with no plan to undo it, it's a permanent move.
Where 302s come from
Redirect plugins or tools where 302 was the default choice
PHP code using
header('Location: ...'), which sends 302 unless told otherwiseExpress apps using
res.redirect(url), which also defaults to 302Language or geo redirects on the home page
How to switch to 301
WordPress: in Rank Math's Redirections, Yoast Premium or the Redirection plugin, edit the rule and choose 301.
Shopify: URL redirects created in Content > Menus > URL redirects are permanent. 302s on Shopify usually come from apps or Markets geo redirects.
Webflow: redirects in Site settings > Publishing > 301 redirects are permanent.
Wix: URL Redirect Manager rules are 301 by default.
Custom builds: set the code explicitly:
// Express
res.redirect(301, '/new-url/');
// PHP
header('Location: https://example.com/new-url/', true, 301);Common mistakes
Redirecting the home page by language with a 302 and never letting crawlers see the root URL. Use hreflang and a language selector instead of forced redirects where you can.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Google Search Central, Redirects and Google Search
Express docs, res.redirect

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



