301Status code
3xxRedirection
YesCacheable by default
RFC 9110 §15.4.2Defined in
Common causes
- HTTP to HTTPS redirect
- Domain move or URL restructure
- Adding or removing trailing slashes or www
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);