@http · HTTP status codes, explained HTTP/1.1 301 Moved Permanently ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3xx · Redirection The resource has a new permanent URL. WHAT IT MEANS ──────────────────────────────────────────────────────────── The resource has a new permanent URL, given in the Location header. Clients and search engines should update their links. Browsers cache it aggressively. Clients may change POST to GET when they follow it. Use 308 if the method must be kept. WHY YOU'RE SEEING IT ───────────────────────────────────────────────────── → Moving to HTTPS, or between www and the bare domain. → A site restructure or renamed slugs. → Trailing-slash normalisation. HOW TO FIX IT ──────────────────────────────────────────────────────────── → Make sure Location points to the final URL, not to another redirect. → Only use it if you mean it: browsers can cache a 301 indefinitely. Test with 302 first. EXAMPLE RESPONSE ───────────────────────────────────────────────────────── HTTP/1.1 301 Moved Permanently Location: https://athttp.com/404 Content-Length: 0 related 302 Found   307 Temporary Redirect   308 Permanent Redirect spec RFC 9110 §15.4.2 https://www.rfc-editor.org/rfc/rfc9110#section-15.4.2 web https://athttp.com/301 ← curl athttp.com/300 curl athttp.com/302 →