1. Knowledge Base
  2. >
  3. Results
  4. >
  5. 403 Forbidden or No Permission to Access

403 Forbidden or No Permission to Access

In this article, we will discuss the following topics:

What does 403 Forbidden mean?

A 403 Forbidden error means that you are not allowed or do not have permission to view the requested file, resource, or page you are trying to view in a browser. A 403 error page is presented in several ways.

  • 403 Forbidden
  • 403. That's an error. We're sorry, but you do not have access to this page.
  • Error 403
  • Error 403 - Forbidden
  • Forbidden
  • Forbidden: You don't have permission to access [directory] on this server.
  • HTTP 403
  • HTTP Error 403 - Forbidden

While sometimes this is intentional, other times, the issue is on your end.

What causes 403 Forbidden errors?

There are many possible causes of 403 Forbidden errors on a website. Here are some of the most common ones.

File Permissions

The files and folders stored on your website each have their own permissions. Permissions can control who can access and view the files or folders on your website. The 403 Forbidden error could mean your file has incorrect or bad permissions.

A string of 3 numbers denotes the permissions. File and folder permissions should show the following:

  • WordPress site files must be 644 or 640.
  • Directories and WordPress folders must be 755.
  • Executable scripts within the cgi-bin folder must be 755.
  • Images, media, and text files like HTML should be 755 or 644.
Hidden Files (Dot Files)

Suppose you see "client denied by server configuration" in your Error Logs. In that case, this usually means bad file permissions, but it could also mean that the visitor is trying to look at a hidden file, like the .htaccess file. You cannot look at that file or any file name that starts with a dot in your browser.

For example, https://example.com/.htaccess will always result in a 403 error.

To resolve a 403 Forbidden error caused by permissions:

  1. Log in to cPanel.
  2. Navigate to the Files section, then click on the File Manager icon.

    cPanel - File Manager

  3. Locate and click your website's directory (also known as the document root) from the list. For this example, we will use public_html.
  4. Once you see your website's files and folders, click the Settings button at the top-right menu.

    File Manager - Settings button

  5. In the pop-up window, select Show Hidden Files (dotfiles), then click Save.

    File Manager - Show Hidden Files

  6. Once all files are displayed, check the Permissions column on the right. Scroll down and see if they follow the correct permissions for files and folders as stated above.

    File Manager - Permissions column

  7. If any of the files or folders seem to have different permission, you may go ahead and change them to default by double-clicking the set of numbers. Click Save once done making the update.

    File Manager - Change Permissions

For more information on how to change file permissions in the File Manager, please check our article, How to change permissions (chmod) of a file.

If your permissions were changed to 000, please contact us via phone or Live Chat so we can assist you. Only one of our Administrators can correct these permissions.

Missing or broken .htaccess file

The .htaccess file could also be the issue itself. Most websites, especially those built with a CMS like WordPress, have a .htaccess file. If you made changes to this file or it is missing for some reason in your website directory, your site would then display the 403 error page. If this happens, you need to update the .htaccess file again or create a new one to resolve this .htaccess error.

Depending on what CMS or application was used to create your website, the script or code in a .htaccess file varies. Please check out the article, Common Default .htaccess Information, for more information about default .htaccess scripts.

To fix a 403 error page caused by a misconfigured or missing .htaccess file:

  1. Click your website's CMS in the Common Default .htaccess Information article. 
  2. Copy the CMS script from the pop-up window. In this example, we will use WordPress.
    # BEGIN WordPress
     RewriteEngine On
     RewriteBase /
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
     # END WordPress
  3. Go to your File Manager and paste the code into your .htaccess file. For instructions on how to update your .htaccess file, please check the article, How to Edit .htaccess in cPanel's File Manager.

If the .htaccess file is missing from your File Manager, create a new one.

  1. Click the + File button located in the top-left menu.

    New File button

  2. Enter .htacess in the pop-up window, then click on the Create New File button.

    Create New File

  3. Open your new .htaccess file and paste the script you copied from the support article as instructed above.

Plugin issues (for WordPress websites)

WordPress plugins are great for adding features and functionality to your website. Still, suppose they're not configured correctly or incompatible with another plugin. In that case, they could cause you to see a 403 error message on your website. This WordPress Plugins article provides tips on understanding how you can identify a bad plugin.

The Plugins Advice page offers some general advice on some commonly used plugins and lists banned plugins. Just take note that HostGator cannot provide direct support for the plugins discussed.

To resolve a 403 Forbidden error caused by WordPress plugins:

Error 403 caused by the plugins can be fixed by disabling and enabling the plugins one by one. You will then identify which of the installed plugins is/are causing the error. Here are helpful articles to guide you in disabling/enabling your plugins.

Still getting the 403 Forbidden Error page?

Here are 'other' possible causes.


Hey, trying to access other websites but getting a 403 Error page?

As discussed above, a 403 error means that you do not have permission to view the website. If you're trying to access other websites and you're getting the 403 Forbidden Error page, here are a few ways to resolve it. 

  • You may need to clear your browser's cache because when you visit a site, sometimes it displays a saved copy of the site. Clearing your cache may resolve your issue, especially without going through further troubleshooting.
  • Check the website's status or reach out to them on social media, such as Twitter or Facebook. They may be aware of the issue because multiple people are experiencing it, or you can find out how to get support if you're the only one.
  • The link may be incomplete or incorrect. As we discussed above, you can't view any files that begin with a dot(.) such as .htaccess in the browser. You also may not have the complete URL or web address.

    For example, https://www.facebook.com/HostGator/photos/a.10150093510632092/ is not a valid link because it stops at the directory /a.10150093510632092. However, the full link - https://www.facebook.com/HostGator/photos/a.10150093510632092/10158726693822092 - works because it resolves to a file that is viewable to the public.

  • Were you able to view this website before and can't now? Maybe you're not logged in, or you're not logged into the right account. Navigate to the login page to see which account you're logged into or login if you're not already.

Additional Resources

For more references on Permissions, please refer to the support guides below.