301 Redirects: Keep Your Rankings When URLs Move

Diagram of old URLs 301 redirecting to new URLs without chains or loops

Quick answer: A 301 redirect tells search engines that a URL has permanently moved, so link equity and rankings pass to the new address. Build a complete old-to-new map in a spreadsheet, implement it with the correct status code, test every rule before launch, and update internal links so you are not relying on redirects forever.

Key takeaways

  • A 301 is a permanent move that passes link equity; a 302 is temporary and should be used only for short-term tests or maintenance.
  • Map every old URL to a single new target before you change anything — a crawl plus server log gives you the full list.
  • Chains, loops, and homepage-only redirects waste equity; point each old URL at the closest equivalent new page.
  • Update internal links and the sitemap at the same time as the redirects, then monitor status codes for weeks after launch.

What a 301 actually tells a search engine — and the status codes people confuse it with

A 301 status code is a permanent redirect. When a crawler requests an old URL and receives a 301 with a Location header pointing to a new URL, it treats the old address as retired and transfers the signals — links, authority, and usually rankings — to the target. Browsers follow the same instruction, so visitors land on the new page without seeing an error. The key word is permanent: search engines may keep the old URL in their index for a while, but they will eventually replace it with the target.

People mix up several codes that look similar but behave differently. A 302 is a temporary redirect: equity stays with the old URL, and search engines assume the move will be reversed. Use it for A/B tests, maintenance pages, or geo-based routing, not for a slug change you intend to keep. A 307 is also temporary but preserves the original request method, which matters for form submissions and API calls; for normal page moves it behaves like a 302. A 308 is the permanent version that preserves the method, so it is the right choice when a POST request must move permanently. A 410 means the page is gone for good and tells crawlers to drop it faster than a 404, while a 404 simply says the URL was not found and may be temporary. Choosing 302 for a permanent move is the most common equity mistake; choosing 404 when you meant to remove a page is fine, but choosing 404 when a replacement exists wastes the links you earned.

Smart-phone traffic adds a wrinkle. Mobile browsers cache 301s aggressively, sometimes for months. If you test a redirect and then change your mind, phones that already visited may keep following the old rule. That is another reason to test on a staging domain before switching production, and to avoid 301s for anything you might reverse.

When a redirect is the right fix — and when it is not

Redirects are the correct tool when a URL genuinely needs to change. Renaming a slug to match a better keyword, moving a section under a new category, merging two competing posts into one stronger page, or retiring a page that has a clear replacement are all cases where a 301 preserves what you built. If you are consolidating duplicate content, the redirect map is usually built from the losing URLs in a keyword cannibalization cleanup, where two pages fight for the same query and one should absorb the other.

Redirects are the wrong fix when the page itself is the problem. If a post is thin, outdated, or poorly optimized, moving it to a new URL does not help — you have simply moved a weak page and added technical risk. Run your on-page checklist first. In many cases a content refresh in place keeps the existing links and history intact, which is safer than a move. Leave the URL alone when the only goal is cosmetic, when the page has strong external links and no real structural reason to move, or when you cannot map every old URL to a relevant target.

Removing a page with no replacement is its own decision. If the content has no equivalent and no links worth preserving, a 410 or 404 is honest. If it has links but no relevant target, redirect to the nearest parent category rather than the homepage — a category page is at least topically related. The homepage catch-all is the lazy option and it dilutes the value of every redirected link into a page that rarely matches the query.

Building the redirect map before you touch anything

Start with a full inventory. Crawl the site with a desktop crawler or a free online crawler and export every URL it finds, including paginated archives, tag pages, and attachments. Then pull the server access log for the last few months and extract the request paths. The crawl shows what is linked; the log shows what people and bots actually request, including old URLs that are no longer linked anywhere. Combine both lists and deduplicate.

In the spreadsheet, use one row per old URL. The columns that prevent trouble are: old path, new path, status code, match type (exact or pattern), notes, and a test result column. Add a column for the source of the URL — crawl, log, or manual — so you know why it is on the list. Keep paths relative (starting with a slash) rather than full URLs; it makes the rules portable between staging and production. Sort by old path and scan for duplicates: two rules targeting the same old URL will conflict, and the server will apply whichever it reads first. A second sheet with pattern rules (for example, every URL under /old-category/ moving to /new-category/) keeps the exact matches readable.

Match each old URL to the closest new target, not the easiest one. If a post moved from /blog/old-title/ to /blog/new-title/, that is a one-to-one match. If a category was renamed, map the category page and each child post to their new equivalents. If two posts merged, map both old URLs to the surviving post. Leave a note when a target is temporary, and flag any old URL with no sensible target for a decision — usually a category page or a 410.

