HTTP 301 Moved Permanently

When a client requests a URL and receives HTTP 301, the server is telling it: this resource has moved permanently — update your bookmarks, links, and index. The Location header in the response carries the new URL. The client is expected to follow the redirect immediately and all future requests should go to the new URL.

In a browser, the user sees nothing — they land on the destination page. In a crawl log or access log, you see the 301 followed by a second request to the Location URL. In Search Console, the old URL will eventually be replaced by the new URL as Google crawls and processes the redirect.

The key operational distinction: 301 is permanent and cached. A 302 or 307 is temporary and not cached.

Quick reference

Code301
NameMoved Permanently
Category3xx redirect codes
SpecificationRFC 9110
IANA statusAssigned
When to useUse 301 for: permanent domain migrations (http→https, www→non-www, domain renames), permanent URL restructuring, consolidating duplicate URLs to a canonical. Do not use 301 for temporary campaigns, A/B tests, or login flows — use 302 or 307 for those. Use 308 if you need to preserve the HTTP method (POST stays POST) on a permanent redirect.
Client behaviorBrowsers cache the redirect aggressively and follow it automatically, typically changing POST to GET (historical behavior). Search engine crawlers follow and pass link equity to the destination. Most HTTP clients follow redirects by default; some have a max follow depth (commonly 5–10 hops).
CachingCached by browsers and CDNs indefinitely unless Cache-Control or Expires specifies otherwise. Once cached, clients will not hit the original URL again until cache expiry. This makes 301s easy to deploy but hard to roll back — test before shipping.

Common causes

  • Permanent site migration to a new domain
  • URL restructuring or slug change
  • Consolidating duplicate content to a canonical URL
  • HTTP to HTTPS migration

How to fix it

  • Update all links to point directly to the destination URL
  • Use 301 only for permanent moves — not temporary ones
  • Avoid redirect chains (A→B→C) — consolidate to direct hops
  • Verify the Location header points to the correct final URL

Example exchange

GET /old-page HTTP/1.1
Host: example.com

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page

When you see this in production

In production, 301s appear in web server access logs alongside the Location header destination. Common triggers: Nginx or Apache rewrite rules, CDN redirect rules, application-level redirect responses. In Cloudflare Pages, _redirects file entries generate 301s. Monitor for:

- Redirect chain depth > 2 (adds 50-200ms per hop)

- Redirect loops (A→B→A patterns in access logs)

- 301→404 destinations (redirect set but destination missing)

What developers usually do next

  • After setting up a 301:
  • 1. Test with curl -I or a redirect checker before deploying (caching an incorrect redirect causes production incidents)
  • 2. Verify the destination URL returns 200, not another redirect
  • 3. Update all internal links to point directly to the destination (removes redirect overhead)
  • 4. Clear CDN cache if the old URL was previously cached
  • 5. Monitor Search Console for crawl errors on the old URL and verify the new URL is being indexed

When NOT to use this code

Do not use 301 for: temporary redirects (use 302), A/B testing (use 302 or feature flags), login/auth redirect flows (use 302 or 303), redirects where the HTTP method must be preserved (use 308). Never 301-redirect to a URL that itself redirects — collapse the chain.

Related status codes

HTTP 302 Found · HTTP 307 Temporary Redirect · HTTP 308 Permanent Redirect

Comparisons

HTTP 301 vs 300 · HTTP 301 vs 302 · HTTP 301 vs 307 · HTTP 301 vs 308 · HTTP 301 vs 410

Frequently asked questions

Does a 301 redirect pass SEO value?

Yes. Google treats 301 redirects as passing the majority of ranking signals (PageRank) to the destination URL. It is the correct choice for permanent moves.

Can a 301 redirect be reversed?

Browsers cache 301 redirects aggressively. While you can change the server-side rule, users with cached redirects may not see the change until the cache expires.

Standards reference

This definition is derived from the IANA HTTP Status Code Registry and RFC 9110. Human-readable operational guidance by ErrorLookup. · HTTP 301 quick reference →