Redirect Checker
Follow every 301, 302, 307 and 308 redirect of a URL and get the full chain with status codes, the final URL and the number of hops.
Result
Press “Run” to see the result.
Give a public url and the API follows its redirects one by one, recording each intermediate URL with its HTTP status code. The response contains the chain (every hop plus the final response), the final_url, final_status, the number of hops and the total response_ms.
Use it to verify HTTP to HTTPS and www to non-www redirects, to detect redirect loops or long chains that hurt SEO, and to resolve short links. Each redirect target is checked again, so redirects to private or internal hosts are refused.
At most 8 redirects are followed (more returns a too_many_redirects error), with a 10 second timeout overall. Only public http/https hosts on ports 80, 443, 8080 and 8443 are allowed.
Use this in your code
curl "https://apibox.io.vn/v1/redirect-check?url=http://github.com" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/redirect-check?url=http://github.com', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/redirect-check?url=http://github.com",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/redirect-check?url=http://github.com');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
How many redirects are followed?
Up to 8. If a URL redirects more often, the API returns a 502 error with code too_many_redirects.
Does it show the status code of each redirect?
Yes. Every entry of chain has the URL and its status (301, 302, 307, 308...); the last entry is the final response.
Can I expand a shortened URL?
Yes. Pass the short link as url; final_url is the destination.