What is a 301 redirect?

A 301 redirect is the HTTP status code 301 Moved Permanently. When a browser or crawler requests the old URL, the server responds with a 301 and a Location header naming the new URL, and the client goes there instead. It is the standard way to handle a page that has moved for good.

For search engines, a 301 is a strong signal that the new URL should replace the old one in the index. Google has said that 301 redirects do not lose PageRank, so links pointing at the old URL continue to count toward the new one, provided the new page is a genuine replacement.

How it works

The redirect happens before any page content loads. Google follows it, records the target as the likely canonical, and over time drops the old URL from results in favor of the new one. The old URL should keep redirecting for as long as it has links or traffic; Google recommends keeping redirects in place for at least a year, and many sites keep them indefinitely.

A 301 is also cached by browsers, sometimes for a long time. If you set one by mistake, visitors who already followed it may keep being redirected even after you remove it. That is one reason to use a 302 while testing.

Use 301s when you change a URL slug, merge two pages, move from HTTP to HTTPS, change domains, or restructure permalinks. Point each redirect at the most relevant replacement. Redirecting many unrelated pages to the home page is usually treated by Google as a soft 404.

Example

code
$ curl -I https://example.com/seo-tips/
HTTP/2 301
location: https://example.com/wordpress-seo-checklist/

On Apache the same rule in .htaccess is:

code
Redirect 301 /seo-tips/ https://example.com/wordpress-seo-checklist/

The HTTP 308 status is the permanent equivalent that also preserves the request method; Google treats 308 like 301.

In WordPress

WordPress automatically redirects some changed post slugs but has no redirect manager. Hydrogen SEO's Redirection Manager creates 301 and 302 redirects from wp-admin with exact, contains, starts-with, and ends-with matching, and its Auto Redirection option adds a 301 when a post, page, or term slug changes. See 301 vs 302 redirects, the redirects guide, and 301 vs 404.

Common mistakes

  • Chaining redirects: A to B to C instead of A straight to C. See redirect chain.
  • Redirecting everything to the home page after a restructure.
  • Forgetting internal links, which should be updated to point at the new URL directly.
  • Removing redirects too early while backlinks still point at old URLs.

Common questions

Do 301 redirects lose link equity?

Google has said 301 and other server-side redirects do not lose PageRank. Value can still be lost if the target is not a relevant replacement.

How long should I keep a 301 redirect?

At least a year, and ideally for as long as the old URL receives links or traffic. There is little cost to keeping them indefinitely.