301 Moved Permanently

The resource has permanently moved to the URL in the Location header.

Status code301
Status textMoved Permanently
Category3xx Redirection
Response has bodyUsually
SpecificationRFC 9110

What does 301 Moved Permanently mean?

The resource has permanently moved to the URL in the Location header. It belongs to the 3xx Redirection class, which means further action is needed to complete the request, usually following a different URL.

When do APIs return 301?

A domain migration, an HTTP-to-HTTPS upgrade, or an API version being retired.

How to fix a 301 Moved Permanently

Update your stored URL to the target in Location. Leaving old URLs in client code means every request pays a redirect round trip.

Reproduce a 301 response

The fastest way to understand a status code is to trigger one and read the full response. Open the API tester and send a request to https://httpbin.org/status/301 — you will see the 301 status along with every response header the server sent. Comparing those headers against a working request is often what reveals the cause.

When you are debugging a real endpoint, check the response headers as carefully as the body, and confirm you are using the right HTTP method for the operation.

Related 3xx status codes