How to Find the Missing htaccess File?


A common question for new website owners is locating the .htaccess file.  Many online tutorials will guide you on making changes to this file but when you look for it, it doesn't appear to be there.

What is a .htaccess File?

It is important to understand that .htaccess is a powerful web-based file that controls a website’s high-level configuration and operation. With its help, you can modify the settings of your website without editing the server configuration files. Changing this file can break your hosting so be carefull and ensure you have backup before you make any changes.

Why is Your .htaccess File Not Showing?

Each website root folder should have it's own .htaccess file. Due to the possibility of breaking your hosting account by changing the .htaccess file, it is hidden by default or (unlikely) it may not even exist.  The first step is to show the hidden files and see if it already exists.

How to show hidden files in cPanel

Follow these steps to show your hidden files in cPanel File Manager including your .htaccess file.

  1. Login to your cPanel account.
  2. In the Files section, click on File Manager
  3. At the top-right of the screen, locate and click on the Settings button:
  4. Make sure the Show Hidden Files option is ticked and then click on Save:

You can now see all the hidden files (including .htaccess files) in your cPanel’s File Manager.

If the .htaccess file still does not appear, then it doesn't exist.

How to create the .htaccess file

If your .htaccess doesn't exist you can create one manually. Follow these steps:

  1. Login to your cPanel account.
  2. In the Files section, click on File Manager
  3. Make sure you are in the root folder of your website.  For most sites, this is the /public_html folder.
    note: For add-on domains and sub-domains this will be the folder you created when you added the domain to cPanel.
  4. At the top left of the screen, click on the + File button:
  5. In the New File Name: box type in .htaccess.
    Make sure the folder is correct and then click on Create New File:
  6. You will now see the .htaccess file in File Manager:
  7. Single-click on the file (the row will turn blue) and then click on the Edit button in the top toolbar.
    Note: If you see an Encoding warning, click on the Edit button again in the new window.
  8. You can now add in any directives you wish into the file editor.
    Remember to click Save Changes to save the file:

Was this answer helpful?

Still need help?

Our friendly support team are ready to offer assistance with any issues you may be encountering.
Click the button below to open a ticket:
Open Ticket

 WP Squared Hosting

WordPress Hosting on WP Squared
Experience the best in Australian WordPress hosting with this powerful, easy-to-use, WordPress platform.

 Build Your Website

Sitejet Hosting
Build your site fast with a drag and drop editor with no coding required. 140+ quality, templates to get you started.

 Register Domains

It all starts with your domain name
Find the perfect domain and register now with our competitive pricing on all extensions.

 Web Hosting

Fast, local, secure hosting
Full featured hosting on cPanel with multiple server locations around the country.
« Back