.htaccess Redirect Generator

.htaccess Redirect Generator

Bulk 301 redirects

Paste data from Excel or upload a file: column A is the old URL and column B is the new URL.
One URL per line. The lists are matched by line number.
Optional. For www normalization, the domain is detected from the first absolute new URL; otherwise the current host is used.
Apache version
Protocol
WWW preference
Trailing slash
Index files

Generated .htaccess code

Input diagnostics

    Back up your existing .htaccess file and place generated redirects before the Laravel or CMS front-controller rules. Test the result on a staging site first.

    The .htaccess Redirect Generator creates bulk Apache 301 redirects from URL mappings. Paste two columns from Excel, upload XLSX, XLS, CSV or TSV, or switch to separate old-URL and new-URL lists. Rows are matched in order, so even a large migration map can be prepared without writing RewriteRule directives by hand.

    Before generating code, the tool checks malformed addresses, duplicate sources, conflicting destinations, self-redirects, redirect chains and cycles. Paths and query strings are handled separately, percent-encoded paths are validated, and every problem points back to its source line.

    Canonicalization presets can enforce HTTPS, select www or non-www, add or remove trailing slashes and redirect index.php or index.html to the directory. Output is available for Apache 2.4+ and legacy Apache 2.2.

    Place the generated block before CMS front-controller rules and test it on staging. Point every obsolete URL directly to its final canonical page: short redirect paths improve crawling, preserve bookmarks and help search engines transfer ranking signals during a redesign, domain move or URL-structure change. Processing happens locally in the browser.

    Related