Redirect Chain
free/v1/domain/redirectFollows and documents the complete redirect chain from a URL to its final destination. Identifies redirect types (301, 302, 307, 308, meta refresh) and potential issues.
What It Does
Makes HTTP requests following all redirects while recording each hop. Documents status codes, redirect types, response headers, and timing for each step. Identifies common issues like redirect loops, mixed content (HTTPS to HTTP), and excessive chain length.
Why It's Useful
Redirect chains impact SEO (passing link equity), page load speed, and can introduce security issues. Understanding the complete chain helps diagnose problems and optimize user experience.
Use Cases
SEO Audit
Identify redirect chains that dilute link equity or slow down page indexing.
Optimize redirects to improve SEO performance and crawl efficiency.
Migration Verification
After site migration, verify old URLs properly redirect to new locations.
Ensure migration redirects are working and not creating chains.
Security Analysis
Detect open redirects or suspicious redirect patterns in phishing investigations.
Identify malicious redirect patterns used in phishing campaigns.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Required | The URL to trace redirects fromExample: http://example.com |
Response Fields
| Field | Type | Description |
|---|---|---|
originalUrl | string | The starting URL |
finalUrl | string | The final destination after all redirects |
chain | array | Each redirect hop with status code and URL |
totalRedirects | number | Number of redirects in chain |
isLoop | boolean | Whether a redirect loop was detected |
issues | array | Detected problems (loops, mixed content, etc.) |
totalTimeMs | number | Total time to trace the chain in milliseconds |
Code Examples
curl "https://api.edgedns.dev/v1/domain/redirect" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "url=http://example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/redirect?url=http%3A%2F%2Fexample.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/domain/redirect',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'url': 'http://example.com'
}
)
data = response.json()
print(data)Read the full Redirect Chain guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Redirect Chain endpoint live in the playground.