Web Hosting · · Updated

How to Show Hidden Files in cPanel (Like .htaccess)?

Learn how to show hidden files in cPanel File Manager, including .htaccess. Enable dotfiles and fix missing .htaccess fast.

How to Show Hidden Files in cPanel (Like .htaccess)?

How to Show Hidden Files in cPanel (Like .htaccess)

If you can’t see .htaccess or other dotfiles, you probably need to show hidden files in cPanel. This guide explains exactly how to display hidden files in cPanel File Manager, why hidden files don’t appear, and how to fix it safely.

Focus keyword: show hidden files in cPanel

Quick Answer: Show Hidden Files in cPanel

To show hidden files in cPanel, open File Manager, click Settings (top-right), enable Show Hidden Files (dotfiles), then click Save. Your .htaccess and other hidden files should appear immediately.

What Are Hidden Files in cPanel?

In Linux hosting environments, files that start with a dot (.) are treated as hidden by default. That’s why .htaccess, .user.ini, .well-known, .env, and similar files are often called dotfiles. Most people want to show hidden files in cPanel because these files control important website behavior.

The most common hidden file you’ll look for is .htaccess. It can handle redirects, caching rules, security rules, and WordPress permalink settings. If you can’t see it, you can’t edit it—and that’s why learning how to show hidden files in cPanel is essential.

Why Can’t I See My .htaccess File in cPanel?

If you can’t see .htaccess, it’s usually one of these reasons:

  • Hidden files are not enabled: cPanel File Manager may be set to hide dotfiles until you enable the option to show hidden files in cPanel.
  • You are in the wrong folder: Many sites store .htaccess in public_html, but add-on domains or subdomains may have a different document root.
  • .htaccess doesn’t exist yet: Some sites don’t have one until permalinks/rewrites are enabled, or it was deleted.
  • Permissions or ownership issues: Rare, but incorrect permissions can make file access confusing.
  • Wrong interface: You might be checking Web Disk/FTP or another file view with different settings.

The good news: in most cases, the fix is simply to show hidden files in cPanel using one setting.

How to Show Hidden Files (Dotfiles) in cPanel File Manager

Follow these exact steps to show hidden files in cPanel and view .htaccess:

  1. Log in to cPanel for your hosting account.
  2. Open File Manager.
  3. Go to your website folder (most commonly public_html).
  4. Click Settings in the top-right corner of File Manager.
  5. Check the box: Show Hidden Files (dotfiles).
  6. Click Save.
  7. Refresh the file list if needed. Your .htaccess should now be visible.

Once you enable this option, cPanel will continue to show hidden files in cPanel for that browser session, and often remembers it for future visits as well.

Where Is the .htaccess File in cPanel?

After you show hidden files in cPanel, look for .htaccess in one of these locations:

  • Main website: public_html/.htaccess
  • WordPress subfolder: public_html/wordpress/.htaccess (or similar)
  • Add-on domain root: a separate folder set in Domains → Document Root
  • Subdomain root: e.g., public_html/blog/.htaccess

Tip: If your website loads from a specific directory, the active .htaccess is usually inside that directory. If you have multiple .htaccess files, rules can apply differently at different folder levels.

What If .htaccess Still Doesn’t Show Up?

If you already enabled the option to show hidden files in cPanel but still don’t see .htaccess, use this checklist:

1) Confirm you enabled dotfiles correctly

Go back to Settings and verify that Show Hidden Files (dotfiles) is still checked. Then reload File Manager.

2) Confirm you are in the correct directory

If you’re in public_html but your domain points to another folder, you won’t see the correct .htaccess. In cPanel, check the domain’s document root and open that folder in File Manager.

3) The file may not exist

Some sites don’t have a .htaccess until one is created. That’s normal. You can create it safely if your server uses Apache or Apache compatibility rules.

4) You might be on Nginx-only hosting

Many hosts use Apache, LiteSpeed, or Nginx+Apache. On Apache/LiteSpeed, .htaccess works. On Nginx-only servers, .htaccess rules won’t apply (even if a file exists). You can still show hidden files in cPanel, but rewrite/security rules must be configured in Nginx instead.

How to Create a New .htaccess File in cPanel

If you need an .htaccess file and it doesn’t exist, you can create one after you show hidden files in cPanel:

  1. Open File Manager and go to the correct folder (commonly public_html).
  2. Click + File.
  3. Enter the file name exactly: .htaccess (including the dot).
  4. Click Create New File.
  5. Right-click .htaccessEdit and add rules as needed.

