Mar 02, 2026
Tomas A.
2min Read
.htaccess (hypertext access) is a hidden file used to configure additional features for websites hosted on Apache Web Server. With it, you can rewrite URL, password-protect directories, enable hotlink protection, disallow access to specific IP addresses, change your website’s time zone or alter default index page, and much more. Here you’ll learn how to locate and create .htaccess file.
We will show how to locate and open .htaccess file in both Hostinger’s hPanel and cPanel.
Finding and editing the file in Hostinger’s hPanel takes only a few clicks. Here’s how to do it:
If you are using cPanel, the process is more or less similar.
Important! This only applies to cPanel-based hosting platforms.
If .htaccess file is not present, here’s how you create one. This method is applicable to both hPanel and cPanel:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPres

You’ve learned how to locate and create .htaccess file using the File Manager. .htaccess enables you to create website redirects, set default pages, password-protect directories and much more.
If you have any questions regarding this guide, let us know in the comments below!