Technical SEO
301 and 302 redirects: when and how to use them

Redirects are one of the fundamental tools of technical SEO. Choosing the wrong type between 301 and 302 costs you link equity and rankings. We cover all redirect codes, usage scenarios, and server-side configuration.
A redirect is an instruction to the server: 'The requested URL has moved. Here is the new address.' The browser and search crawler receive an HTTP code and a new URL, then navigate there automatically. For users it's invisible; for SEO — choosing the right type is critical.
What are redirects
An HTTP redirect is a server response with a 3xx code that indicates the resource is located at a different URL. The browser automatically follows the new address; the search crawler does the same and updates its index depending on the redirect type.
Permanent
Passes up to 99% of link equity. Pages consolidate in Google within weeks
Temporary
Does not pass link equity. The source URL stays in the index
Delay
A properly configured redirect adds less than 1 ms to response time
Hops in chain
Maximum recommended redirect chain length
301: permanent redirect
301 Moved Permanently tells the browser and crawler that a page has moved forever. Google passes link equity (PageRank) from the source URL to the new one, updates its index, and starts showing the new URL in search results.
When to use 301
| Scenario | Example |
|---|---|
| Domain migration | old-domain.com → new-domain.com |
| Removing a page with an alternative | /old-product → /new-product |
| Merging duplicate URLs | /page and /page/ → /page/ (consistent trailing slash) |
| HTTP → HTTPS | http://site.com → https://site.com |
| www → non-www (or vice versa) | www.site.com → site.com |
| URL restructuring | /blog/2020/post → /blog/post |
302: temporary redirect
302 Found is a temporary redirect. Google does not pass link equity and does not update its index: the source URL remains canonical. Use it only when the page is genuinely temporarily unavailable and will return to its original address.
When to use 302
| Scenario | Example |
|---|---|
| A/B testing | Testing a new page version without losing rankings for the original |
| Geo-redirect | Redirecting to a country/language with the ability to return |
| Temporary promotion | Promo page → main sale page (only while active) |
| Maintenance | Redirecting during server maintenance |
307, 308 and other codes
| Code | Name | HTTP method | SEO meaning |
|---|---|---|---|
| 301 | Moved Permanently | May change (GET→GET) | Permanent, passes PageRank |
| 302 | Found | May change (POST→GET) | Temporary, no PageRank pass |
| 307 | Temporary Redirect | Preserved (POST→POST) | Temporary, strict method |
| 308 | Permanent Redirect | Preserved (POST→POST) | Permanent, strict method |
| 303 | See Other | Always GET | After POST → redirect to GET |
| 410 | Gone | — | Page permanently deleted, no alternative |
For most SEO tasks, 301 and 302 are sufficient. Codes 307 and 308 are used in APIs and web applications where preserving the HTTP method matters. Code 410 signals to Google that a page is permanently deleted — it clears from the index faster than a 404.
SEO impact
A 301 redirect passes up to 99% of link equity — according to Google. In practice, positions may temporarily dip after a migration and recover within weeks. This is normal and not a permanent loss.
| Aspect | 301 | 302 |
|---|---|---|
| PageRank transfer | Up to 99% (per Google) | None |
| Canonical URL in index | New URL | Source URL |
| Index update speed | Several weeks | Not updated |
| Ranking impact | Temporary dip, then recovery | Rankings stay with source URL |
| Browser cache duration | Long (until changed) | Not cached or briefly |
Redirect chains
A redirect chain is when URL-A → URL-B → URL-C instead of URL-A → URL-C. Each additional hop reduces the PageRank passed, increases load time, and complicates crawling for Googlebot.
The maximum recommended chain length is 3 hops. Chains of 5+ hops may be cut short by Google before reaching the final URL. Regularly audit chains with tools (Screaming Frog, Redirect Checker) and flatten them.
# Check redirect chain via curl
curl -L -s -o /dev/null -w "%{url_effective}\n%{http_code}\n%{redirect_url}\n" \
https://old-domain.com/page
# Check all redirects in the chain
curl -L -v https://old-domain.com/page 2>&1 | grep -E "^< HTTP|^> GET|Location:"Server configuration
Nginx
# 301: permanent redirect for a single page
server {
location = /old-page {
return 301 /new-page;
}
}
# 301: full domain redirect
server {
server_name old-domain.com;
return 301 https://new-domain.com$request_uri;
}
# 301: HTTP → HTTPS
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
# 302: temporary redirect
server {
location = /promo {
return 302 /sale;
}
}Next.js (next.config.ts)
// next.config.ts
const nextConfig = {
async redirects() {
return [
// 301: permanent redirect
{
source: '/old-blog/:slug',
destination: '/blog/:slug',
permanent: true, // = 301
},
// 302: temporary redirect
{
source: '/promo',
destination: '/sale',
permanent: false, // = 302
},
];
},
};
export default nextConfig;Common scenarios
| Scenario | Type | Notes |
|---|---|---|
| HTTPS migration | 301 | http://... → https://... for all URLs |
| www normalisation | 301 | www.site.com → site.com (or vice versa) |
| Trailing slash | 301 | /page → /page/ or vice versa — consistently |
| Domain migration | 301 | old.com → new.com preserving URL structure |
| Removing a page | 301 or 410 | → nearest topical page, or 410 if no alternative |
| Seasonal promotions | 302 | → promo page only while active |
| A/B testing | 302 | → variant B without losing variant A rankings |