301 Moved Permanently

HTTP 301 Moved Permanently is a 3xx redirection status. The resource has a new permanent URL, given in Location. Clients and search engines should update their links.

301Status code
3xxRedirection
YesCacheable by default
RFC 9110 §15.4.2Defined in

Common causes

What to do

Use for permanent moves so search engines pass ranking signals to the new URL. Browsers cache 301 aggressively, so test before deploying. Some old clients change POST to GET; use 308 to forbid that.

Example response

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-path
Content-Length: 0

How to send a 301

nginx    return 301 https://example.com/new-path;
Apache   Redirect 301 /old https://example.com/new-path
Express  res.redirect(301, '/new-path');
PHP      header('Location: /new-path', true, 301);

Other 3xx codes

Frequently asked questions

What does HTTP 301 mean?
The resource has a new permanent URL, given in Location. Clients and search engines should update their links.
Is 301 an error?
No. 3xx codes are redirection responses, not errors.