Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Redirect Checker

Free, open-source redirect chain checker. Tests all four URL variations of any domain (http, https, www, non-www) simultaneously and traces every redirect hop.

Use the live tool →

What it does

Every domain has four entry points a browser or crawler might hit:

Variation URL
HTTP http://domain.com
HTTPS https://domain.com
HTTP + WWW http://www.domain.com
HTTPS + WWW https://www.domain.com

Each can redirect differently. Most tools test one URL at a time. This checks all four at once and traces every hop — so you can spot redirect chains, loops, and misconfigurations in a single view.

Supports bulk checking up to 20 domains per request.

Self-host

Requirements

  • Node.js 18+

Install and run

git clone https://github.com/differencemaker0001/redirect-checker.git
cd redirect-checker
node api.js

The API starts on http://127.0.0.1:8093. Change the port and host with environment variables:

PORT=3000 HOST=0.0.0.0 node api.js

systemd service (Linux)

[Unit]
Description=Redirect Checker API
After=network.target

[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/node /path/to/redirect-checker/api.js
Environment=PORT=8093
Restart=on-failure

[Install]
WantedBy=multi-user.target

Reverse proxy (Caddy)

handle /api/redirect-check {
    reverse_proxy 127.0.0.1:8093
}

Reverse proxy (Nginx)

location /api/redirect-check {
    proxy_pass http://127.0.0.1:8093;
    proxy_set_header X-Forwarded-For $remote_addr;
}

API reference

POST / — single domain

{ "domain": "example.com" }

The API strips protocols, www., trailing paths, and port numbers. All of these resolve to the same check: example.com, https://www.example.com, http://example.com/some/path, www.example.com:443.

Response:

{
  "domain": "example.com",
  "results": [
    {
      "startUrl": "http://example.com",
      "chain": [
        { "url": "http://example.com", "status": 301, "location": "https://example.com/" },
        { "url": "https://example.com/", "status": 200 }
      ]
    },
    {
      "startUrl": "https://example.com",
      "chain": [
        { "url": "https://example.com", "status": 200 }
      ]
    }
  ]
}

POST / — bulk (up to 20 domains)

{ "domains": ["example.com", "another-site.org", "third.dev"] }

Same input cleaning rules apply. Duplicates are deduplicated automatically.

Response:

{
  "bulk": true,
  "results": [
    {
      "domain": "example.com",
      "results": [
        {
          "startUrl": "http://example.com",
          "chain": [
            { "url": "http://example.com", "status": 301, "location": "https://example.com/" },
            { "url": "https://example.com/", "status": 200 }
          ]
        }
      ]
    }
  ],
  "invalid": ["not a domain"]
}

Chain step fields

Field Type Description
url string The URL that was requested
status number or string HTTP status code, or "error" / "timeout" / "loop"
location string Redirect target (only on 3xx responses)
note string Error detail (only on non-HTTP responses)

Rate limiting

10 checks per minute per IP. Each domain in a bulk request counts individually — a 5-domain bulk request uses 5 of your 10. Returns 429 when exceeded.

Limits

  • 20 domains max per bulk request
  • 10 redirect hops max per chain ("loop" status if exceeded)
  • 8-second timeout per variation ("timeout" status)
  • Domain input capped at 253 characters
  • Request body capped at 8 KB

How it works

The checker follows redirects manually using HEAD requests instead of letting the HTTP client auto-follow. For each URL variation it sends a HEAD request, records the status code, and if the response is a 3xx with a Location header, follows the redirect. This repeats until it hits a non-redirect response, an error, or the 10-hop limit.

HEAD requests skip downloading page bodies, making redirect chain detection faster.

For more on why redirect chains matter for SEO, common misconfigurations, and how to fix them, see the live tool's documentation.

License

MIT

About

Free, open-source redirect chain checker. Tests all 4 URL variations (http/https/www/non-www) of any domain simultaneously and maps every redirect hop.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages