Short answer: In cPanel File Manager, click 'Settings' in the top-right corner, check 'Show Hidden Files (dotfiles)', and save to reveal concealed configuration files like .htaccess.
Learn how to reveal hidden files (dotfiles like .htaccess, .user.ini, and .env) in cPanel File Manager and edit configuration directives safely.
Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup
Quick reference
| Location | cPanel > Files > File Manager > Settings (top-right gear) |
|---|---|
| Option Name | Show Hidden Files (dotfiles) |
| Common Dotfiles | .htaccess, .user.ini, .env, .well-known |
Steps
- Open File Manager: Under Files, click File Manager.
- Enable Hidden Files in Settings:
- In the top right corner of the File Manager toolbar, click the Settings button (gear icon).
- In the Preferences modal, check the box for Show Hidden Files (dotfiles).
- Click Save.
- Locate and Edit .htaccess:
- Navigate to your website root directory (usually
public_html). - Right-click the
.htaccessfile and select Edit. - Confirm the UTF-8 encoding dialog and click Edit.
- Navigate to your website root directory (usually
- Best Practice - Create a Backup: Before modifying any directives, right-click
.htaccessand select Copy to create.htaccess.bak. If your edits trigger an HTTP 500 error, restore the backup immediately.
Troubleshooting and tips
- File Still Not Visible: If
.htaccessdoes not exist inpublic_html, click the + File button in the top left, name it exactly.htaccess(including the leading dot), and click Create New File. - HTTP 500 Error After Editing: Syntax errors or unsupported directives will break the site. Revert your changes or restore
.htaccess.bak.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket