GlossarySEO
What is a 301 vs a 302 redirect?
Also called: 301 redirect, 302 redirect, permanent redirect, temporary redirect
Definition
A 301 redirect says a page has moved permanently, so search engines should treat the new URL as canonical. A 302 says the move is temporary, so they keep showing the original URL.
301 vs 302 redirect, explained
Redirects send visitors and crawlers from one URL to another. The status code tells search engines what the move means. Google groups them into two families: permanent (301 and 308) and temporary (302, 303 and 307).
Google's documentation spells out the difference. With a permanent redirect, Googlebot follows it and the indexing pipeline uses it as a signal that the target should be canonical, so the new URL shows in results. With a temporary redirect, Googlebot follows it, but the pipeline doesn't treat the target as canonical, so the old URL tends to stay in results.
Use a 301 (or 308) when a URL has changed for good: a renamed page, a new domain, a switch from http to https, or merging two pages into one. Use a 302 (or 307) when the original URL will come back: a temporary maintenance page, an A/B test, or a geolocation redirect that depends on the visitor.
The common mistake is using a 302 for a permanent move because it was the framework default. Google may eventually treat a long-lived 302 like a permanent one, but you're relying on it to guess. In Next.js, redirect() in a server component sends a temporary redirect by default, while permanentRedirect() and permanent: true in config redirects send permanent ones. Check which one you're using.
Keep redirects simple: point directly at the final URL, not through a chain of hops, and update internal links and your sitemap to the new URL so the redirect is a safety net, not the main path. When you merge pages, redirect to the most relevant replacement, not the homepage.
Why it matters for founders
Rebrands, domain changes and URL cleanups are common in a startup's first years. The right redirect type keeps the rankings and links you've earned attached to the new URLs.
Example
You rename /features/ai-writer to /ai-seo-autopilot. A 301 from the old URL to the new one tells Google to swap them in results and carries over the old page's signals.
Common mistakes
- Using 302s for permanent URL changes.
- Redirect chains (A → B → C) left behind after several migrations.
- Redirecting every deleted page to the homepage.
- Leaving internal links and the sitemap pointing at old URLs.
Sources
Checked
Related terms
- Canonical tagA canonical tag is a line in a page's HTML,
<link rel="canonical" href="…">, that tells search engines which URL is the main version when several URLs show the same or very similar content. - IndexingIndexing is when a search engine analyzes a crawled page and stores it in its index, the database it serves results from. A page that isn't indexed can't appear in search results.
- XML sitemapAn XML sitemap is a file that lists the URLs you want search engines to crawl and index, optionally with the date each one last changed. It helps discovery; it doesn't guarantee indexing.
- BacklinkA backlink is a link from another website to yours. Search engines use backlinks to discover pages and as one signal of which pages are trusted and worth ranking.