Status codes · one code301Moved Permanently

What a 301 Moved Permanently response means, who is at fault, what a visitor should do and what the server owner should do.

Open the reference on this code
What is happening

The old address stops working — even after a rollback

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new/

The browser remembers a permanent redirect and stops asking the server about the old address at all: the next request is redirected locally. A mistaken 301 therefore cannot be undone by editing the config — for everyone who already visited it stays until their cache is cleared. On your own machine a private window or chrome://net-internals/#dns helps; for visitors nothing does.

Code
Who is at faultRedirection
Class3xx Redirection
Headers
Locationthe new address
01

What to do

If it is someone else's site

Nothing to do: the address simply changed and the browser has already opened the new one. If the redirect landed you on the home page instead of the page you wanted, that page is probably gone and the redirect is a blanket «everything to the home page»; use the site search instead.

If it is your server

A 301 passes the page's weight to the new address, which is why a move needs it rather than a 302. Two rules: point at the specific page rather than the home page — a blanket redirect is treated as a soft 404; and avoid chains, each extra hop loses weight and crawl budget. For an API a permanent move is 308: after a 301 browsers turn POST into GET, and the request silently becomes a different one.

02

Easily confused with

302Found

a temporary move: no weight is passed and the old address stays canonical. Often set by mistake where a 301 was meant.

302
308Permanent Redirect

the same permanent move, but the method survives — a POST stays a POST. This is what an API needs.

308
404Not Found

the address did not move, it ceased to exist. Redirecting to the home page instead of a 404 only makes it worse.

404
03

How to check

curl -sIL https://example.com/old/ | grep -E 'HTTP/|[Ll]ocation'

the whole redirect chain at once: one hop is healthy, three are not

curl -sI https://example.com/old/ | head -1

check the code without following the redirect

Find another code

The reference holds sixty-four codes searchable by number, name and meaning — plus a breakdown of confusing pairs such as 401 and 403.

Open the reference on this codeAll codes

Updated

«» added to favorites