Skip to main content

Redirect Chain

free
GET/v1/domain/redirect

Follows 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 Specialist

SEO Audit

Identify redirect chains that dilute link equity or slow down page indexing.

Optimize redirects to improve SEO performance and crawl efficiency.

DevOps Engineer

Migration Verification

After site migration, verify old URLs properly redirect to new locations.

Ensure migration redirects are working and not creating chains.

Security Analyst

Security Analysis

Detect open redirects or suspicious redirect patterns in phishing investigations.

Identify malicious redirect patterns used in phishing campaigns.

Parameters

NameTypeRequiredDescription
urlstringRequiredThe URL to trace redirects fromExample: http://example.com

Response Fields

FieldTypeDescription
originalUrlstringThe starting URL
finalUrlstringThe final destination after all redirects
chainarrayEach redirect hop with status code and URL
totalRedirectsnumberNumber of redirects in chain
isLoopbooleanWhether a redirect loop was detected
issuesarrayDetected problems (loops, mixed content, etc.)
totalTimeMsnumberTotal time to trace the chain in milliseconds

Code Examples

cURL
curl "https://api.edgedns.dev/v1/domain/redirect" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "url=http://example.com"
JavaScript
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);
Python
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.