Important: A blank .htaccess is fine. Only add rules you understand. A single wrong line can cause website errors like 500 Internal Server Error.

How to Edit .htaccess Safely (Best Practices)

Once you can show hidden files in cPanel and find .htaccess, edit it carefully:

  • Backup first: Download a copy or rename it to .htaccess.bak before major changes.
  • Edit in small steps: Add a few lines, save, test your site, then continue.
  • Use correct syntax: Apache directives are strict. A typo can break the site.
  • Know the stack: Apache/LiteSpeed uses .htaccess. Nginx-only does not.

If you’re unsure, copy your planned rules into a text file first, and keep a rollback option ready. Most “my site broke” cases happen right after editing .htaccess.

How Do I View a List of Hidden Files in cPanel?

After you show hidden files in cPanel, you’ll see dotfiles mixed in with normal files. Common hidden files and folders you may notice include:

  • .htaccess (Apache rules: redirects, rewrites, security)
  • .user.ini (PHP settings for the directory)
  • .well-known (SSL validation, security standards, app associations)
  • .cpanel (cPanel-related configuration data)
  • .softaculous or installer folders (if present)

To confirm you are seeing hidden files correctly, look specifically for .well-known or .htaccess. If they appear, your “show hidden files in cPanel” setting is working.

Troubleshooting: Hidden Files Still Not Visible

Try a hard refresh

Sometimes File Manager caches the view. Refresh your browser tab, or log out and log back into cPanel. Then ensure show hidden files in cPanel is still enabled.

Check for multiple File Manager instances

If you opened File Manager in a pop-up or new tab, your settings may differ per window. Set it again and save.

Check file search

Use the File Manager Search feature and search for: .htaccess. If your host allows it, search can help confirm whether the file exists in another folder.

Confirm permissions (advanced)

On most hosts, .htaccess should be readable by your account. Standard permissions are often 644. If permissions look unusual, fix them carefully and avoid setting insecure permissions like 777.

Why cPanel Hides Dotfiles by Default

Many hosting panels hide dotfiles to reduce accidental edits. Hidden files often control critical site settings. The option to show hidden files in cPanel exists because experienced users sometimes need access, especially for .htaccess troubleshooting.

Hidden files can include security-related files, configuration files, and validation folders. Showing them is safe—but editing them without understanding can cause downtime.

Common Reasons to Show Hidden Files in cPanel

People usually want to show hidden files in cPanel for practical tasks like:

  • Fixing redirects or forcing HTTPS using .htaccess
  • Repairing WordPress permalinks and rewrite rules
  • Blocking access to sensitive files or enabling basic security headers
  • Verifying SSL validation folders like .well-known
  • Adjusting PHP settings via .user.ini
  • Checking if a hidden configuration file exists (and whether it was modified)

In every case, the first step is the same: show hidden files in cPanel and locate the correct directory.

Security Note Before Editing Hidden Files

Hidden files are powerful. After you show hidden files in cPanel, you may see files you’ve never noticed before. Avoid deleting or editing files unless you know what they do. If you’re working on security rules in .htaccess, keep a backup and test changes carefully.

If you suspect your site was hacked, don’t just delete random files. Take a backup, scan for malware, and review file changes methodically.

FAQ: Show Hidden Files in cPanel

How do I show hidden files in cPanel File Manager?

Open cPanel → File Manager → click Settings (top-right) → enable Show Hidden Files (dotfiles) → click Save. This will show hidden files in cPanel immediately, including .htaccess.

Why can’t I see my .htaccess file even after enabling dotfiles?

You may be in the wrong folder, or the .htaccess file may not exist. Check your domain’s document root, then look inside that folder after you show hidden files in cPanel. If it still isn’t there, create a new .htaccess file in the correct directory.

Where is the .htaccess file located in cPanel?

Most sites have it in public_html. Add-on domains and subdomains can have a different document root folder. Once you show hidden files in cPanel, look for public_html/.htaccess or the document root’s .htaccess.

Is it safe to show hidden files in cPanel?

Yes, it’s safe to show hidden files in cPanel. The risk comes from editing or deleting hidden files without understanding them. Always back up .htaccess before changes and test carefully.

What should I do if editing .htaccess breaks my site?

If your site shows a 500 error after editing, revert the change immediately. Rename the file back to a known-good backup (for example, replace .htaccess with .htaccess.bak) or remove the last lines you added. Then reload your site.