What 301 means
The resource has a new permanent address, given in the Location header. Clients should use the new URL from now on, and search engines move their ranking signals to it.
When servers send it
After a site moves domain, switches to HTTPS, changes its URL structure, or tidies up trailing slashes.
Why you might see it
- A permanent redirect rule in the server, CDN or application.
- HTTP to HTTPS, or
wwwto nowww, redirects.
Using it as a developer
- Browsers cache 301s hard, sometimes indefinitely. Test with 302 first, then switch to 301 when you’re sure.
- For historical reasons, browsers may change a POST to a GET when following a 301. If the method must be kept, use 308.
- Redirect straight to the final URL. Chains (A to B to C) are slower and can lose search ranking.
- Don’t redirect every missing page to the home page: search engines treat that as a soft 404.
If you’re visiting a website
- Nothing. Your browser follows it automatically. Update your bookmark to the new address if you like.
Related codes
- 308 Permanent Redirect: The page has moved for good. Repeat the same request at the new URL, with the same method and body.
- 302 Found: The page is temporarily at the URL in the Location header.
- 307 Temporary Redirect: The page is temporarily at the URL in the Location header. Repeat the same request there, with the same method and body.
- 410 Gone: This used to exist and has been removed on purpose, for good.
Where it’s defined
301 Moved Permanently is defined in RFC 9110, section 15.4.2. It’s a 3xx code, the redirection class: look somewhere else, or use the copy you already have.
Other 3xx codes
302 Found · 303 See Other · 304 Not Modified · 307 Temporary Redirect · 308 Permanent Redirect
Or search them all in the HTTP status code list.