< All Topics
   

Some important configuration files on your hosting account are hidden by default. The most common of these is the .htaccess file, which controls critical functions like redirects, password protection, and URL rewriting. If you can’t see it in cPanel’s File Manager, you may need to enable the option to display hidden files.

Hosted.com® makes it simple to adjust this setting and manage your hidden files securely.

What is the .htaccess File?

The .htaccess (Hypertext Access) is hidden files configuration that allows you to control various server-side behaviors without editing core server files.

Common uses include:

  • Redirects: Forward traffic from one page or domain to another.
  • Security rules: Block specific IP addresses or restrict access.
  • Password protection: Protect certain folders with a username and password.
  • URL rewriting: Create cleaner, SEO-friendly links (e.g., yourdomain.com/about instead of yourdomain.com/about.php).
  • Custom error pages: Display tailored error messages like 404 (Page Not Found).

Because these files can directly affect how your website functions, they’re hidden by default to prevent accidental changes.

How to View Hidden Files in cPanel

Follow these steps to reveal hidden files like .htaccess in File Manager:

1. Login to your Hosted.com® account.

2. Navigate to your web hosting plan from the Manage Services menu.

How To View Hidden Files in cPanel’s File Manager

3. Click Manage next to the hosting plan associated with your domain.

4. Click Login next to Control Panel to open cPanel.

How To View Hidden Files (.htaccess) in cPanel’s File Manager

5. In cPanel, go to Files and click File Manager.

How To View Hidden Files in cPanel’s File Manager

6. In File Manager, click Settings at the top-right corner of the page.

7. A preferences window will open. Check Show Hidden Files (dotfiles).

How To View Hidden Files in cPanel’s File Manager

8. Click Save, and the File Manager will refresh to display hidden files, including .htaccess.

Additional Information

  • Editing .htaccess: You can edit the file directly in File Manager by right-clicking and selecting Edit. Be cautious; incorrect changes may harm your website.
  • Backups: Always download a backup copy of your .htaccess file before editing so you can restore it if necessary.
  • Creating a New .htaccess File: If no .htaccess file exists, you can create one in File Manager by selecting + File. Ensure you name it exactly .htaccess (with a dot at the beginning).
  • Multiple .htaccess Files: Subdirectories may also contain their own .htaccess files, which override rules set in parent directories.
  • Security Tip: Avoid exposing sensitive information in your .htaccess file. Keep permissions restrictive (644 is recommended).
Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?