Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To see every redirect in a headless Chrome navigation, use Puppeteer’s response.request().redirectChain() for a concise navigation trace, or listen to Chrome DevTools Protocol (CDP) Network events when you need hop-by-hop status codes, headers, request IDs, or timing. The final URL alone is not a redirect trace: record each request and the response that sent the browser to the next URL.

What a redirect trace should show

A redirect chain is a sequence of HTTP requests and responses, not merely the URL displayed after navigation. For each hop, preserve the URL requested, the response status, the Location header when present, the next request URL, and—if useful—the request method and timing. The last response is the destination response, not another redirect hop unless it redirects again.

HTTP status codes such as 301, 302, 303, 307, and 308 are commonly involved, but a useful trace should capture the actual response rather than assume a redirect based on the final address. Also distinguish the main document navigation from redirects involving images, scripts, or other subresources; those are separate request chains.

Trace a navigation with Puppeteer

When the question is simply “What redirects did this page navigation follow?”, Puppeteer’s higher-level API is the shortest route. The returned navigation response refers to the final response. Its request exposes redirectChain(), which lists the requests that were redirected; the final request is represented by the response’s own request and is not an additional redirect hop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  const response = await page.goto('http://example.com', {
    waitUntil: 'networkidle0'
  });

  if (!response) {
    throw new Error('Navigation produced no response');
  }

  const finalRequest = response.request();
  const hops = finalRequest.redirectChain().map(request => ({
    url: request.url(),
    method: request.method(),
    headers: request.headers()
  }));

  console.log(JSON.stringify({
    hops,
    finalUrl: response.url(),
    finalStatus: response.status()
  }, null, 2));
} finally {
  await browser.close();
}

Install Puppeteer in your Node.js project before running this ES module. The example waits for network idle, which can be unsuitable for pages that keep network connections open; see the waiting and timeout guidance below. For an HTTP-to-HTTPS redirect, Puppeteer’s documented example returns one redirected request in the chain. A navigation with no redirects has an empty chain. An empty array is therefore a valid result, not necessarily an error.

Understand what the chain contains

  • hops: the redirected requests, with the request URL, method, and headers available from Puppeteer.
  • finalUrl: the URL associated with the final navigation response.
  • finalStatus: the status of that final response, not the status codes of earlier redirect responses.

This concise recipe does not print each redirect response’s status or Location header. If those details are essential—for example, to establish whether a hop was a 301 or 302—collect the protocol events with CDP instead.

Capture status, Location, IDs, and timing with CDP

CDP’s Network domain exposes request and response events. Enable it on a page’s CDP session and listen for Network.requestWillBeSent and Network.responseReceived. When a request is redirected, the next requestWillBeSent event includes a populated redirectResponse for the response that caused that next request. Record that response before advancing to the new request.

  1. Create a CDP session attached to the page.
  2. Send Network.enable before starting navigation so the initial request is observed.
  3. Register listeners for Network.requestWillBeSent and Network.responseReceived.
  4. For each request event, store its request ID, URL, method, and timestamp. If redirectResponse exists, save its status and headers, especially Location, alongside the next request URL.
  5. For the final response, record its status, URL, MIME type, and timing fields if supplied.
  6. Stop collection when the navigation has completed or when your own timeout expires, and detach or close the session as appropriate.

Use a record shape that keeps the response that caused a redirect paired with the follow-up request. For example, a hop can contain fromUrl, status, location, requestId, method, timestamp, and toUrl. The destination is the next request’s URL; do not assume a Location header is already normalized to the exact string the browser requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

CDP is preferable when the trace must retain protocol-level details, when requests beyond the top-level navigation matter, or when you need a basis for later analysis. A request ID helps associate events, but do not assume that every event from the page belongs to the navigation you are investigating. Filter or correlate by request type, frame, loader, and navigation context in your implementation where necessary.

When to intercept redirects with Fetch

Use CDP’s Fetch domain only when you need to pause or modify a request or redirect. A paused redirect response can be identified by a 301, 302, 303, 307, or 308 status together with a Location header. The resulting request includes redirectedRequestId, which links it to the request that caused the redirect. Record the response details, then continue the paused request if the browser should proceed normally.

