All systems operational

What is a 301 redirect?

A 301 redirect is an HTTP response that says a URL has moved permanently. Browsers go to the new address automatically, and search engines treat the new URL as the main one.
What the server sends when a page has moved:
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page
How it works

A permanent forwarding address.

When a browser requests a URL, the server can answer with the status code 301 and a Location header holding the new address. The browser requests the new address straight away, so the visitor only ever sees the final page.

Because the move is declared permanent, browsers and caches may remember it and skip the old address on later visits. Search engines treat the new URL as the main version of the page and consolidate what they know about the old one onto it.

When to use it

Typical reasons for a 301.

Moving to a new domain

Send every old URL to its equivalent on the new domain so links and bookmarks keep working.

HTTP to HTTPS

Redirect the plain http:// version of every page to https://.

Choosing www or non-www

Pick one hostname and redirect the other to it so there is a single version.

Renaming or restructuring pages

Point the old path at the new one when a URL changes.

Merging pages

Send retired or duplicate pages to the page that replaces them.

Fixing a trailing slash or case

Redirect variants of a URL to the one you want people to use.

Pitfalls

Where 301s go wrong.

Redirect chains (A to B to C) and loops (A to B to A) add delay and can stop crawlers and browsers altogether. Point every old URL straight at the final destination. Browsers also cache a 301 aggressively, so a mistaken one can linger on visitors' devices after you fix it. Test before you deploy.

FAQ

Common questions

What is the difference between a 301 and a 302 redirect? +

A 301 says the move is permanent, so the new URL becomes the main one. A 302 says it is temporary, so the original URL stays the one to use.

Does a 301 redirect hurt SEO? +

A single 301 to the right page is a normal, supported way to move content. Chains, loops and redirecting everything to the home page are what cause trouble.

How long should I keep a 301 redirect? +

For as long as the old URL still receives links or visits. Google's guidance for site moves is to keep redirects in place for at least a year.

How do I check that a redirect is a 301? +

Use the redirect checker. It shows every hop with its status code and the final destination.