Home › Developer Tools › .htaccess Generator
.htaccess Generator · offline generation · 100% private client-side calculations
Choose from common .htaccess configurations: redirect HTTP to HTTPS, redirect www to non-www (or vice versa), set up 301 URL redirects, enable Gzip compression, set browser caching headers, or restrict directory access.
Fill in the specific values for each rule - source and target URLs for redirects, domain for canonicalization, directory paths for protection.
Get the complete, correctly formatted .htaccess file - upload it to your web root or merge the rules into an existing .htaccess file.
Generate the robots.txt file that works alongside your .htaccess.
Build the sitemap.xml referenced in your robots.txt.
Reference 301/302 and other redirect codes used in .htaccess rules.
Test the regex patterns used in RewriteRule and RewriteCond directives.