HTTP 301 Moved Permanently
Status code 301 · Class 3xx
Moved Permanently
Also searched as: HTTP 301, 301 redirect, moved permanently
What it means
301 is not an error but a permanent redirect: the resource has a new URL and clients should use it from now on. Browsers follow it automatically. It becomes a problem only when it points to the wrong place or forms a loop.
Applies to: All browsers, nginx, Apache, IIS, Cloudflare
How to fix HTTP 301 Moved Permanently
- If a 301 sends you to the wrong page, clear the browser cache, because browsers cache 301 responses
- Inspect the redirect chain with 'curl -sIL https://example.com' to see each Location header
- If you own the site: use 301 for permanent moves such as http to https, non-www to www, or renamed pages
- If you own the site: redirect old URLs directly to the final destination to avoid chains
- If you own the site: use 308 instead of 301 when the request method (for example POST) must be preserved
- If you own the site: fix loops by making sure CDN, server and CMS agree on one canonical scheme and host
Why it happens
RFC 9110 defines 301 as a permanent change of URL. Clients may change POST to GET when following it, which is why 308 exists for method-preserving permanent redirects.
FAQ
Does a 301 redirect pass SEO value?
Yes. Search engines consolidate signals to the new URL, which is why 301 is the standard for permanent moves.
How do I undo a cached 301 in my browser?
Clear cached images and files, or test in a private window. The browser may remember the redirect until its cache is cleared.
Related errors
Source: IANA HTTP Status Code Registry · fixes written and reviewed by the editors (see our editorial policy)
Last updated: