HTTP 301 Moved Permanently — What It Means

What HTTP status code 301 Moved Permanently means, when servers return it, and how to handle it correctly.

Published September 22, 2026

HTTP 301 Moved Permanently tells clients and search engines that a URL has permanently moved to the address in the Location header. Browsers cache it aggressively and search engines transfer ranking to the new URL.

What it means

Use it for permanent changes such as switching to HTTPS, renaming a page or consolidating domains. POST requests may be changed to GET by clients; use 308 to preserve the method.

Common causes: Domain or URL restructuring; HTTP to HTTPS redirect; www to non-www consolidation.

On the wire

GET /old-page HTTP/1.1
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page
A typical 301 exchange.

Practical examples

Test it from the shell

curl -i https://example.com/path   # look for HTTP 301

Handling 301 in code or config

return 301 https://example.com$request_uri;

How to fix it

Point Location to the final URL, avoid chains; Use 302 or 307 for temporary moves; Clear browser cache while testing.

1. Reproduce: curl -i <url>
2. Confirm the status is 301
3. Apply the fix above and re-test

Common mistakes

  • Treating this as an error when it is a normal part of HTTP.
  • Use 302 or 307 for temporary moves
  • Ignoring the response headers that explain the details.

Key takeaways

  • 301 means Moved Permanently.
  • HTTP 301 Moved Permanently tells clients and search engines that a URL has permanently moved to the address in the Location header.
  • Read the response headers and logs for the exact cause.

FAQ

301 vs 302?

301 is permanent and cached; 302 is temporary.

Is 301 a client or server error?

It is a redirection status code, in the 3xx class.

More HTTP articles