Redirects and SEO: 301, 302, and Canonical Tags
How Redirects Affect SEO
Redirects direct users and search engine crawlers from one URL to another. Properly configured redirects preserve SEO weight and ensure correct indexing. Incorrect ones dilute link equity, slow crawling, and lead to ranking losses.
Redirect Types
301 — Moved Permanently
A permanent redirect. Tells search engines the page has moved forever. Passes maximum SEO weight (link profile) to the new URL. Google processes 301s as a signal to update the index.
When to use:
- Site migration to a new domain
- URL structure changes
- Merging duplicate pages
- HTTP to SSL/TLS проверку redirect
- www/non-www canonicalization
302 — Found (Temporary Redirect)
A temporary redirect. Signals that the move is temporary and the original URL should remain indexed. SEO weight formally isn't passed (though in practice Google often treats long-standing 302s as 301s).
When to use:
- A/B testing
- Temporary maintenance
- Geolocation redirects (carefully)
- Seasonal content with temporary redirection
307 — Temporary Redirect
Similar to 302 but guarantees the HTTP method is preserved (POST stays POST). Important for API документацию.
308 — Permanent Redirect
Similar to 301 with HTTP method preservation. Used for API redirects.
Redirect Chains
A redirect chain is A → B → C → D. Each step adds latency (typically 100-300ms) and loses a small fraction of SEO weight.
Use the Enterno.io HTTP Checker to detect chains — the tool shows all intermediate redirects.
How to Fix
- Set up a direct redirect A → D, bypassing intermediate steps
- Update internal links to point to the final URL
- Check the sitemap — all URLs should be final, without redirects
Maximum Chain Length
Google follows a maximum of 10 redirects before stopping crawling. Browsers typically limit to 20. Recommendation: maximum 1-2 redirects in a chain.
Canonical vs Redirect
When to Use Canonical
The <link rel="canonical" href="..."> tag is a "soft" hint to search engines. Use when:
- Multiple URLs show the same content (filter parameters, pagination)
- Server-side redirects can't be configured
- Both page versions need to be accessible to users
When to Use Redirect
A redirect is a "hard" forwarding. Use when:
- The old URL should no longer exist
- The page has physically moved
- Users need to be forcibly redirected
Canonical and Redirect Conflicts
If a 301 redirect leads to page A but the canonical on page A points to page B, Google gets conflicting signals. Ensure canonical tags and redirects are aligned.
Common Mistakes
302 Instead of 301
The most common mistake. Use 302 only for genuinely temporary redirections. For permanent ones, always use 301.
Redirecting to a Soft-404
Redirecting a deleted page to the homepage is a soft-404. Google views this negatively. Better to show a proper 404 page or redirect to a relevant replacement.
Redirect Loops
A → B → A creates an infinite loop. The browser shows ERR_TOO_MANY_REDIRECTS. Verify with the HTTP Checker.
Pagination Redirects
Don't redirect pagination pages (/page/2/) to the main page — this loses indexable content.
Configuring Redirects in nginx
# 301: permanent redirect
location = /old-page {
return 301 /new-page;
}
# Redirect www to non-www
server {
server_name www.example.com;
return 301 https://example.com$request_uri;
}
# Redirect to trailing slash
rewrite ^([^.]*[^/])$ $1/ permanent;
Monitoring Redirects
Regularly check redirects with the Enterno.io HTTP Checker. Use uptime monitoring to track availability of final URLs after redirects.
Summary
Use 301 for permanent moves, 302 only for temporary ones. Eliminate redirect chains, align canonicals and redirects, update internal links. Regularly verify redirects with tools — one mistake can cost you rankings.
Check your website right now
Check now →