// http 3xx · redirection

HTTP 301 Moved Permanently

The resource has permanently moved to a new URL.

What HTTP 301 Moved Permanently means

301 Moved Permanently tells clients (and search engines) that the resource has permanently moved to the URL in the `Location` header, and they should use that URL from now on. Browsers and crawlers update their references and pass along SEO value.

Which category is it?

301 is a 3xx code — Redirection. 3xx means further action is needed to complete the request, usually because the resource lives at a different URL.

Common causes

  • A URL or domain was permanently changed
  • Migrating from HTTP to HTTPS or non-www to www
  • Restructured site paths

How to fix it

  • Point links at the new URL to skip the redirect hop
  • Ensure the redirect target returns 200, not another redirect

Example 301 response

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page/
Cache-Control: max-age=31536000

How to check a 301

  1. Run curl -I https://example.com/old-page to see the status line and the Location header without downloading the body.
  2. Follow the whole chain with curl -IL. Ideally there is a single 301 from the old URL straight to a final 200 response.
  3. Test in a private window or with curl: browsers cache 301 responses aggressively, so an old redirect can keep appearing after you change the rule.
  4. In the server or CDN config, confirm the rule covers the intended scope (one path or the whole host) so you do not create a redirect loop.

301 compared with similar codes

  • 302: 301 is permanent: search engines move signals to the new URL and replace the old one in results. 302 is temporary, so the original URL stays the canonical address.
  • 308: Both are permanent. With 301 some clients change a POST into a GET when following the redirect; 308 requires the method and body to be preserved.

301 Moved Permanently: common questions

Does a 301 redirect pass SEO value?

Google has said redirects do not lose PageRank by themselves, and the new URL gradually replaces the old one in the index. Redirect to the closest equivalent page, not just the home page.

How long should I keep a 301 redirect in place?

For as long as links, bookmarks or search results still point at the old URL. A year is a common minimum; many sites keep them indefinitely.

Why do I still see the old page after changing a 301?

Browsers cache permanent redirects, sometimes for a very long time. Clear the cache or test in a private window or with curl.

Other redirection (3xx) codes