In this comprehensive guide, we’ll explore everything you need to know about 403 forbidden errors, from understanding root causes to implementing effective solutions. Let´s dive in and tackle the 403 Forbidden error head-on!

Key Takeaways

  • A 403 Forbidden Error signifies you lack permission to access a certain part of a website – it’s like being refused entry by a bouncer.
  • Misconfigured file permissions, .htaccess file errors, and WordPress plugin conflicts are common causes of 403 errors.
  • To fix a 403 error, try resetting file permissions, restoring the .htaccess file, deactivating plugins, or contact your hosting provider for assistance.

What Does the 403 Forbidden Error Mean?

The HTTP status code ‘403 forbidden—you don’t have permission to access this resource’ is displayed when a web server recognizes a user’s request but is unable to allow additional access. This error typically occurs due to insufficient permissions or authentication credentials on the server side.

What Causes the 403 Forbidden Error?

HTTP 403 forbidden errors are typically triggered by a client-side setup issue, so you should be able to fix it independently. One of the most common reasons for a 403 forbidden error is the settings for a specific folder or file. These determine which users can read, write, or execute that folder or file.

In this case, the site owner may have:

  • Changed the settings and denied you from accessing the relevant resources.
  • Failed to put the proper permissions in place.

Other possible causes of a 403 forbidden error include:

  • Incorrect IP address: A domain name directs to an incorrect or outdated IP address hosting a site that prevents you from gaining access.
  • Issues with a WordPress plugin: WordPress plugins that are incompatible with other plugins or set up incorrectly.
  • New link to page: A site owner updates a page’s link, which differs from the version that has been cached.
  • Malware: Malware infections can lead a .htaccess file to be in a state of ongoing corruption, so you would need to get rid of the infection before completing a file restoration.

Any of these causes may be responsible for your site’s 403 forbidden error.

Try These Techniques to Solve Your 403 Forbidden Error

The techniques we’ll explore below focus primarily on 403 forbidden errors associated with file access permissions. But alternative options, including malware scans and emptying your browser’s cache, could also fix the problem.

And while we focus on WordPress websites, you can apply our solutions to different types of sites too.

1. Assess the .htaccess File for Signs of Corruption

The .htaccess file usually remains inside the site’s document root..

Are you using cPanel or Plesk? First, find the File Manager, open the site’s document root directory, then search for the .htaccess file. Not there? In case of cPanel tap ‘Settings’ in the top-right area of the screen, then turn on the ‘Show Hidden Files (dotfiles)’ setting.

In any case, when you find the file, take the following steps to find out whether the 403 forbidden error has been caused by an incorrect configuration:

  1. Right-click on the file then tap ‘Download’ to make a backup.
  2. Delete the file.
  3. Try to access your site — if you can get into it, it’s safe to say that the file was corrupted.
  4. If you want to make a new .htaccess file, sign in to your WordPress dashboard then click on the ‘Settings’ option followed by ‘Permalinks’.
  5. Tap the ‘Save Changes’ button without making changes.

Completing these steps will create a new .htaccess file for your site. But if this process fails to fix the problem, move on to our next technique.

2. Reset Permissions for the File and Directory

Incorrect file or folder permissions could be causing your HTTP 403 issue.

New files carry certain default permissions that determine how you read, write, and execute them. But you can edit permissions for files and folders with FTP. To get started:

  1. Set up an FTP client and connect it to your site.
  2. Right-click ‘publichtml’ after connecting the FTP client, then select ‘File Attributes’.
  3. Input permission ‘755’ in the ‘Numeric value’ field, choose ‘Apply to directories only’, then press ‘ok’.

3. Deactivate Plugins for WordPress

It’s likely that your 403 forbidden error is caused by a plugin which is faulty or simply incompatible if neither of the previous techniques have worked for you. So, we’ll explore how to disable plugins to discover if they’re behind the error.

Follow these steps:

  1. Use FTP to get into your hosting account, or use the file manager in your hosting account, and navigate to the public_html -> wp-content folder.
  2. Find the ‘plugins’ folder.
  3. Change the folder’s name to something simple and relevant, such as ‘plugins-disabled’, to disable all of the plugins.

4. Index Page Uploading

Take a look at the name of your site’s homepage: it should be &lsquoindexphp’ or index.html’. Otherwise, you have two options to consider.

One possibility is to name your homepage either ‘index.php’ or ‘index.html’ instead. Alternatively, if you would prefer to retain the current name, just upload an index page to your public_html directory then set up a redirect to your present homepage.

Empty Your Cache

Our final recommended technique for fixing your 403 forbidden error involves the cache and cookies in your browser. The cache retains data to help websites load more quickly next time you go back to it. But the real page link could be different from the cached one if a site has been updated.

If you use Google Chrome, take the following steps to clear out your cache and cookies:

  1. Tap the ellipsis icon in the top-right area of the screen, then click on ‘Settings’.
  2. Locate the ‘Privacy and security’ section, then tap the ‘Clear browsing data’ button.
  3. Choose the data-deletion time period via the drop-down menu, then select both ‘Cookies and other site data’ and ‘Cached images and files’.
  4. Tap the ‘Clear data’ button to proceed.

read more info :

© 2024 Crivva. All Rights Reserved.