Redirect Tracer
Follow the full HTTP redirect chain for any URL.
GET
/v1/redirects
curl "https://dns.toolkitapi.io/v1/redirects?url=http://github.com"
import httpx
resp = httpx.get(
"https://dns.toolkitapi.io/v1/redirects?url=http://github.com",
)
print(resp.json())
const resp = await fetch("https://dns.toolkitapi.io/v1/redirects?url=http://github.com", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"original_url": "http://github.com",
"final_url": "https://github.com/",
"total_redirects": 1,
"https_upgrade": true,
"hops": [
{"url": "http://github.com", "status_code": 301, "server": "GitHub.com", "redirect_to": "https://github.com/", "reason": "Moved Permanently"},
{"url": "https://github.com/", "status_code": 200, "server": "GitHub.com", "redirect_to": null, "reason": null}
],
"query_time_ms": 287.4
}
Try It Live
Live Demo
Response
Description
Follow the full HTTP redirect chain for any URL.
How to Use
1
1. Pass the full URL (including http:// or https://) in the `url` parameter. 2. Review `total_redirects` and each `hop` for the redirect path. 3. Check `https_upgrade` to verify HTTP-to-HTTPS redirection.
About This Tool
Redirect Tracer follows the complete HTTP redirect chain for a URL, showing each hop with status codes. It detects HTTP-to-HTTPS upgrades, www redirects, and redirect loops.
Why Use This Tool
- SEO audit — Verify redirect chains aren't too long (hurts SEO)
- Migration validation — Confirm old URLs redirect to new locations
- HTTPS verification — Ensure HTTP properly redirects to HTTPS
- Debugging — Trace why a URL lands on an unexpected page
Frequently Asked Questions
Does it detect redirect loops?
Yes — the tracer stops after a maximum number of hops and reports a loop if detected.
What's the maximum number of redirects followed?
Up to 10 redirects are followed before the chain is terminated.
Start using Redirect Tracer now
Get your free API key and make your first request in under a minute.