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

**1.** Log in to your cPanel account.\
**2.** In the **Files** section, click on **File Manager**.

<figure><img src="/files/CpoSq1gOHek251v0zxSO" alt=""><figcaption></figcaption></figure>

**3.** Navigate to the directory where your .htaccess file is located. To edit the .htaccess file of your root directory, navigate to the public\_html directory.\
\
**4.** If the dot htaccess file does not show, click on **Settings** in the File Manager. You can find the **Settings** button on the right side of the top menu. Mark the **Show Hidden Files (Dotfiles)** option in the new window box and click on **Save**. Now, the dot htaccess file should be present. If it does not exist, create a new one.

<figure><img src="/files/jQGIn4d5puj83rZKuNyS" alt=""><figcaption></figcaption></figure>

**5.** Right-click on the .htaccess file and then **Edit** in the Context Menu.

<figure><img src="/files/HHCgXtgWtgGxRMLy6Yqg" alt=""><figcaption></figcaption></figure>

**6.** In a new window box, click on **Edit**.

<figure><img src="/files/tSIMn2YPc8P5GzBVx9Kv" alt=""><figcaption></figcaption></figure>

**7.** Make changes to your .htaccess file and click on **Save Changes**.

<figure><img src="/files/hpa36gG18EnxaQksoWGd" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clouduxe.com/cpanel-control-panel/how-to-edit-.htaccess-file-in-the-cpanel-file-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