Implementing redirects in each stack

On Apache, .htaccess handles both simple and pattern redirects. A single permanent move looks like Redirect 301 /old-slug/ /new-slug/. For pattern matching, use RedirectMatch 301 ^/old-category/(.*)$ /new-category/$1. With RewriteRule, enable RewriteEngine On and write RewriteRule ^old-slug/?$ /new-slug/ [R=301,L]; the L flag stops processing so you do not create accidental chains. Put redirect rules above any CMS rewrite block, or WordPress will handle the request first.

On nginx, use return 301 /new-slug/; for exact matches and rewrite ^/old-category/(.*)$ /new-category/$1 permanent; for patterns. The return directive is faster and should be preferred when the target is fixed. In PHP, send header('Location: /new-slug/', true, 301); and then exit; so no further output runs. This is useful for a single template or a legacy script, but it is harder to audit than a server config file.

If you use a plugin, both Rank Math and Redirection store redirects in their own database tables — Redirection uses wp_redirection_items, and Rank Math stores rules in its own redirection table — and both support CSV import. The exact column names differ, so export a sample from the plugin first and match your spreadsheet to that format. Redirection is more flexible for bulk imports and logs 404s you can convert into rules; Rank Math integrates with its own SEO settings and is convenient if you already use it. Either way, keep your master spreadsheet as the source of truth and re-import after changes rather than editing rules in two places.

Tool or method Best for Where rules live Bulk import
Apache .htaccess Exact and pattern rules on shared hosting Server config file Manual edit or deploy from version control
nginx return / rewrite High-traffic sites and pattern moves Server block config Manual edit or config management
PHP header() Single legacy scripts or templates Application code Not applicable
Redirection plugin Bloggers who want logs and 404 capture WordPress database table CSV import
Rank Math redirections Sites already using Rank Math for SEO Plugin database table CSV import

The mistakes that quietly kill equity

Chains are the most common. A chain happens when old URL A redirects to B, and B redirects to C. Each hop loses a little signal and adds latency, and long chains are sometimes abandoned by crawlers. Fix chains by pointing every old URL directly at the final destination. Loops are worse: A redirects to B and B redirects back to A, which produces a browser error and no equity pass at all. Loops usually come from a pattern rule that also matches the target path.

Redirecting every old URL to the homepage is the second big mistake. It technically returns a 301, but the target rarely matches the query, so the link is wasted. Point at the closest equivalent page, even if that is a category. Redirecting internal links instead of updating them is the third: if your navigation still points at the old URL, you are forcing every internal click through a redirect. Update the links in the content and templates and keep redirects only for external links and bookmarks. The internal linking strategy you apply here determines how much equity stays inside the site.

Finally, check the target. A redirect that points at a noindex page, a 404, or a login wall passes visitors and crawlers to a dead end. Open every target in a browser and confirm it returns a 200 and is indexable. If the target is a staging URL or a password-protected page, the redirect is worse than useless.

Testing the redirect table before and after launch

Test on staging first. Use curl -I https://staging.example.com/old-slug/ and read the first line for the status code and the Location header for the target. A correct rule returns 301 and a single Location line. Run the whole old-URL list through a bulk checker or a short script that loops over the spreadsheet and records status and target. Anything that returns 200 on the old URL means the rule is not firing; anything that returns 404 means the rule is missing or the path is wrong.

Check variants. Test with and without the trailing slash, with and without www, and with a query string appended. Query strings are usually preserved by Redirect but not always by pattern rules, so decide whether you need to carry them. Test a sample on a phone as well, because mobile browsers cache 301s and may behave differently from a desktop test.

Understand the difference between what a browser follows and what a crawler reads. A browser follows the Location header and renders the new page, so a human sees no problem even when the rule is a 302 or a chain. A crawler reads the status code first and the header second, and it records the hop count. That is why a redirect can look fine in a browser and still be wrong for search. Use a crawler or a header-checking tool, not just your eyes.

Running the cutover and the first weeks after

Order the deploy so the old URLs never return a 404. The safest sequence is: upload the new pages, add the redirect rules, then switch navigation and sitemap. If you are changing hosts or domains, the hosting migration checklist covers the DNS and file steps around the redirect map. Test the redirect rules on the new host before pointing DNS, using a hosts-file entry or a staging domain. If you need a clean staging environment to test the full map, a temporary hosting and domain setup is usually cheaper than debugging on production.

