When I Upload an htaccess File It Disappears

htaccess & Redirects | Updated March 2026

Your .htaccess file is there. You just can't see it. Files that start with a dot (.) are hidden files on Linux, and most FTP clients and file browsers hide them by default. This guide shows how to make hidden files visible in your FTP client and cPanel File Manager.

01. Why .htaccess Is Hidden

On Linux and Unix systems (which web servers run), any file whose name starts with a period is treated as a hidden file. This is a convention, not a permissions issue. The file exists, works correctly, and Apache reads it normally. It's just hidden from directory listings by default.

This means when you upload an .htaccess file, it uploads successfully but then "disappears" from your FTP client's file listing because the client is hiding dotfiles.

02. Show Hidden Files in FileZilla

  1. Connect to your server in FileZilla
  2. Go to Server menu (in the top menu bar)
  3. Click "Force showing hidden files"
  4. Refresh the directory - .htaccess and other dotfiles now appear

This setting persists for the current session. For other FTP clients, look for a similar option in preferences, usually under "Show hidden files" or "Show dotfiles." See our FTP Guide for more FileZilla tips.

03. Show Hidden Files in cPanel File Manager

  1. Open File Manager in cPanel
  2. Click "Settings" (top right corner)
  3. Check "Show Hidden Files (dotfiles)"
  4. Click Save - .htaccess and other hidden files are now visible

04. Common .htaccess Issues

Uploading From Windows

Windows doesn't allow filenames starting with a dot by default. If you create the file on Windows, name it htaccess.txt, upload it, then rename it to .htaccess on the server using File Manager or your FTP client.

Multiple .htaccess Files

You can have .htaccess files in different directories. Each one applies to its directory and all subdirectories below it. If you uploaded to the wrong directory, it may exist but not affect the pages you expect.

File Encoding

Make sure your .htaccess file uses UTF-8 encoding and Unix-style line endings (LF, not Windows CRLF). Some text editors on Windows add a BOM (byte order mark) that can cause Apache to reject the file. Use a code editor like VS Code or Notepad++ and save as "UTF-8 without BOM."

For .htaccess syntax and common rules, see our Complete .htaccess Guide.

htaccess Still Causing Problems?

If your .htaccess file exists but isn't working as expected, open a ticket with the contents of the file and what you're trying to accomplish.

Open a Support Ticket

Quick Recap

  1. The file is there - dotfiles are hidden by default on Linux
  2. FileZilla: Server > Force showing hidden files
  3. File Manager: Settings > Show Hidden Files
  4. Windows users: name it htaccess.txt, upload, then rename to .htaccess
  5. Use UTF-8 without BOM - and Unix line endings

Last updated March 2026 · Browse all htaccess articles · See also: .htaccess Guide

  • 525 Users Found This Useful

Was this answer helpful?

Related Articles

Create a 410 Redirect for Missing Files

Creating a 410 Gone Redirect for Removed Pages   A 410 response tells search engines that a...

How to Create a Temporary 302 Redirect via htaccess

htaccess & Redirects | Updated March 2026 A 302 redirect sends visitors (and search...

Redirecting non-www to www with htaccess

Redirecting non-www to www with .htaccessIf you ever point your www. record to another server...

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow...

htaccess referral redirect

Setting Up a Referral Redirect With .htaccess   A referral redirect (also called a...



Save 30% on web hosting - Use coupon code Hosting30