Redirect Check1 Credit
Follow every redirect from a domain or URL, and see each hop and the service behind it.
The Redirect Check API follows every redirect from a domain or URL and says where it lands and what sent it there. Each hop has its status code, how it redirects (a 3xx with a Location header, a Refresh header, a meta refresh or a script that sets the location), the address that answered, its TLS certificate and DNS, and the service behind it, such as a Cloudflare redirect rule or a registrar's domain forwarding. A bare host is checked four ways in one call: http and https, apex and www.
The target goes percent-encoded in one url parameter (encodeURIComponent), as in the Site Report API. A bare host, as ?url=github.com, traces all four variants; a URL with a scheme or a path is traced alone.
Each call costs 1 credit. Results are cached for up to 10 minutes.
See Authentication for details.
X-API-Key<token>Provide your API key in an HTTP request header.
url*stringThe domain or URL to check. A bare host (example.com) traces the apex and www over http and https; a URL with a scheme or a path (http://example.com/old-page) is traced alone. Percent-encode the whole value as one parameter (encodeURIComponent), so the target's own ?, & and # stay inside it. A fragment is dropped.
1 <= lengthverbose?booleanReturn extra detail: totalElapsed, retries and params, plus each errors entry's detail when the lookup fails. For redirect, each hop also has its response headers (lowercased) and phase timings.
falsevariants?stringWhich URLs to trace. matrix (the default for a bare host) traces the apex and www over http and https: four traces in one call. single (the default for a URL with a scheme or a path) traces the URL alone. matrix takes a host or a root URL; a URL with a path, query or port is refused
"matrix""single"maxRedirects?integerThe most redirects a trace follows before it stops with too-many-redirects, at most 20
1 <= value <= 2010userAgent?stringThe user agent to send, by preset name: a browser-like agent that names DNS.Tools by default, or a browser, phone, search or AI crawler (httpstatus.io's preset names, plus claudebot and perplexitybot)
"dnstools""dnstools""browser""chrome""firefox""safari""edge""iphone""ipad""android""googlebot-desktop""googlebot-smartphone""bingbot-desktop""bingbot-mobile""yandexbot""applebot-desktop""duckduckbot""twitterbot""linkedinbot""facebook-crawler""slackbot""gptbot""chatgpt-user""claudebot""perplexitybot""ccbot"followMetaRefresh?booleanFollow a Refresh header and an HTML meta refresh on a 2xx page
truefollowJs?booleanFollow a simple script assignment to location (location.href = …, location.replace(…)) in the first HTML bytes. The script is read, never run
truevalidateTlsCertificate?booleanStop a trace at an https hop whose certificate is not trusted. With false the trace keeps following, and the certificate problem is still reported in that hop's tls
trueSuccessful redirect check. A redirect that fails (a loop, a TLS error, a host that does not resolve) is a 200 too, with the failure in its trace's error and in problems
application/json- response
tool*stringTool that generated this result
"dns""domain""reverse""site""dnssec""ssl""email""redirect"query*stringThe original query string
requestId*|Unique request identifier that generated this result
timestamp*stringUTC timestamp when the result was generated
elapsed*|Time taken to generate the result in milliseconds
cached*booleanWhether this result was served from cache
totalElapsed?|Returned with verbose. Total time in milliseconds, including retries and any lookups this one made. For a cached result, the time to read it
retries?numberReturned with verbose. Number of retries before the answer, 0 for a cached result
params?Returned with verbose. The query parameters you set that differ from their defaults
variants*string"matrix""single"verdict*stringOne line on where the query goes and what sends it there
finalUrl*|Where the query lands: the traces' common final URL, else the first trace that ended on a 2xx
consistent*|Matrix only: whether every trace that finished lands on the same URL
problems*array<>Most severe first
traces*array<>errors*array<>Empty on a 200, including when a trace failed (that is in the trace's error). On any other status, why the request failed. The HTTP status is in the response line only
See Errors for the response format.
invalid_requestinvalid_queryblocked_addressauthentication_failedinvalid_api_keyapi_key_expiredout_of_creditsforbiddenrate_limitedinternal_errorcurl -X GET 'https://api.dns.tools/v1/redirect?url=github.com'{ "tool": "redirect", "query": "github.com", "requestId": "754febf0-3bda-4128-833c-205f90027b19", "timestamp": "2026-12-01T19:19:22.055Z", "elapsed": 1971, "cached": false, "errors": [], "variants": "matrix", "verdict": "All 4 variants land on https://github.com/ · 301 → 1 hop → https://github.com/", "finalUrl": "https://github.com/", "consistent": true, "problems": [], "traces": [ { "startUrl": "http://github.com/", "finalUrl": "https://github.com/", "finalStatusCode": 200, "numberOfRedirects": 1, "loop": null, "error": null, "seo": { "permanent": true, "httpsUpgrade": true, "hostChange": "none", "chainTooLong": false }, "chain": [ { "url": "http://github.com/", "statusCode": 301, "statusMessage": "Moved Permanently", "redirectTo": "https://github.com/", "mechanism": "http", "redirectType": "same-origin", "ip": "140.82.113.3", "latency": 19, "service": null, "dns": { "a": [ "140.82.113.4", "140.82.114.4", "140.82.114.5", "185.199.108.105", "185.199.109.105", "185.199.110.105", "185.199.111.105", "140.82.112.31", "140.82.112.32", "140.82.113.31", "140.82.113.32", "140.82.114.31", "140.82.114.32" ], "aaaa": [], "cname": [], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": null }, { "url": "https://github.com/", "statusCode": 200, "statusMessage": "OK", "redirectTo": null, "mechanism": null, "redirectType": null, "ip": "140.82.113.3", "latency": 36, "service": null, "dns": { "a": [ "140.82.113.4", "140.82.114.4", "140.82.114.5", "185.199.108.105", "185.199.109.105", "185.199.110.105", "185.199.111.105", "140.82.112.31", "140.82.112.32", "140.82.113.31", "140.82.113.32", "140.82.114.31", "140.82.114.32" ], "aaaa": [], "cname": [], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } } ], "canonical": "https://github.com/", "xRobotsTag": null }, { "startUrl": "https://github.com/", "finalUrl": "https://github.com/", "finalStatusCode": 200, "numberOfRedirects": 0, "loop": null, "error": null, "seo": { "permanent": null, "httpsUpgrade": false, "hostChange": "none", "chainTooLong": false }, "chain": [ { "url": "https://github.com/", "statusCode": 200, "statusMessage": "OK", "redirectTo": null, "mechanism": null, "redirectType": null, "ip": "140.82.113.3", "latency": 36, "service": null, "dns": { "a": [ "140.82.113.4", "140.82.114.4", "140.82.114.5", "185.199.108.105", "185.199.109.105", "185.199.110.105", "185.199.111.105", "140.82.112.31", "140.82.112.32", "140.82.113.31", "140.82.113.32", "140.82.114.31", "140.82.114.32" ], "aaaa": [], "cname": [], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } } ], "canonical": "https://github.com/", "xRobotsTag": null }, { "startUrl": "http://www.github.com/", "finalUrl": "https://github.com/", "finalStatusCode": 200, "numberOfRedirects": 2, "loop": null, "error": null, "seo": { "permanent": true, "httpsUpgrade": true, "hostChange": "www-to-apex", "chainTooLong": false }, "chain": [ { "url": "http://www.github.com/", "statusCode": 301, "statusMessage": "Moved Permanently", "redirectTo": "https://www.github.com/", "mechanism": "http", "redirectType": "same-origin", "ip": "140.82.113.3", "latency": 22, "service": null, "dns": { "a": [ "140.82.113.3" ], "aaaa": [], "cname": [ "github.com" ], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": null }, { "url": "https://www.github.com/", "statusCode": 301, "statusMessage": "Moved Permanently", "redirectTo": "https://github.com/", "mechanism": "http", "redirectType": "cross-origin", "ip": "140.82.113.3", "latency": 35, "service": null, "dns": { "a": [ "140.82.113.3" ], "aaaa": [], "cname": [ "github.com" ], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } }, { "url": "https://github.com/", "statusCode": 200, "statusMessage": "OK", "redirectTo": null, "mechanism": null, "redirectType": null, "ip": "140.82.113.3", "latency": 28, "service": null, "dns": { "a": [ "140.82.113.4", "140.82.114.4", "140.82.114.5", "185.199.108.105", "185.199.109.105", "185.199.110.105", "185.199.111.105", "140.82.112.31", "140.82.112.32", "140.82.113.31", "140.82.113.32", "140.82.114.31", "140.82.114.32" ], "aaaa": [], "cname": [], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } } ], "canonical": "https://github.com/", "xRobotsTag": null }, { "startUrl": "https://www.github.com/", "finalUrl": "https://github.com/", "finalStatusCode": 200, "numberOfRedirects": 1, "loop": null, "error": null, "seo": { "permanent": true, "httpsUpgrade": false, "hostChange": "www-to-apex", "chainTooLong": false }, "chain": [ { "url": "https://www.github.com/", "statusCode": 301, "statusMessage": "Moved Permanently", "redirectTo": "https://github.com/", "mechanism": "http", "redirectType": "cross-origin", "ip": "140.82.113.3", "latency": 34, "service": null, "dns": { "a": [ "140.82.113.3" ], "aaaa": [], "cname": [ "github.com" ], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } }, { "url": "https://github.com/", "statusCode": 200, "statusMessage": "OK", "redirectTo": null, "mechanism": null, "redirectType": null, "ip": "140.82.113.3", "latency": 39, "service": null, "dns": { "a": [ "140.82.113.4", "140.82.114.4", "140.82.114.5", "185.199.108.105", "185.199.109.105", "185.199.110.105", "185.199.111.105", "140.82.112.31", "140.82.112.32", "140.82.113.31", "140.82.113.32", "140.82.114.31", "140.82.114.32" ], "aaaa": [], "cname": [], "ns": [ "dns1.p08.nsone.net", "dns2.p08.nsone.net", "dns3.p08.nsone.net", "dns4.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net", "ns-1283.awsdns-32.org", "ns-1707.awsdns-21.co.uk" ] }, "tls": { "protocol": "TLSv1.3", "trusted": true, "issuer": "Sectigo Limited", "expires": "2027-01-27T23:59:59.000Z", "error": null } } ], "canonical": "https://github.com/", "xRobotsTag": null } ]}