Promo code+10% bonus tokens on any top-upTop up →
IndexFix Tools
Runs in your browser

.htaccess redirect tester

One wrong RewriteCond can send a whole site into a redirect loop. Paste the rules and a few URLs and see where each one ends up before the file goes live.

Your data stays in your browser. Nothing is uploaded or stored.

Instructions

How to use it: .htaccess redirect tester

  1. Paste the rules from your .htaccess (RewriteEngine On and the redirect lines).
  2. Paste the URLs to test, one per line: old pages, http and www variants, URLs with parameters.
  3. Leave Follow redirects on to see chains on the same host.
  4. Click Test rules and read the result for each URL.
  5. Fix chains and loops, then test again and download the CSV for your records.

Key facts

Where to get the data

Rules

RewriteEngine, RewriteBase, RewriteCond, RewriteRule, Redirect, RedirectPermanent, RedirectTemp and RedirectMatch. Other directives are skipped.

URLs

Full addresses or paths. A path such as /old/ is tested on example.com.

File checks

Conditions such as -f and -d depend on the server's files. Choose whether the tester should treat the requested file as existing.

Order matters

Rewrite rules run top to bottom. A broad rule placed before a specific one catches its URLs first. Put specific redirects first and general ones (https, www) in a way that sends each URL to its final address in one hop.

Don't mix mod_alias and mod_rewrite

Redirect and RewriteRule are handled by different modules and don't follow the order of lines in the file. Use one of them for the same URLs.

What the simulation can't know

The tester doesn't see your server config, other .htaccess files in subfolders, environment variables or the file system. Test on a staging server too and check live URLs with a redirect checker after deploying.

Next step

After deploying the rules, follow the post-migration SEO checklist so nothing gets lost.

Questions and answers

Why is my rule ignored?

Common reasons: RewriteEngine On is missing, the pattern starts with / (in .htaccess the leading slash is removed), or an earlier rule with the L flag already handled the URL.

301 or 302?

Use 301 (or 308) for permanent moves. Without a code, R sends a 302, which tells Google the move is temporary.

Does it support Nginx?

No, only Apache syntax. The redirect map generator writes Nginx rules from a list of old and new URLs.

Is my file uploaded?

No. The rules and URLs are processed in your browser.

Sources

Other free tools