301 Moved Permanently
The resource has moved permanently to the URL in the Location header.
| Class | Redirection (3xx) |
|---|---|
| Defined in | RFC9110, Section 15.4.2 |
| Cacheable by default | Yes (RFC 9110, section 15.1) |
Common causes
- A page or site was moved to a new URL for good, such as HTTP to HTTPS or a domain change.
- A canonical host redirect, for example www to non-www.
What to do
Point the redirect straight at the final URL to avoid chains. Browsers and search engines cache 301 aggressively, so test with 302 or 307 first if you may change your mind.
Related codes
- 302 Found: The resource is temporarily at a different URL, given in the Location header.
- 307 Temporary Redirect: Temporary redirect that keeps the original method and body.
- 308 Permanent Redirect: Permanent redirect that keeps the original method and body.