How to Eliminate Redirect Chains

This guide is part of Time to First Byte Optimization, within Network & Server Response Optimization. A redirect tells the browser to request a different URL before it receives any content. Each hop is at least one full round trip, and when it switches hosts (from example.com to www.example.com, or from a tracking domain to the site), it also requires DNS, TCP and TLS for the new host. On mobile networks, a single cross-host redirect can cost 300ms or more, and chains of three or four hops are surprisingly common.

Chains form gradually: http to https, apex to www, adding a trailing slash, a locale prefix based on Accept-Language, an old URL structure that was migrated, and a campaign or link-shortener redirect on top. Each rule makes sense alone; together they add a second to TTFB before the server has even started rendering the page.

A four-hop redirect chain on mobile Timeline of a navigation passing through a link shortener, http to https, apex to www, and a trailing slash redirect before reaching the final page. A four-hop redirect chain on mobile Redirects short link (new host) http to https apex to www add slash Final page server + first byte 0ms 200ms 400ms 600ms 800ms 1000ms 1200ms 1400ms 1600ms TTFB

Rapid Diagnosis

  • Check RUM for redirectCount and redirectEnd - redirectStart per landing page (same-origin redirects only; cross-origin redirect time shows as a gap before fetchStart).
  • Trace common entry URLs with curl -sIL to list each hop.
  • Crawl the site with a tool that reports internal links pointing at redirecting URLs.
  • Check campaign, email and social links — they often use old URLs or http://.

Root Cause Analysis

1. Layered canonicalisation rules. Each rule (protocol, host, slash, case) adds its own hop.

2. Outdated internal links. Navigation and content still point to old URLs.

3. Marketing and tracking redirects. Link shorteners and click trackers add cross-host hops.

4. Locale or device redirects. Server-side redirects based on headers instead of serving the right content directly.

Step-by-Step Resolution

1. Map the chains

bash
# List every hop and its timing for an entry URL.
curl -sIL -o /dev/null -w '%{url_effective} %{num_redirects} redirects %{time_redirect}s\n' http://example.com/Shoes
curl -sIL http://example.com/Shoes | grep -iE '^(HTTP|location)'
# trade-off: curl from a data centre underestimates mobile cost; multiply hop
# count by your field round-trip time for a realistic estimate.

2. Collapse canonicalisation into one hop

Compute the final canonical URL in a single rule (protocol, host, path normalisation together) and redirect once.

nginx
# One hop from any non-canonical form to the canonical URL.
server {
  listen 80; listen 443 ssl; server_name example.com;
  return 301 https://www.example.com$request_uri;    # protocol + host together
}
# trade-off: path normalisation (slashes, case) still needs app-level logic; do it
# in the same response where possible rather than a second redirect.

Update navigation, content, sitemaps and canonical tags to use final URLs, so most navigations involve no redirect at all.

4. Replace redirect-based tracking

Use UTM parameters on final URLs instead of click-tracking redirects where possible. For email links, ask the email provider to use first-party tracking domains with fast redirects, or link directly.

TTFB p75 for email campaign landings Bar chart of TTFB at the 75th percentile for email campaign traffic before and after collapsing redirects. TTFB p75 for email campaign landings 4 hops (tracker, http, apex, slash) 1640ms 2 hops (tracker, canonical) 980ms 1 hop (first-party tracker) 620ms 0 hops (direct link + UTM) 410ms

Verification

Re-run curl -sIL on entry URLs: one hop at most for non-canonical forms, zero for links you control. In RUM, the share of navigations with redirects should fall, and TTFB p75 for affected landing pages should drop. Check search console for crawl errors after changes.

Worked Example: A Retailer's Email Campaigns

A retailer's email campaigns linked through the email platform's click tracker (on its own domain) to http://example.com/sale, which redirected to https://example.com/sale, then to https://www.example.com/sale, then to https://www.example.com/sale/. Campaign landing TTFB p75 on mobile was 1.6 seconds, and LCP p75 for campaign traffic was 1.1 seconds worse than organic traffic to the same pages. The team switched email templates to canonical HTTPS www URLs with trailing slashes, configured a first-party click tracking domain with a fast edge redirect, and merged the remaining protocol and host rules into one. Campaign landing TTFB dropped to 620ms and LCP p75 by 900ms; campaign conversion rate improved measurably in the following weeks.

Common redirect sources and their fixes Typical causes of redirects before the first byte and how to remove or collapse each. Common redirect sources and their fixes Source Typical cost Fix http to https 1 round trip HSTS + preload apex to www new connection combine with protocol rule Trailing slash 1 round trip link to final URL Click tracker new host first-party tracker or UTM Locale redirect 1 round trip serve at requested URL

HSTS and Preloading

The http to https redirect can be eliminated for returning visitors with HTTP Strict Transport Security: the Strict-Transport-Security header tells browsers to always use HTTPS for the domain, so they rewrite http:// URLs internally without a network round trip. Submitting the domain to the HSTS preload list extends this to first visits in browsers that ship the list. Before preloading, ensure every subdomain supports HTTPS, since preloading with includeSubDomains applies to all of them and is slow to undo.

http
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

Auditing Redirects Continuously

Redirects creep back as new campaigns launch and URLs change. Add an automated check that requests your top entry URLs (from analytics) and every URL in the sitemap, and fails if any returns a redirect or if a chain exceeds one hop. Run the same check on links in email templates and ad campaigns before they go out. In RUM, chart the share of navigations with redirects by referrer: a sudden rise from one source usually means a new campaign link or partner integration that points at an old URL. Fix the link at its source rather than adding another redirect rule.

Common Mistakes

  • Chained canonical rules. Protocol, host and slash handled in separate hops.
  • Internal links to redirecting URLs. Every click pays a redirect.
  • 302 instead of 301 for permanent moves. Browsers and caches do not remember temporary redirects.
  • JavaScript or meta-refresh redirects. Even slower: the page must load before redirecting.

Edge Cases

Locale detection. Prefer serving content in the detected language at the requested URL with a language switcher, or redirect once from the root only.

Trailing slash conventions. Choose one and generate all links accordingly; static hosts often redirect directory URLs to slash forms automatically.

Cached redirects. Browsers cache 301 redirects aggressively; test changes with fresh profiles.

Single-page apps. Client-side route redirects do not cost network round trips but do delay rendering; keep them out of entry paths.

FAQ

How much time does a redirect add?

At least one round trip — often 100–300ms on mobile — and more if it changes hosts and needs a new connection.

Do redirects affect SEO?

Search engines follow redirects, but chains waste crawl budget and can dilute signals. One hop to the canonical URL is the recommended pattern.

Should I use 301 or 308?

Both are permanent. 308 preserves the request method (useful for POST); for page navigations, 301 is standard and widely supported.

Are redirects counted in TTFB?

Yes, in the web-vitals definition, which measures from navigation start.

Can a CDN make redirects faster?

Yes. Serving redirects at the edge avoids a trip to the origin, though the browser still needs the extra round trip.

How do I find redirects in RUM?

Navigation Timing reports redirectCount and redirect timing for same-origin redirects. Cross-origin redirects show as time before fetchStart.

What about link shorteners on social media?

Platforms often wrap links in their own shorteners, which you cannot avoid. Make sure the destination is your final canonical URL so no additional hops follow.

Do redirects affect LCP in Core Web Vitals reports?

Yes. LCP is measured from navigation start, so redirect time before the final page counts towards it, and campaign traffic with long chains often has noticeably worse LCP.