Sensitive Files
.htaccess File Presence and Security Check
Learn how to check the presence of your .htaccess file, essential security rules to add, and how to protect sensitive files with simple and effective directives.
What this test checks
This test checks for the presence of the .htaccess file in your site root and evaluates its basic configuration. The .htaccess file allows you to define security rules for Apache, such as protecting sensitive files, disabling indexing, managing redirects, and blocking malicious IP addresses.
Our recommendation
Create or strengthen your .htaccess file with essential rules: 'Options -Indexes' to disable indexing, 'Deny from all' on sensitive files (e.g., .env, wp-config.php), and 'Redirect' to force HTTPS. Regularly test your rules to avoid configuration errors.
Security tests