301 Moved Permanently

The resource has a new permanent URL, given in Location. Clients and search engines should update their references.

Status

HTTP/1.1 301 Moved Permanently

Details

301 is the canonical way to move a URL. Search engines transfer ranking signals to the target, browsers cache the redirect aggressively, and well-behaved clients rewrite stored links. That permanence is the point, and it is also the danger: a wrong 301 can be cached in a browser for a long time and is painful to undo.

For historical reasons clients are allowed to rewrite a POST to the new URL as a GET, and in practice they do. If the method must be preserved, use 308 instead.

Headers

Common causes

How to fix it

As the client

As the server

Examples

GET /old-product HTTP/1.1
Host: www.example.com

HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/products/new-product
Cache-Control: max-age=3600

Notes for proxy users

Redirect behavior is one of the clearest signals when testing a proxy: a site that answers a residential IP with 200 but answers a flagged datacenter IP with a 301 to a challenge page is doing IP-based filtering rather than blocking outright.

Specifications

RFC 9110 §15.4.2

See also