A 301 redirect is an HTTP response code that permanently sends users and search engines from one URL to another. Unlike a 302 (temporary), a 301 tells Google to replace the old URL with the new one in its index and pass 90-99% of the link authority the old page had earned.
If a page changes URL — for any reason — a 301 redirect is how you tell Google. Without one, you lose the ranking signals the old URL earned and any incoming links point to a dead page.
What is a 301 redirect?
A 301 redirect is one of Google's permanent redirect signals (alongside HTTP 308). When a server returns a 301, browsers automatically forward the visitor to the new URL, and search engines eventually swap the old URL out of the index in favour of the new one.
The "301" comes from the HTTP standard status codes:
- 2xx codes — success (e.g. 200 OK)
- 3xx codes — redirection (e.g. 301, 302, 307, 308)
- 4xx codes — client errors (e.g. 404, 410)
- 5xx codes — server errors (e.g. 500, 503)
Google has confirmed that 301 redirects consolidate ranking signals to the destination URL. Since 2023, Google treats all permanent redirects (301 and 308) as equivalent for indexing purposes.
Why 301 redirects matter for SEO
Get a 301 right and you keep everything the old URL earned. Get it wrong and you can lose years of organic traffic overnight. Three reasons every SEO cares about 301s:
- Link equity preservation. Every backlink pointing to the old URL keeps flowing PageRank to the new URL. Without a 301, all those links resolve to a 404 and their value evaporates.
- Ranking consolidation. Duplicate content (www vs non-www, http vs https, trailing-slash variants) gets merged into one canonical URL that carries the full ranking strength.
- User experience. Visitors who bookmarked the old URL, clicked an old email link, or arrived from a stale Google result get taken to the working page instead of an error.
How a 301 redirect actually works
Every redirect happens in two steps: the request-response handshake, then the follow-up request.
GET /blog/old-post-name/ HTTP/1.1
Host: example.com
# The server responds with a 301 pointing to the new URL
HTTP/1.1 301 Moved Permanently
Location: https://example.com/blog/new-post-name/
# Browser automatically makes a fresh request to the new URL
GET /blog/new-post-name/ HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Server-side redirect (recommended)
The redirect is configured at the web-server level — Apache's .htaccess, Nginx's config, or the CDN edge. Fastest and most Google-friendly because the redirect fires before any HTML loads.
Application-level redirect
Frameworks like Rails, Next.js, or WordPress can issue 301s from application code. Slightly slower than server-level, but easier to manage from a CMS.
301 vs other redirect types
| Type | Meaning | SEO impact | When to use |
|---|---|---|---|
| 301 Permanent | URL moved forever | Full link equity + index replacement | Every permanent URL change |
| 302 Found | URL temporarily elsewhere | Old URL stays in index | A/B tests, geo-routing, campaigns |
| 307 Temporary | Same as 302 but preserves POST | Same as 302 | Form submissions, temporary maintenance |
| 308 Permanent | Same as 301 but preserves POST | Equivalent to 301 | Modern APIs, permanent moves with POST bodies |
| Meta refresh | HTML tag redirect | Passes little to no equity | Almost never — avoid |
Real 301 redirect examples
Here are the four situations where 301s show up most often, and the pattern each one uses.
1. Migrating http to https
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
2. Merging www and non-www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
3. Retiring a URL slug
/blog/2024/seo-tips-old/→/blog/seo-tips/ (301 · Permanent)
4. Consolidating duplicates into one canonical
/blue-widget/→/products/blue-widget/ (301)
/products/blue-widget.html→/products/blue-widget/ (301)
301 redirect vs canonical URL — which to use
Both signal "prefer this URL" to search engines. The difference is what happens to visitors.
Use a 301 when
- The old URL is truly gone or merged
- You want a hard signal with no ambiguity
- Visitors should never see the old page
- You're consolidating equity permanently
- URL slug changes, domain moves, http to https
Use a canonical when
- Both URLs need to remain reachable
- Filter, sort, or tracking URL variants
- Cross-domain syndicated content
- Visitors need to see the duplicate
- You're giving Google a soft preference hint
7 best practices for using 301 redirects
- Redirect to the exact final URL. Never chain 301 → 301 → 301. Every hop leaks equity. Point directly to the destination.
- Keep the redirect in place for 12+ months. Google may need multiple crawls to fully de-index the old URL and re-attribute signals.
- Match content, not just URL. Redirect an old page to a new page with equivalent content. Redirecting to your homepage instead is treated as a soft 404.
- Update internal links. Even with 301s live, fix the internal links to point directly to the new URL. Saves crawl budget and speeds up re-indexing.
- Use server-side redirects, not meta-refresh. Meta-refresh redirects pass little link equity and are slower for users.
- Test with a header checker. Verify the response is actually a 301 (not a 302) using curl, HTTPStatus.io, or Screaming Frog.
- Submit the change of address in Search Console. If you're moving domains, use the Change of Address tool to speed up Google's recognition.
When retiring 100 pages, don't 301 them all to the homepage. Google treats mass-homepage redirects as soft 404s and gives them no ranking value. Map each retired URL to the closest content match. If nothing matches, return a 410 Gone.
Common 301 mistakes to avoid
- Redirect chains — 301 A → 301 B → 301 C. Google stops following after 5 hops.
- Redirect loops — A → B → A. Nobody reaches the destination and Google flags the URL as inaccessible.
- Using 302s for permanent moves — Google keeps the old URL in the index and you lose ranking consolidation.
- Redirecting non-matching content — treated as a soft 404 and given no ranking value.
- Removing the 301 too early — takes months for Google to fully attribute signals. Leave it up.
- Forgetting to update internal links — makes crawlers hop through redirects instead of hitting the final URL.
Frequently asked questions
Yes. A 301 redirect passes roughly 90-99% of link equity (PageRank) from the old URL to the new one. Google has confirmed 301s consolidate ranking signals to the destination.
Google typically recognises a 301 within days to a few weeks depending on crawl frequency. Well-crawled sites usually see the redirect honoured within 24-72 hours.
A 301 is permanent — Google eventually replaces the old URL with the new one in its index. A 302 is temporary — Google keeps the old URL and treats the new one as a short-term alternative.
Technically yes, but avoid it. Google stops following redirect chains after 5 hops. Each hop leaks a small amount of link equity, so always redirect directly to the final destination.
Leave 301 redirects in place for at least 12 months, and ideally forever. Google needs multiple crawls to fully re-attribute ranking signals, and external backlinks to the old URL may never be updated.
