Zest.
3xx · Redirection

HTTP 301 Moved Permanently

The resource has a new permanent URL. Clients and search engines should update links.

Good to know

  • Browsers cache this aggressively, so test with a 302 first.
  • Redirects may change POST to GET. Use 308 to keep the method.

Example response

HTTP
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-location
Content-Type: application/json; charset=utf-8

{ "ok": true }

Look up the headers shown here in the HTTP headers reference.

Common questions

What does HTTP 301 mean?
Moved Permanently. The resource has a new permanent URL. Clients and search engines should update links.
When should I use 301?
Browsers cache this aggressively, so test with a 302 first. Redirects may change POST to GET. Use 308 to keep the method.
Is 301 an error?
No. 3xx codes are redirection responses: Further action is needed to complete the request, usually following a Location header.

Other 3xx codes