At launch, update internal links, the XML sitemap, and any canonical tags in the same window. Submit the new sitemap in Search Console and use the change-of-address tool if the domain changed. Keep the redirect map in version control or a shared document forever — old links live on in forums, newsletters, and other people’s bookmarks for years.

Expect ranking wobble. In the first days and weeks, some pages may dip or fluctuate as crawlers reprocess the old URLs. That is normal. What is not normal is a steady decline that continues for months, which usually means chains, wrong targets, or a large number of old URLs pointing at irrelevant pages. Watch the crawl stats and the 404 report, and fix new 404s as they appear. Most recovery settles within a few crawl cycles, though the exact timing varies by site size and crawl budget.

Redirect audits on a site that has moved several times

After a few redesigns and platform changes, redirect rules accumulate. Plugins add their own, old theme settings leave rules behind, and nobody prunes them. Audit by crawling the site and following every redirect you find. Record the chain length and the final target. Any chain longer than one hop is a candidate for flattening: replace the intermediate rules with a direct rule to the final URL.

Prune rules for URLs that no longer exist and have no incoming links. A redirect for a page deleted three years ago with no external links is clutter; removing it reduces the chance of conflicts. Consolidate several old paths into one final destination when they all represent the same content — for example, three historical URLs for the same post should all point at the current slug. The technical SEO audit is the right place to schedule this, and the common SEO mistakes list is a useful cross-check for the errors that usually sit alongside redirect problems. If a domain change is part of the plan, register the new name before you redirect the old one and confirm the replacement is available through a registrar such as Dynadot.

Pre-launch redirect checklist

  • Every old URL is in the spreadsheet with a single new target and a status code.
  • No rule points at a noindex page, a 404, or a staging URL.
  • Chains are flattened to one hop and loops are eliminated.
  • Trailing-slash and query-string variants have been tested.
  • Internal links and the sitemap are updated at the same time as the redirects.
  • A bulk check of the full old-URL list returns 301 to the correct target.
  • The map is saved somewhere permanent and shared with anyone who edits the site.

Frequently asked questions

Do 301 redirects pass all the link equity?

Search engines treat a 301 as a permanent move and generally pass most of the signals to the target, but not always in full. Long chains, irrelevant targets, and redirects to noindex pages reduce what gets through. A direct, one-hop redirect to a topically matching page preserves the most value.

How long should I keep a 301 redirect in place?

Keep it indefinitely. Search engines may drop the old URL from the index after a while, but external links, bookmarks, and old newsletters can keep sending traffic for years. Removing the rule later turns those requests into 404s. There is no maintenance cost to leaving a correct rule in place.

Can I redirect a page to the homepage?

You can, but it is rarely the best target. A homepage redirect passes visitors to a generic page that may not match what they expected, and it dilutes the value of the link. Point at the closest equivalent page — a category, a related post, or a new version of the same content — whenever one exists.

What is the difference between a 301 and a 302?

A 301 is permanent and passes equity to the new URL. A 302 is temporary and tells search engines the original URL should stay in the index. Use a 302 for short tests, maintenance, or geo-routing, and a 301 for any move you intend to keep.

Why does my redirect work in a browser but not in Search Console?

Browsers follow the Location header and render the page, so a 302, a chain, or a rule applied only to some user agents can look fine to a human. Crawlers read the status code and hop count. Check the raw headers with curl -I or a crawler to see what a search engine actually receives.

What to do next

Open a spreadsheet and build the map before you change a single URL. Crawl the site, pull the server log, and list every old path with its new target and status code. Test the rules on staging with curl -I and a bulk checker, flatten any chains, and confirm every target returns a 200 and is indexable. Then deploy in the order that keeps old URLs from ever returning a 404, update internal links and the sitemap in the same window, and keep the map forever. Schedule a redirect audit after the next redesign so the rules stay clean.

Disclosure: some links in this article are affiliate links. If you buy through them we may earn a commission at no extra cost to you.

Looking for a domain instead?

We hold a curated portfolio of premium .com and .si names — short, brandable, and ready to launch. Every listing shows a fixed price and a direct purchase path.

Browse premium .com domainsExplore .si names

Leave a Comment

Your email address will not be published. Required fields are marked *

D-Marketing Assistant

Hello! How can I help you regarding D-Marketing services today?

Please provide your details so we can get back to you.

share facebook Share to Facebook whatsapp Share to Whatsapp twitter Share to Twitter linkedin Share to linkedin