How to Edit the .htaccess File in the cPanel File Manager

The .htaccess file is a per-directory Apache configuration file that controls redirects, URL rewriting, access rules, custom error pages and more for your website. This guide shows you how to find, create and edit .htaccess safely from the File Manager in cPanel, without needing FTP or SSH access.

The file name begins with a dot, which makes it a hidden file, so it will not appear in File Manager until you enable hidden files. That is the step most people miss.

Last reviewed: 27 July 2026, against cPanel & WHM (current stable release, Jupiter interface). This guide is written for Noiz hosting and is kept current against cPanel. It complements, and does not replace, the official cPanel and Apache documentation linked below.

Official Documentation Reference

Prerequisites

  • An active Noiz cPanel hosting account and your login details.
  • Knowing which website or directory the change applies to. A site's document root is usually the public_html directory.

Editing .htaccess in File Manager

  1. Log in to your cPanel account.
  2. In the Files section, click File Manager.
    The File Manager icon in the Files section of cPanel
  3. Navigate to the directory that holds the .htaccess file. To edit the .htaccess file for your main website, open the public_html directory.
  4. If the .htaccess file is not visible, click Settings at the top right of the File Manager toolbar, tick Show Hidden Files (Dotfiles) in the dialog, and click Save. The .htaccess file should now appear. If it still does not exist, create a new file named .htaccess in that directory.
    The Show Hidden Files (Dotfiles) option ticked in the File Manager settings dialog
  5. Right-click the .htaccess file and choose Edit from the context menu.
    Right-click context menu on the .htaccess file with Edit highlighted
  6. If an encoding confirmation dialog appears, click Edit to continue.
    The File Manager edit confirmation dialog
  7. Make your changes, then click Save Changes. The change takes effect immediately on the next page load.
    Editing the contents of the .htaccess file in the File Manager code editor

Before You Save: Back Up First

A single syntax error in .htaccess can take your whole site offline with a 500 Internal Server Error, because Apache reads the file on every request. Before editing, copy the existing contents into a plain text file, or use Copy in File Manager to keep a backup such as .htaccess.bak. If a change breaks the site, restore the backup or remove the lines you added and save again.

Troubleshooting

The site returns a 500 error after saving: the most recent edit contains invalid syntax or a directive your server does not permit. Restore your backup, or comment out the new lines by adding # at the start of each line, and save.

The .htaccess file still will not appear: confirm Show Hidden Files (Dotfiles) is enabled and that you are in the correct directory. If the file genuinely does not exist yet, use + File in the toolbar to create one named .htaccess (note the leading dot and no file extension).

Need a hand? Noiz support can review or edit your .htaccess file for you. Open a ticket from your Noiz client area and the team will assist.

  • 0 Users Found This Useful
  • cpanel, hosting, htaccess, apache
Was this answer helpful?

Related Articles

How to Upload Files via the cPanel File Manager

The cPanel File Manager lets you upload files to your hosting account straight from your web...

How to Create Folders and Files in the cPanel File Manager

The cPanel File Manager lets you create, organise, and edit your website files directly in your...

How to Edit a File in the cPanel File Manager

You can edit files directly on your website using the built-in File Manager in your cPanel...

How to Create an FTP Account in cPanel

File Transfer Protocol (FTP) lets you upload, download and manage the files in your hosting...

How to Change an FTP Account Password in cPanel

Every cPanel account has a main FTP login plus any number of additional FTP accounts you create...