Skip to content
YAS.SH
URL & Links🌐 YAS server-sideAPI availableadvanced

Redirect Tracer

Follows an HTTP redirect chain and shows every hop with status and location.

Processed by YAS · not stored
Ready to runInstant execution
All tools →
Result

What does this tool do?

Follows an HTTP redirect chain and shows every hop with status and location.

Why would I use it?

  • You want to see how many redirects a link passes through.
  • A shortener chain is slow and you want to find the culprit hop.
  • You are auditing redirect chains for SEO.

Real-life example

Input
https://yas.sh/abc
Output
1. 302 → /r/xyz
2. 301 → https://site.example
Final: 200

Each hop is listed with its status.

Input → Process → Output → Next

Input
Paste a URL.
Process
YAS follows redirects with SSRF-safe validation at every hop.
Output
The full chain with statuses and final URL.
Next action
Shorten chains that hurt performance; fix broken intermediate hops.

Common mistakes

  • Expecting client-side (JS) redirects to be traced.
  • Tracing very long chains — capped for safety.
  • Ignoring the final status code.

What the result means

Every 3xx hop plus the final status reveals the full path.

Privacy & security

Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.

API

Endpoint
POST https://yas.sh/api/v1/tools/redirect-tracer
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/redirect-tracer" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'
JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/redirect-tracer", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "url": "https://example.com"
}),
});
const data = await res.json();
Python
import requests

r = requests.post("https://yas.sh/api/v1/tools/redirect-tracer", json={"url":"https://example.com"})
data = r.json()
FieldTypeRequiredDescription
urlstringYeshttp/https URL
Success response
{ "hops": [{ "hop":1, "status":302, "url":"...", "location":"..." }], "finalUrl": "...", "finalStatus": 200, "redirectCount": 1 }

Follow an HTTP redirect chain and report each hop's status and URL.

Error responses
  • 400 VALIDATION_ERROR — invalid input or unsupported option.
  • 413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.
  • 429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).
Limits
  • Maximum input: 64 KB per request.
  • Rate limit: 60 requests/min per IP address.
  • Authenticated accounts benefit from higher tier quotas.

Redirect Tracer: technical reference, use cases and FAQ

How Redirect Tracer works

The tracer issues a request and follows each Location header in turn, recording the status code, target and headers at every hop until it reaches a non-redirect response or a hop limit. Status codes carry distinct semantics: 301 and 308 are permanent, 302 and 307 temporary, and the difference between the 30x pairs is method preservation — 301/302 historically allowed a POST to become a GET, while 307/308 require the original method and body to be preserved.

Beyond HTTP redirects, a chain can continue through mechanisms the tracer reports differently or not at all: a meta refresh in the HTML, a JavaScript location assignment, or an HSTS upgrade applied by the browser before any request is made. A chain that looks short from the server side can therefore be longer in a real browser.

When to use it: real-world scenarios

Auditing an SEO migration

Each redirect hop loses a little authority and adds latency. Chains of three or more usually mean rules were layered over time rather than consolidated.

Finding redirect loops

A loop between www and apex, or between HTTP and HTTPS, produces an error page that gives users no useful information. The trace shows the cycle.

Checking that HTTPS upgrade happens first

The correct order is HTTP→HTTPS on the same host, then any host canonicalisation. The reverse sends one request in cleartext unnecessarily.

Investigating an affiliate or shortener chain

Marketing links often pass through several trackers, each adding latency and each a potential point of failure.

Pro tips

  • Collapse chains to a single hop wherever possible. Rewrite the rule rather than adding another redirect on top of the existing ones.
  • Use 301/308 for permanent moves so search engines transfer signals; use 302/307 only when the original URL will genuinely return.
  • Preserve the path and query string across a domain redirect. Sending everything to the homepage destroys deep links and is a common migration failure.
  • Check redirects with and without a trailing slash and on both www and apex — misconfiguration usually affects only one combination.

Limitations and edge cases

What this tool deliberately does not do, and where it will disagree with other implementations.

  • HTTP-level redirects only; meta refresh and JavaScript navigation are not followed.
  • Responses may differ from a browser's because the request lacks cookies, a browser user-agent and prior HSTS state.
  • Geo-targeted and device-targeted redirects will resolve according to the infrastructure making the request.
  • A hop limit applies, so an unbounded loop is reported as a loop rather than followed indefinitely.

Frequently asked questions

What is the difference between 301 and 302?
301 is permanent — search engines transfer ranking signals and clients may cache it indefinitely. 302 is temporary and preserves the original URL's indexing. Using 302 for a permanent move is a common and costly mistake.
How many redirects are too many?
One is ideal, two is tolerable, three or more should be consolidated. Each hop adds a round trip on every request and dilutes link signals.
Why does my browser redirect but the tracer does not?
Likely a meta refresh, JavaScript navigation, or a cookie-dependent rule. Browsers also apply HSTS upgrades before the first request, which never appears as a hop.
What is the difference between 307 and 302?
307 guarantees the method and body are preserved. Under 302, clients historically converted POST to GET, which silently drops the request body.
Ask YAS AI
🍪 Cookies & privacy. Essential cookies keep you signed in and remember language and theme. Google AdSense and reCAPTCHA are Google technologies: AdSense runs only after Accept All; reCAPTCHA loads on sign-in and contact forms. See how Google uses data: https://policies.google.com/technologies/partner-sites cookie policy · privacy policy.
Settings