Skip to content
Convertto

What does status 301 mean?

HTTP status 301 means Moved Permanently. The resource you asked for now lives at a different URL, given in the response's `Location` header, and clients should use that URL for every future request. Browsers and search engines cache a 301 aggressively, so it is the right redirect only when the move is genuinely permanent.

Runs in your browser

Also asked as

  • status 301 means
  • what is a 301 redirect
  • 301 moved permanently
  • http 301 meaning

Do it here: HTTP Status Code Reference

Look up what any HTTP status code means and when to use it.

Meaning
Moved Permanently
Class
3xx, redirection
New URL
Sent in the `Location` response header
Cacheable
Yes, by default and for a long time
Defined in
RFC 9110, section 15.4.2

What the server actually sends

A 301 is a status line, a Location header and usually nothing else. The body is optional and almost never displayed, because the client follows the redirect before rendering anything.

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

301 against the other redirects

CodeNamePermanentRequest method preserved
301Moved PermanentlyYesNot guaranteed. Clients historically rewrite POST to GET
302FoundNoNot guaranteed. Same historic rewriting
303See OtherNoNo. The follow-up is always GET
307Temporary RedirectNoYes, always
308Permanent RedirectYesYes, always
Method preservation is the real difference between 301/302 and 307/308.

The method column is the part people get wrong. When 301 was written, clients commonly turned a redirected POST into a GET, and enough of the web came to depend on that behaviour that the specification now permits it. 308 was introduced precisely to say "permanent, and do not touch the method". If you are redirecting an API endpoint that accepts POST, 308 is the code you want; if you are redirecting a page, 301 is fine.

Why a 301 is hard to take back

The practical defence is to send a short Cache-Control: max-age on new permanent redirects until you are sure they are right, and to use 302 or 307 while you are still testing. Only tighten the cache lifetime once the move is settled.

Search engines treat a 301 as an instruction to replace the old URL with the new one in their index and to pass the old URL's accumulated signals to the target. That is why a site migration is done with 301s rather than by deleting pages: a 404 throws the history away, a 301 forwards it. Chain as few redirects as possible, because each hop adds a round trip and crawlers stop following after a handful.

Checking what a URL returns

Related questions

What is the difference between a 301 and a 302?

301 says the move is permanent and the client should use the new URL from now on. 302 says it is temporary and the client should keep asking the original URL. 301 is cached, 302 usually is not.

Should I use 301 or 308?

Both are permanent. 308 guarantees the request method is preserved, so use it for endpoints that receive POST, PUT or DELETE. For ordinary page moves, 301 is the conventional choice and is universally supported.

Does a 301 pass SEO value?

Search engines use a 301 as a signal to consolidate the old URL into the new one, including the links pointing at it. Keep the chain short; each additional hop costs a round trip.

How do I undo a 301?

Change the server response, then wait. Clients that cached the redirect will keep following it until the cache entry expires, which is why it is worth sending a short max-age on any redirect you are not certain about.

Is 301 an error?

No. 3xx codes are redirections, not errors. A 301 means the request succeeded in identifying where the resource now lives.

Sources & specifications