Interception adds control, but it also adds responsibility: a request left paused can stall page loading. Keep the continuation path explicit, including error handling, and avoid enabling interception just to print a chain that Network events can already report.

Redirect response bodies are unavailable

Do not call Fetch.getResponseBody expecting the body of a redirect response. The Fetch documentation states that redirect response bodies are unavailable. For redirect diagnosis, preserve the response status and headers instead; do not treat the missing body as evidence that no redirect occurred.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Choose the right tracing method

Approach Best for Metadata and coverage Trade-off
Puppeteer redirectChain() A quick trace of a page navigation Redirected requests, with request URL, method, and headers; final response URL and status are available separately Less protocol-level detail; does not by itself report each redirect response’s status and Location
CDP Network events Hop statuses, headers, request IDs, timing, or broader request observation Request and response events, including redirect response data on the next request event Requires event collection, correlation, and a stop condition
CDP Fetch interception Pausing or modifying requests and redirects Paused redirect status and Location, with a link through redirectedRequestId More complex; paused requests must be continued, and redirect bodies cannot be read
Chrome DevTools Network panel Manual inspection and cross-checking Status, type, initiator, size, time, and waterfall; Initiator can identify an HTTP redirect Manual rather than an automated trace

Cross-check a trace in Chrome DevTools

For a visual check, open DevTools before starting the navigation so the Network panel records the complete sequence. Inspect the request rows, Status and Initiator columns, and the waterfall. The Initiator column can label an HTTP redirect, helping distinguish it from parser-initiated or script-initiated requests. This is particularly useful when checking whether your automated code missed the initial hop or accidentally mixed document navigation with subresource requests.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

The trace shows only the final URL

A final response URL cannot reveal all the intermediate responses by itself. In Puppeteer, obtain the final response’s request and call redirectChain(). If you need each redirect status and Location, enable Network events before navigation and inspect each subsequent request event’s redirectResponse.

The redirect chain is empty

An empty Puppeteer chain means no redirected request was recorded for that navigation. It is expected when the requested URL responds without redirecting. Check that you are examining the response returned by the navigation you intended, and use the DevTools Network panel as a manual cross-check if the result seems surprising.

page.goto() returns no response

The recipe checks for this case rather than dereferencing a missing value. Treat it as a navigation that produced no response available to the script, and investigate the navigation outcome before trying to read its status or request. Keep browser cleanup in a finally block so failures do not leave a browser process running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Navigation waits too long

networkidle0 waits for network activity to become idle; a page that continuously polls or holds connections may not reach that condition. Choose a wait condition appropriate to the page and the question you are answering, or add an explicit timeout and a separate completion strategy. Do not confuse “the page never became idle” with “the redirect chain is still continuing.”

CDP data is missing the first request

Attach the session, enable Network, and register the listeners before triggering navigation. Starting observation after navigation begins can miss the initial request and make the chain appear incomplete.

Fetch interception stalls the page

Every paused request needs a deliberate outcome. Continue it after recording the redirect unless your test intentionally modifies or blocks it. If a handler can throw, structure it so an exception does not silently leave the request paused.

A redirect response has no readable body

This is an expected limitation of Fetch interception, not a reason to switch to body parsing. Use the status and headers, including Location, as the evidence for that redirect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server, not a redirect-chain tracing tool: a screenshot can show the rendered result, but it does not replace Puppeteer or CDP when you need each redirect status and header. If you need a clean capture of the page after it loads, one GET request can return an image or PDF. See the ScreenshotNeo API documentation for options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing outcome. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots, and yearly billing gives two months free. All features are available on every plan.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Frequently Asked Questions

Can a screenshot tell me which HTTP status caused a redirect?

No. A screenshot shows rendered output, not the intermediate response status or Location header. Use Puppeteer or CDP for redirect evidence.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Puppeteer’s redirectChain include the final request?

No. It contains the requests that were redirected; the final request is represented by the navigation response’s request.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.