How redirect tracing works
The extension sends HTTP requests withredirect: "manual" mode to capture each redirect step instead of following them automatically. This allows you to see the complete chain.
trace-redirects.tsx
HTTP status code handling
Redirect Trace interprets different HTTP status codes to understand the redirect chain:2xx - Success status codes
2xx - Success status codes
Status codes from 200-299 indicate successful responses. When the extension encounters these codes, it stops following redirects because the final destination has been reached.Common success codes:
trace-redirects.tsx
- 200 OK - Standard successful response
- 201 Created - Resource successfully created
- 204 No Content - Successful request with no response body
3xx - Redirect status codes
3xx - Redirect status codes
Status codes from 300-399 indicate redirects. The extension extracts the Common redirect codes:
Location header to find the next URL in the chain.trace-redirects.tsx
- 301 Moved Permanently - URL has permanently moved to a new location
- 302 Found - Temporary redirect to another URL
- 303 See Other - Response can be found at another URL
- 307 Temporary Redirect - Temporary redirect while preserving request method
- 308 Permanent Redirect - Permanent redirect while preserving request method
4xx - Client error codes
4xx - Client error codes
Status codes from 400-499 indicate client errors. The extension stops tracing and reports the error.Common client errors:
trace-redirects.tsx
- 400 Bad Request - Invalid request syntax
- 401 Unauthorized - Authentication required
- 403 Forbidden - Server refuses to fulfill request
- 404 Not Found - Requested resource doesn’t exist
- 429 Too Many Requests - Rate limit exceeded
5xx - Server error codes
5xx - Server error codes
Status codes from 500-599 indicate server errors. The extension stops tracing and marks the chain as incomplete.Common server errors:
trace-redirects.tsx
- 500 Internal Server Error - Generic server failure
- 502 Bad Gateway - Invalid response from upstream server
- 503 Service Unavailable - Server temporarily unable to handle request
- 504 Gateway Timeout - Upstream server failed to respond in time
Step-by-step visualization
Each step in the redirect chain shows:- Status code and text - The HTTP response status (e.g., “301 Moved Permanently”)
- URL - The complete URL at this step in the chain
- Step number - The position in the redirect sequence
- URL length - Character count to identify long tracking URLs
- Color-coded icons - Visual indicators based on status code type
The extension preserves the complete chain even if it encounters an error. You can see all successful steps before the failure occurred.
URL resolution logic
The extension handles different types of Location header values:trace-redirects.tsx
/ are resolved against the current domain.
Relative URLs - Other URLs are resolved relative to the current URL.
Error handling
Redirect Trace provides specific error messages for common failure scenarios:You can configure the maximum number of redirects and timeout duration in the extension preferences.
Redirect chain summary
After tracing completes, you see a summary with:- Total redirect count - Number of redirect steps followed
- Original URL - The starting URL you entered
- Final destination - Where the URL ultimately leads
- Completion status - Whether the chain completed successfully or hit the maximum redirect limit
- Clean URL option - Final URL with tracking parameters removed