301 redirect: definition, use cases and implementation

What a permanent redirect is, what it passes on in SEO, when to use it rather than a 302, how to set one up, and the mistakes that lose traffic

The essentials

  • Definition: a 301 redirect is a server response indicating that a URL has moved permanently to another; browsers and crawlers follow the new address.
  • SEO: it transfers most of the old URL's popularity to the new one and consolidates the index; Google treats it as a canonicalisation signal.
  • 301 or 302: 301 for a permanent move (a redesign, a merge, a change of domain), 302 for a temporary one (maintenance, a test).
  • The rules: one redirect per URL, to the equivalent page, with no chains, kept for at least a year, and checked once live.

A 301 redirect is an HTTP response by which the server indicates that a URL has moved permanently to another address. The browser loads the new URL automatically; search engine crawlers do the same and update their index. It is the basic tool of any redesign, page merge or change of domain, and the primary mechanism for preserving SEO traffic. The other response codes are covered in HTTP response codes.

What a 301 passes on in SEO

Google treats a 301 redirect as a strong canonicalisation signal: the destination URL replaces the original in the index and inherits most of its signals, inbound links included. Google has stated since 2016 that no PageRank loss is applied to redirects, of any type. In practice, a redirect to a page with equivalent content keeps its rankings within days to weeks; a redirect to an unrelated page (the home page, for instance) is treated as a soft 404 and passes nothing on. Duplicate content between the old and new URL disappears with the redirect; see duplicate content.

301, 302, 307, 308: which to choose

CodeMeaningUseSEO effect
301Moved permanentlyRedesign, merge, URL or domain change, http to httpsCanonicalisation to the destination
302Moved temporarilyMaintenance, a test, a geographic redirectThe original stays indexed; converted to a 301 by Google if it lasts
307Temporary, method preservedForms, APIsAs for the 302
308Permanent, method preservedThe technical equivalent of a 301As for the 301

The use cases

  1. A redesign: each old URL to its new equivalent, page by page, from a complete export of indexed URLs and traffic. It is the single most important task in a redesign.
  2. Merging pages: two articles on the same subject merged into one; the deleted URL redirects to the one you keep.
  3. A change of domain or protocol: http to https, non-www to www, an old domain name to the new one, with a generic rule that preserves the path.
  4. Fixing a URL: renaming a slug, removing a parameter, switching to lowercase; see URL rewriting.
  5. Deleting a page: to the closest page if one exists; otherwise a 410 or a 404 is more honest than a redirect to the home page.

Setting up a redirect

On an Apache server, the redirect is written in the .htaccess : Redirect 301 /ancienne-page/ https://www.exemple.fr/nouvelle-page/file, or as a RewriteRule rule for patterns. On Nginx, in the server configuration with return 301. CMSs offer redirect management plugins — convenient, but slower than a server rule. A redirect must point directly to the final URL (not to a URL that is itself redirected), be checked with a tool that shows the response code, and stay in place for at least a year, ideally indefinitely while external links exist. A crawl with Screaming Frog lists the chains and the loops.

The frequent mistakes

  • Redirecting everything to the home page: treated as a soft 404, no signal passed on, visitors lost.
  • Chains: A to B to C; every hop slows things down and Google follows at most ten. Redirect A straight to C.
  • Loops: A to B and B to A; the page becomes unreachable.
  • 302 by default: some CMSs and hosts create 302s; check the actual code.
  • Forgetting images, PDFs and URLs with parameters: they have links and traffic too.
  • Removing redirects after six months: external links keep pointing at the old URL.
  • Redirecting without updating your internal links: internal links should point to the new URL, not travel through the redirect.

After a redesign, the Pages report in Search Console shows the old URLs as "Page with redirect" and flags the remaining 404s to deal with.

Our advice: before any redesign, export the complete list of URLs from Search Console (indexed pages), GA4 (pages with traffic over 12 months) and a crawl of the site, then build the old-URL-to-new-URL mapping table before touching the site. A redesign whose redirect plan is written after launch loses on average 20 to 40% of its organic traffic for several months.

How GreenRed helps

Rather than juggling several tools, GreenRed's Site health module brings these metrics together in a single dashboard, compares them over time and tells you which actions come first. You can try it free, with no card, from the Pricing.

Frequently asked questions

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

A 301 signals a permanent move: Google replaces the old URL with the new one in its index and transfers its signals. A 302 signals a temporary move: the old URL stays indexed. For a redesign, a merge or a change of domain, you always use a 301.

Does a 301 redirect lose you search rankings?

Not if it points to a page with equivalent content: Google states that no loss is applied, and rankings settle within weeks. A redirect to an unrelated page, such as the home page, is treated as a soft 404 and passes nothing on.

How long should you keep a 301 redirect?

At least a year, long enough for Google to update its index, and ideally indefinitely while external links or bookmarks point at the old URL. Removing a redirect reactivates the 404s and loses the traffic from those inbound links.

How do you set up a 301 redirect?

In the .htaccess file on Apache (Redirect 301 or RewriteRule), in your Nginx configuration (return 301), or through a CMS redirect plugin. Then check the response code with a header testing tool, and run a crawl to detect chains and loops.

From theory to practice

GreenRed measures these metrics on your own site and tells you what to do first.

Try GreenRed for free

Related articles