Can’t see .htaccess in cpanel

If you are unable to see a .htaccess file for your website in the cPanel File Manager, it is usually because Apache is configured to not allow them to be visible. The .htaccess file is an important part of a website, as it helps to manage redirections and access rules for directory contents.

Reasons you can’t see .htaccess in cpanel #

  • Hidden File Settings – cPanel’s File Manager won’t show files that start with a dot character (.) by default. This is because these are typically used for configuration files, and since they are hidden, they are not likely to be edited or deleted by accident.
  • Apache Directives – Apache is configured to not display the .htaccess file by default. This is a security measure so that the contents of the file cannot be accessed from outside of the server.

Solution to Can’t see .htaccess in cpanel #

The solution to make the .htaccess file visible is to enable the “Show Hidden Files” option in cPanel’s File Manager.

  1. Login to your cPanel and open the File Manager.
  2. In the upper-right corner of the window, click the “Settings” button.
  3. Check the box next to the “Show Hidden Files (dotfiles)” option.
  4. Click the “Save” button to save the settings and the .htaccess file will become visible.

Note: It is highly recommended to make a backup of other files before editing them in cPanel File Manager.