Redirect Rule Tester: See Which Rule Matches a URL

Paste your redirect rules and a list of URLs. The tool shows which rule fires first, the status code, the destination and any chain or loop.

Use the tool

Why this tool exists

Rule order and wildcards cause most redirect surprises: a broad rule above a specific one, a wildcard that catches too much, a rule that sends a URL into a loop. Testing URLs against the rules on paper is faster than deploying and checking with curl.

It reads Apache Redirect and RedirectMatch, Nginx rewrite and one-line location blocks, and Netlify style rules with * and :placeholders. The Apache behaviour (path prefix, query string carried over) was checked against apache2 2.4. Nginx and Netlify follow their documentation and were not run on the real servers. Real servers also have their own precedence rules, so treat this as a good first check.

How to use it

  1. Paste your rules, one per line.
  2. Paste the URLs you want to test.
  3. Read the match, status and destination for each URL.
  4. Check the chains and loops and the list of rules that were not simulated.

Frequently asked questions

Which rule wins?

The first matching rule in the order you pasted. Real servers may differ: nginx prefers exact locations and Apache orders modules.

Are query-string rules supported?

No. Rules that match query parameters or hosts are listed as not simulated.

Does it call my server?

No. Everything is computed from the text you paste.

Why does a Netlify rule match with and without a slash?

The tester also tries the other slash form. This is an assumption that I could not verify.