Troubleshooting guide · http-status · Published 2026-08-15 · 4 min read

HTTP 301 redirects that preserve rankings

HTTP 301 redirect guide: when a 301 preserves rankings, how to write the server rule, and how to verify old URLs resolve to the new page.

Flat editorial illustration showing a lantern-style status readout with a neat row of stacked directory rails, each rail marked with an abstract tally.
Illustration: this article at a glance.

What a 301 redirect is

A 301 moved permanently tells a browser, a crawler, and the search engine index that the requested URL has a new permanent home. The client follows the Location header automatically. Search engines treat a real 301 as a transfer of signals: the link equity, anchor text, and crawl history of the old URL move over to the target. That is why "quick fix" redirect practices with meta refresh or JavaScript matter here: they carry no status signal at all.

When a 301 is the right code

Use a 301 when the old URL is gone forever and the new URL is the replacement the old one should point to. The typical cases are a slug change, a domain or subdomain move, a protocol or host change, merging old category pages, or replacing a removed product with its closest live equivalent.

Use a temporary code (302 or 307) when the landing URL will return later, for example an A/B test that must revert after the test, a short promotional takeover, or a holiday banner that does not own the page long term.

SituationCorrect statusWhy
Permanent slug change after a rewrite301The old path is dead forever
A/B test split for a few days302 or 307The swap must revert
Promotion on a URL that stays live302 or 307The default page must return

Does a 301 really preserve rankings

With care, yes, and for two reasons. First, crawlers stop requesting the old URL once they see the redirect, so the old page stops being a separately crawled candidate. Second, the equity ports to the new URL, so the destination page inherits the ranking signals instead of starting from zero. The catch is that the target must be a real, related page returning 200. A 301 to the home page from every dead URL dilutes relevance, and a 301 chain (301 to 301 to 301) works but adds latency and small risk each hop you can audit.

How to fix (ordered)

  1. Build the redirect map outside the server. Column A is every old URL you can find, column B is the single best target for each. Use up to one target per old URL, and never let one old URL point to two places.
  2. Implement the map at the server layer, not in the HTML. On Apache add rules in .htaccess or the virtual host. On nginx add return 301 blocks. On Cloudflare use a Bulk Redirect. Examples below.
  3. Test outside the CMS. Run curl and check the status and Location header.
  4. Confirm the target itself answers 200, then let the mapping propagate to the browser cache that stores it.
  5. Update internal links so the canonical path is the new URL, and re-request the old URL in Search Console or Bing Webmaster Tools.
# Apache, per old path
Redirect 301 /old-seo-page/ /new-page-url/
# nginx
location = /old-seo-page/ {
  return 301 /new-page-url/;
}

How to verify

  1. curl -I https://example.com/old-page/
  2. Read the HTTP status line. It must be 301 and the Location must be the exact new URL.
  3. Check the target returns 200, not 301 again or a redirect to a third URL.

Prevention

A 301 with a good map and readable rules is the highest fidelity way to keep the work the old page has built.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services