Our Help Portal

Troubleshooting Support Articles
Searchable Help Information Repository
Self-Service Resources How-Tos
Technical Customer Walkthroughs   Browse All Knowledge ! ....

Get Prices Learn More


< All Topics

How to Access .htaccess file in cPanel?

To access the .htaccess file in cPanel, you can follow these steps:

  1. Log in to cPanel:
    • Open your web browser and go to your cPanel login page. This is usually accessed by adding “/cpanel” to your domain (e.g., http://yourdomain.com/cpanel).
    • Enter your cPanel username and password to log in.
  2. Navigate to the File Manager:
    • Once logged in, look for the “Files” section in cPanel.
    • Click on the “File Manager” icon. This will open the File Manager interface.
  3. Select the correct domain or directory:
    • In the File Manager, you may need to choose the domain or directory where your .htaccess file is located. If you have multiple domains, make sure you navigate to the correct one.
  4. Show Hidden Files:
    • By default, the .htaccess file is a hidden file. To display hidden files, click on the “Settings” button in the File Manager.
    • Check the box that says “Show Hidden Files (dotfiles)” and save the changes.
  5. Locate and Edit .htaccess:
    • Look for the .htaccess file in the directory. If it doesn’t exist, you can create a new one.
    • Right-click on the .htaccess file and choose “Edit” or “Code Edit.” If the file doesn’t exist, you can create a new one by clicking the “New File” button and naming it “.htaccess.”
  6. Make Changes and Save:
    • Once you’ve opened the .htaccess file for editing, make the necessary changes.
    • After making changes, click the “Save Changes” button.

Remember to be cautious when editing the .htaccess file, as incorrect configurations may lead to issues with your website. If possible, create a backup of the .htaccess file before making changes.