.htaccess Generator
Create rules for HTTPS, www, 404 errors, caching, compression and security.
Workspace · .htaccess Generator
Solo se usa como referencia; las reglas usan %{HTTP_HOST}.
Estas directivas son para Apache o servidores compatibles. En Nginx se configuran en el bloque del servidor, no en un .htaccess.
How to use it
Paste the HTML, headers, URL or any data you want to check.
Check the notifications and the result; the verification is carried out in your browser.
Copy the report or the generated code so you can use it wherever you need to.
Examples
HTTPS and without www
Enforce HTTPS and redirect www.tudominio.com to yourdomain.com using Apache rules.
Caching and compression
Add expiry dates for images and compression for HTML, CSS, JavaScript and JSON.
What you need to know
The generator creates a configuration block for Apache with the options you enable. You can combine HTTPS redirection, www normalisation, a custom 404 page, hidden file protection, caching and compression.
The rules must be tested in a staging environment. An incorrect .htaccess file can cause redirect loops or 500 errors. In Nginx, these directives are not applied.
Frequently Asked Questions
Related tools
Other tools that can help with similar tasks.
security.txt generator
Create a .well-known/security.txt file containing contact details and the security policy.
Safety header tester
It assesses CSP, HSTS, nosniff, frame protections, referrer and permissions policy.
Redirect analyser
Check a chain of redirects and detect loops, skips and final destinations.
