301 redirect

Updated July 15, 2026

Definition

A 301 redirect is an HTTP response that indicates a resource has moved permanently to a different URL.

On this page
  1. How a 301 redirect works
  2. Common SEO use cases
  3. 301 redirects and canonicalization
  4. How search engines consolidate signals
  5. 301 vs 302 redirect
  6. Redirect chains and loops
  7. Implementation methods
  8. How to test a 301 redirect
  9. How long a 301 should remain
  10. Common migration mistakes

How a 301 redirect works

When a client requests the old URL, the server returns the 301 status and a Location header containing the destination. A browser requests that destination and shows the new page. A crawler follows the same instruction and records the relationship between the two URLs. HTTP/1.1 301 Moved Permanently Location: https://seoenergy.org/en/terms/redirect/

The redirect happens before page content is needed. That makes a server-side 301 clearer and faster than a delayed meta refresh or a JavaScript redirect.

Common SEO use cases

  • A page has moved to a new permanent URL.
  • A site migration changes domains or URL structure.
  • Two sites or sections are being consolidated.
  • A duplicate URL version should resolve to one preferred address.
  • A removed page has a genuinely equivalent replacement.
  • Protocol, host, trailing-slash, or case rules need one permanent form.

A 301 is not a generic repair for every missing page. If no relevant replacement exists, a 404 or 410 response is clearer than sending users to a homepage or unrelated category.

301 redirects and canonicalization

Google treats a permanent redirect as a strong signal that the destination should become canonical. Internal links, sitemap entries, canonical tags, and hreflang annotations should support the same destination. Conflicting signals slow consolidation. Redirecting A to B while declaring A canonical or keeping A in the sitemap tells different systems different stories. A redirect removes the old URL from normal access. A canonical tag leaves both URLs accessible and acts as a preference signal. Use a redirect when the old address should no longer serve its own page.

How search engines consolidate signals

Search engines can transfer signals from the old URL to the destination as they process the redirect. This includes the relationship created by links to the old address, but consolidation is not instant and no exact percentage of value is guaranteed. Relevance still matters. A redirect from a retired product to its direct replacement is understandable. Thousands of unrelated pages redirected to one generic page can be treated as soft 404s and frustrate users. Keep content, internal links, and external messaging consistent during a migration. Redirects support the move; they do not compensate for missing pages, changed intent, or a broken destination.

301 vs 302 redirect

A 301 says the move is permanent. A 302 says the resource is temporarily available somewhere else. Google uses permanent redirects as a canonical signal toward the target, while a temporary redirect is intended to preserve the source URL as the main address. Choose the status based on the planned state, not on a belief that one code passes more ranking value. Use 301 for a lasting replacement and 302 for a real temporary condition such as a short test or temporary service page.

Redirect chains and loops

A chain sends the client through more than one redirect: A to B to C. Each hop adds latency and another point of failure. Update the original rule and internal links so A goes directly to C. A loop eventually sends the client back to a URL already visited. Browsers stop with an error, and crawlers cannot reach content. Loops often appear when HTTPS, hostname, locale, or trailing-slash rules contradict each other. Audit rules after every migration and platform change. A once-correct redirect can become part of a chain when its destination is moved later.

Implementation methods

A 301 can be configured in the web server, application framework, CMS, edge platform, or redirect service. The best method is the one that returns a correct status and Location header quickly and can be maintained safely. Match specific old paths before broad patterns. Preserve needed query data, escape special characters, and prevent rules from matching the destination itself. Do not publish a redirect map without ownership. Large migrations need a versioned mapping, a rollback plan, and monitoring for missed URLs.

How to test a 301 redirect

  1. Request the old URL without relying on browser cache.
  2. Confirm the first response is 301 and the Location header is correct.
  3. Follow the destination and verify a final 200 response.
  4. Check that there is no chain, loop, protocol downgrade, or lost parameter.
  5. Test internal links, canonicals, sitemaps, hreflang, and structured data for the new URL.
  6. Monitor logs and Search Console while crawlers process the change.

How long a 301 should remain

Keep a permanent redirect for as long as people, crawlers, bookmarks, or external links may use the old address. For site moves, Google recommends keeping redirects for at least one year, and longer is often better for users. Removing the rule after search engines update does not repair old links on other sites. The redirect can still prevent lost visits and future crawl errors.

Common migration mistakes

  • Redirecting every retired URL to the homepage.
  • Mapping pages by path pattern without checking content equivalence.
  • Leaving chains through previous migration destinations.
  • Updating redirects but not internal links, sitemaps, and canonicals.
  • Sending users to a destination that returns 404, noindex, or another redirect.
  • Removing redirects too early or failing to monitor log errors.

FAQ

What does a 301 redirect do?

It returns a permanent-move response and sends the browser or crawler to the URL in the Location header.

When should you use a 301 redirect?

Use it when an old URL has a lasting new location or when duplicate access paths must resolve permanently to one preferred URL.

Does a 301 redirect pass SEO value?

Search engines can consolidate signals through a relevant permanent redirect, but the process is not instant and no complete transfer is guaranteed.

What is the difference between a 301 and 302 redirect?

A 301 represents a permanent move and supports canonicalization toward the target. A 302 represents a temporary move and is intended to keep the source as the main URL.

How long should a 301 redirect remain in place?

Keep it as long as the old URL may still receive visits or links. For site migrations, Google recommends at least one year, and longer can continue to help users.

View all terms