curl -I -L "https://example.com"
import requests
url = "https://example.com"
response = requests.get(url, allow_redirects=True)
print(f"Final URL: {response.url}")
print(f"Status: {response.status_code}")
print(f"Redirect chain:")
for r in response.history:
print(f" {r.status_code} → {r.url}")Permanent redirect. The resource has moved to a new URL. Browsers and search engines update cached URLs.
Temporary redirect. The resource temporarily lives at a different URL. Bots should not update their links.
Like 302, but the HTTP method must not change (POST stays POST). Introduced in HTTP/1.1.
Like 301, but the HTTP method must not change. The modern permanent redirect for non-GET requests.
Enter a URL to check redirects
Traces where a URL ultimately lands and generates curl & Python commands for manual inspection.