How to setup password protected pages on Hostinger
Password protect pages on Hostinger by accessing the File Manager in your control panel, navigating to the desired directory, and using the Password Protect feature to set up authentication. You can also manually create .htaccess and .htpasswd files for more advanced control.
Prerequisites
- Active Hostinger hosting account
- Access to Hostinger control panel
- Basic understanding of file directories
- Website files uploaded to your hosting account
Step-by-Step Instructions
Access Hostinger Control Panel
Open File Manager
Navigate to Target Directory
Enable Password Protection
Configure Protection Settings
Create User Credentials
Save and Test Protection
Manage Protected Areas
Common Issues & Troubleshooting
Password protection option not appearing in File Manager
Ensure you're right-clicking on a folder, not a file. If the option is still missing, try refreshing the File Manager or contact Hostinger support as this feature may not be available on all hosting plans.
Authentication prompt not showing when accessing protected directory
Check that the .htaccess and .htpasswd files were created in the directory. Clear your browser cache and try accessing the URL in an incognito window to rule out caching issues.
Correct password not working for protected page
Verify the username and password are entered correctly with proper case sensitivity. Check if the .htpasswd file exists in the protected directory and contains the encrypted password hash.
Internal server error after enabling password protection
Check the .htaccess file for syntax errors. Ensure the path to .htpasswd file in the .htaccess is correct and uses absolute server paths rather than relative paths.