How To View Hidden Files In cPanel – .htaccess

This articel teaches you how to view hidden files in cPanel. These hidden files are essential for configuring website behaviour, such as redirects, security rules, caching, and most especially when working with platforms like WordPress. The cPanel File Manager hides system files that begin with a dot (.), such as .htaccess, .env, or .user.ini.

If you need to edit or troubleshoot your .htaccess file, you will first need to ensure that File Manager is set to display hidden files.

How to View Hidden Files in cPanel

This article assumes that you have already logged into your Domains.co.za Account and have accessed the cPanel Dashboard – refer below for steps on how to do this.

How To Login To cPanel - Manage WordPress Hosting

How to Access File Manager

1. Scroll down to Files, click File Manager.

How To View Hidden Files (.htaccess) In cPanel - cPanel Domains Tools

2. A pop-up may appear asking you to choose a directory. If so:

3. Choose Document Root for your domain.

4. Tick the option Show Hidden Files (dotfiles).

5 . Click Go.

Enable Hidden Files Manually

6. If you’re already in File Manager and don’t see the pop-up:

  • Click Settings in the top-right corner of File Manager.
How To View Hidden Files (.htaccess) In cPanel - cPanel Domains Tools

7. In the Preferences window, check the box named Show Hidden Files (dotfiles). and click Save.

You’ll now see hidden files such as .htaccess in your site’s file structure.

Additional Information

Control Important Behaviours

The .htaccess file is a powerful configuration file used primarily on Apache web servers to control important server behaviours.

What Hidden Files are Used for

It can be used for setting up URL redirects, enabling or disabling caching, configuring password protection, forcing HTTPS, modifying WordPress permalinks, and restricting access based on IP addresses.

Can’t Find Hidden Files in cPanel

If you can’t find the .htaccess file in File Manager, it may not exist yet (especially on new WordPress installations), or it may still be hidden due to display settings. Enabling Show Hidden Files (dotfiles) in File Manager settings usually resolves this.

Hidden Files General Information

  • To create a new .htaccess file, click + File in File Manager, name the file exactly .htaccess (starting with a dot), and save it in the appropriate directory, such as public_html.
  • Avoid naming it htaccess.txt, as it won’t function correctly.
  • When editing the .htaccess file, always make a backup first. Even a small syntax error can make your entire website inaccessible.
  • Use the built-in cPanel Editor or Code Editor to update your settings securely.
  • File permissions for .htaccess should typically be set to 644, allowing it to be read by the server while remaining secure from unauthorised edits.
  • If your .htaccess file still doesn’t appear after enabling hidden files, it may be stored in a different directory or blocked by file ownership or server rules. If required, contact support for help in restoring or locating the file.

Login to Domains.co.za Account

1. Go to the Domains.co.za Login website page.

How To View Hidden Files (.htaccess) In cPanel - cPanel Domains Tools

2. Enter your Email and Password and click the “Sign In” button.

3. You will see the Domains.co.za Dashboard, displaying the Manage Account menu on the left and your Account Information, Account Overview and Open Support Tickets on the right.

How To View Hidden Files (.htaccess) In cPanel - cPanel Domains Tools

Login to cPanel from your Domains.co.za Dashboard

4. Click on Manage Services to view the sub-dropdown menu and select the hosting package for the domain you want to work with – in our example we are using Web Hosting.

How To View Hidden Files (.htaccess) In cPanel - cPanel Domains Tools

5. Click the Manage button to the right of the domain name you want to access.

6. The display will now show Product Information, Quick Manage, Resource Usage and Site Statistics for that domain name.

How To Login To cPanel - Manage Services WordPress

7. Under Product Information, scroll down to Control Panel, which will display cPanel to the right, and click on the Login button.

How To Login To cPanel - Manage WordPress Hosting

8. The cPanel Dashboard will now be displayed.

What Our Customers say...