Skip to content

301 redirect

Also called permanent redirect, 301 moved permanently, 308 redirect

What is a 301 redirect?

A 301 redirect is an HTTP response with status 301 Moved Permanently that sends browsers and search engines from an old URL to a new one. It tells Google the move is permanent, which Google treats as a strong signal that the new URL should be indexed in place of the old one and receive its ranking signals.

A 308 Permanent Redirect means the same thing but requires the browser to keep the request method, so a POST stays a POST. Google treats 301 and 308 the same. Google can also treat an instant meta refresh or a JavaScript redirect as permanent, but a server-side 301 is the most reliable.

Since 2016 Google has said that 3xx redirects do not lose PageRank, so you no longer need to worry about a fixed "loss" per redirect. What still costs you is pointing redirects at irrelevant pages or chaining them.

Why 301 redirect matters for SEO

301s are how you keep rankings and backlinks when URLs change: site migrations, moving to HTTPS, changing domains, merging pages and tidying URL slugs. Without them, old URLs return 404, their backlinks point nowhere, and visitors hit dead ends.

They also fix duplication. Redirecting http to https and non-www to www (or the other way round) makes sure only one version of each page can be indexed.

The target matters. Redirecting many removed pages to the homepage is often treated by Google as a soft 404, so the old pages’ value is not passed on. Redirect each URL to the closest relevant replacement.

How to set up a 301 redirect

  1. Map every old URL to its new equivalent before you change anything. One-to-one mappings beat blanket redirects.
  2. Set the redirect on the server, CDN or framework, not with JavaScript, so every crawler sees it.
  3. Redirect straight to the final URL. Avoid redirect chains and update old redirects when you add new ones.
  4. Update internal links, canonical tags and your XML sitemap to point at the new URLs, so you are not relying on the redirect.
  5. Keep redirects in place for at least a year, and ideally indefinitely for URLs with backlinks.
  6. Test with `curl -I` or a crawler that each old URL returns 301 and lands on a 200 page.

301 redirect example

Server config
# Nginx
location = /old-page {
  return 301 https://www.example.com/new-page;
}

# Apache (.htaccess)
Redirect 301 /old-page https://www.example.com/new-page

# What the server returns
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/new-page

301 redirect FAQ

Do 301 redirects lose link equity?

Google has said since 2016 that 3xx redirects do not lose PageRank. Value can still be lost if the target is not relevant, for example when everything is redirected to the homepage.

What is the difference between a 301 and a 308?

Both are permanent. A 308 also requires the browser to repeat the same HTTP method. Google treats them the same.

How long should I keep a 301 redirect?

Google recommends keeping redirects for at least a year. For URLs with backlinks or regular traffic, keep them permanently.

Related SEO terms

  • 302 redirect

    A 302 redirect temporarily sends visitors to another URL while telling search engines to keep the original URL indexed.

  • Redirect chain

    A redirect chain is when a URL redirects to another URL that redirects again, so it takes two or more hops to reach the final page.

  • Redirect loop

    A redirect loop is when redirects send a URL back to itself, so the page never loads and browsers show a too-many-redirects error.

  • HTTP status codes

    HTTP status codes are three-digit numbers a server returns with each response to say whether a request worked, moved or failed.

  • Canonical tag

    A canonical tag is a link element that tells search engines which URL is the main version of a page when duplicates exist.

  • Link equity (link juice)

    Link equity, or link juice, is the ranking value a link passes from one page to another, based on the linking page’s authority and relevance.

  • Sneaky redirectsBlack hat

    Sneaky redirects send users to a different page than the one search engines saw, to deceive them, which breaks Google’s spam policies.

Back to the SEO glossary

Put the terms to work

Every term here is something OpenSEO measures. It is open source: start online in a minute, or run it on your own server.