- Home
- Tools
- Developer Tools
- HTTP Status Codes
- 301 Moved Permanently
301 Moved Permanently
The resource has a new address for good. Browsers and search engines use the address in the Location header from now on.
- Class
- 3xx Redirection. The client has to take another step to finish the request, usually fetching a different address.
- Defined in
- RFC 9110
What it looks like
HTTP/1.1 301 Moved Permanently Location: https://www.example.com/new-address
When a server sends it
When a page has moved and the old address should keep working: a renamed article, a new domain, http to https, with or without www. The Location header carries the new address.
What to do with it
Clients follow it by themselves. Browsers remember a 301, often for a long time, and go straight to the new address next time without asking the server. That makes a wrong 301 hard to undo, so try a new redirect out with a 302 first.
Use 301 for pages. For an address that receives POST requests use 308, because browsers and most libraries turn a redirected POST into a GET. Redirect to the final address in one step and not through a chain of redirects.
Not to be confused with
| 308 Permanent Redirect | Permanent as well, and the method and body are guaranteed to stay the same. |
|---|---|
| 302 Found | The move is temporary: keep using the old address. |
| 410 Gone | The page is gone and there is no new address. |
How Google treats it
Google follows the redirect and takes a 301 as a strong signal that the new address is the one to use.
All codes are on the list of HTTP status codes, which can be searched by number and by word.