handy.moe

All tools / Debug tools / Status codes

HTTP 301 Moved Permanently

The resource has a new permanent URL. Clients and search engines should use the new one from now on.

This page runs in your browser and makes no requests.

301 Moved Permanently

The resource has a new permanent URL. Clients and search engines should use the new one from now on.

Common causes

Site moves, http to https redirects, trailing-slash fixes.

What to do

Send Location. Browsers cache 301s hard, so test with a 302 first. Note that old clients may change POST to GET when they follow it: use 308 to keep the method.

Class: 3xx Redirection · Defined in RFC 9110 §15.4.2

How to use it

  1. Look at the response in your browser's Network tab, or run curl -i URL to see the status line and headers.
  2. Read the response body: many servers explain the exact reason there.
  3. Fix the cause above and send the request again.

Questions

Is 301 an error?

Not exactly. 301 is a redirect or cache response, a normal part of how the web works. It only becomes a problem if it loops or goes to the wrong place.

Should I retry a 301?

Follow the redirect (browsers and most HTTP libraries do this automatically).

Where can I see the 301 in my browser?

Open the developer tools (F12 or Cmd+Option+I), go to the Network tab, reload, and look at the Status column. Click the request and open the Response and Headers tabs for the details.