What is a .htaccess file?
.htaccess files are configuration files that let you control how your website is accessed e.g. password protect access to content or rewriting long web addresses to shorter, easier to remember ones.
A .htaccess file is a simple text file. Its name looks similar to a file extension like .txt or .html, however the entire filename is just .htaccess. You can use any plain text editor to create a .htaccess file (e.g. Windows - notepad, Mac – textedit).
Some computers hide .htaccess files in folders by default.
On Windows you will need to turn on the Show hidden files and folders option under Folder and Search Options.
On Mac you will need to run the following Terminal commands:
defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder
This will show you all of hidden files and folders on your Mac, note that editing hidden files can break things. To stop showing all hidden files run the same command again but replace TRUE with FALSE.
Some FTP programs don't show .htaccess files by default. To show hidden files in Filezilla follow our How to change file permissions via FTP guide for instructions on how to do this.