Redirect Checker avatar

Redirect Checker

Pricing

Pay per usage

Go to Apify Store
Redirect Checker

Redirect Checker

Follows redirect chains for one or more URLs and reports every hop — status code, Location header, and server info — to the final destination.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Luck Vergouwen

Luck Vergouwen

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Features

Limited permissions

Share

Traces the full redirect chain for one or more URLs and reports every hop — HTTP status code, Location header, Server, and X-Powered-By — all the way to the final destination.

Built on the lightweight apify/actor-node:22 base image. No browser required.


Use cases

  • SEO audits — find unnecessary redirect chains (301 → 302 → 200) that waste link equity and slow page load
  • URL migration checks — verify that old URLs redirect correctly to new ones after a site restructure
  • Short-link analysis — unpack bit.ly, t.co, or custom short links to see the full chain before clicking
  • Security research — detect malicious redirect chains or open redirectors
  • Infrastructure debugging — confirm that CDN, load balancer, or proxy redirects behave as expected
  • Third-party link monitoring — track whether affiliate or partner redirect chains change over time

Input

FieldTypeRequiredDefaultDescription
urlsstring[]Yes—List of URLs to trace
maxRedirectsintegerNo20Max hops per URL before stopping
timeoutinteger (ms)No10000Per-request timeout in milliseconds

Example input

{
"urls": [
"https://bit.ly/3example",
"http://example.com",
"https://t.co/abc123"
],
"maxRedirects": 20,
"timeout": 10000
}

Output

One dataset record per input URL.

FieldTypeDescription
urlstringThe original input URL
finalUrlstring | nullThe last URL reached in the chain
totalRedirectsnumberNumber of redirect hops (0 = no redirect)
chainobject[]Full list of hops (see below)
isLoopbooleantrue if a redirect loop was detected
errorstring | nullError message if something went wrong, otherwise null

Chain hop object

FieldTypeDescription
urlstringURL of this hop
statusCodenumber | nullHTTP status code (e.g. 301, 302, 200), or null on network error
locationstring | nullValue of the Location response header
serverstring | nullValue of the Server response header
xPoweredBystring | nullValue of the X-Powered-By response header

Example output record

{
"url": "http://example.com",
"finalUrl": "https://www.example.com/",
"totalRedirects": 2,
"chain": [
{
"url": "http://example.com",
"statusCode": 301,
"location": "https://example.com/",
"server": "ECAcc (nyb/1D2E)",
"xPoweredBy": null
},
{
"url": "https://example.com/",
"statusCode": 302,
"location": "https://www.example.com/",
"server": "ECAcc (nyb/1D2E)",
"xPoweredBy": null
},
{
"url": "https://www.example.com/",
"statusCode": 200,
"location": null,
"server": "ECAcc (nyb/1D2E)",
"xPoweredBy": null
}
],
"isLoop": false,
"error": null
}

Redirect status codes tracked

CodeMeaning
301Moved Permanently
302Found (temporary redirect)
303See Other
307Temporary Redirect
308Permanent Redirect

Any other status code (200, 404, 500, etc.) is treated as the final destination and ends the chain.


Error handling

  • Timeout — if a hop exceeds timeout ms, the chain stops and error is set to "Request timed out after Xms"
  • DNS / network failure — the chain stops and error describes the failure
  • Malformed Location header — the chain stops and error describes the bad header
  • Redirect loop — detected when a URL appears twice in the chain; isLoop is set to true
  • Max redirects exceeded — the chain stops after maxRedirects hops; error is null but totalRedirects will equal maxRedirects
  • Invalid input URL — a record is written immediately with error set and an empty chain

Pricing

This actor uses pay-per-event billing via the Apify platform. One credit is charged per URL checked (url-checked event), regardless of how many hops the chain contains.


Technical notes

  • Uses native fetch() with redirect: 'manual' — no browser, no Playwright, no Puppeteer
  • Runs on the minimal apify/actor-node:22 Docker image for fast cold starts
  • Relative Location headers are resolved against the current URL using the WHATWG URL API
  • ES module ("type": "module") with top-level await