How to edit the .htaccess file

The .htaccess file is a configuration file and offers possibilities to perform some functions. To edit the .htaccess file, you can use the File Manager from the Files section in you cPanel interface.

The open window will display the folders in your account. The .htaccess file is located in the root folder of each site, and for the primary domain it is in public_html.

The .htaccess file is a hidden one, and if it's not visible when you access the public_html or root of the site, you need to access the Settings button at the top right of the screen

A pop-up window will appear and you'll need to check Show Hidden Files (dot files) followed by the "Save"

This should be visible, and if you right click, you have the Edit option.

Selecting Edit will display a warning window and you will need to confirm the edit once again by selecting Edit.

Enter the desired lines and do not forget to click the "Save Changes" button located at the top of the screen.

  • 52 Users Found This Useful
Was this answer helpful?

Related Articles

What is the control panel?

Hosting customers have access to cPanel and Reseller service customers have access to WHM and...

How to change the PHP version

In order to change the PHP version for your account you will have to follow the bellow steps:1....

How do I login to WHM or cPanel?

To access your hosting account, you have the following ways:     After the domain is propagated:...

How can I reset the cPanel password?

In order to reset the cPanel password you will have to follow the steps listed bellow:1. Click...

How to check what is using my space ?

To check at any time which files or directories occupy the space you need to log in to cPanel and...