Where is the .htaccess file located

Where is the .htaccess file located

Finding and Editing the .htaccess file.

At some time during your webmaster career you will come across the “.htaccess” file. Like anything new I had no idea what to do with it – normally by default  the .htaccess file is hidden – so until you unhide the file you will never even know that it exists.

In short – in the top right corner in File Manager you will see a “SETTINGS” button – view picture below.

Once you clicked the button you will see this screen:

No when you go back to the main public_html directory you will be able to see and edit the .htaccess file.

The fastest and easiest way to edit an .htaccess file for most people is to use the File Manager in cPanel.

To edit the .htaccess file, first we will open the File Manager:

  1. Login to cPanel.
  2. Click on “File Manager” in the “Files” section.
  3. Select “Document Root for:” and select the domain name you wish to access.
  4. Look for the .htaccess file in the list of files. You may need to scroll to find this file.
  5. Right click on the file and click on “Code Edit” on the menu. (Alternatively, you can click on the icon for the .htaccess file and then click on the “Code Editor” icon at the top of the page.)
  6. A dialogue box may appear asking you about encoding. Just click on the “Edit” button to continue.
    The editor will open in a new window.
  7. Edit the file as needed.
  8. Click on the “Save Changes” button in the upper right hand corner when done.
    The changes have been saved. Test your website to make sure it has the desired effect. If not, correct the error or revert back to the previous version until your site works again.
  9. Once complete, you can click “Close” to close the window.

Once complete, you can click “Close” to close the window.

About the Author

Get your WebsiteUP today - ask us how?

Tomtechy @ Website UP
Get your WebsiteUP today - ash us how info@websiteup.co.za