What is 403 error and How to fix it?

What is 403 error and How to fix it?

Are you facing the 403 error on your website? 

If yes, don’t worry. It is a common problem that most WordPress users come across at least once. 

If you don’t solve the problem soon, you might lose a number of your potential clients. Don’t panic, though. Resolving this problem is much easier than you might think.

This article will talk about what is a 403 error and learn what might cause this problem. There are additional tips on how to fix the problem as well. 

What is a 403 Error?

A 403 error is an HTTP response status code that generally appears when the server permission does not allow the client to access the requested page.

There are multiple ways to encounter this problem as different browsers show different messages for the 403 error. It may also appear as:

  • Forbidden
  • Error 403
  • 403 Forbidden
  • HTTP Error 403.14 – Forbidden
  • HTTP 403
  • Error 403 – Forbidden
  • HTTP Error 403 – Forbidden

What Causes a 403 Error in WordPress?

There are multiple reasons why you might face this problem. The most common cause of 403 errors in WordPress is poorly configured security plugins. Most of the WordPress security plugins block the IP address if they analyze the site as malicious.

The other reasons for this problem could be incorrect file/folder permission or a corrupt .htaccess file.

You might also face this problem if your WordPress hosting company makes some accidental changes in the server settings.

You can determine other reasons by identifying the sub-status as follows: 

  • 403.1 – Execute access forbidden.
  • 403.2 – Read access is forbidden.
  • 403.3 – Writing access is forbidden.
  • 403.4 – SSL needed 
  • 403.5 – SSL 128 needed.
  • 403.6 – IP address rejected.
  • 403.7 – Client certificate needed.
  • 403.8 – Site access is denied.
  • 403.9 – Too many users.
  • 403.10 – Invalid configuration.
  • 403.11 – Change of password.
  • 403.12 – Mapper denied your access.
  • 403.13 – Client certificate is revoked.
  • 403.14 – Directory listing is denied.
  • 403.15 – Client Access Licenses are exceeded.
  • 403.16 – Client certificate is invalid.
  • 403.17 – Client certificate is not valid or expired.
  • 403.18 – Cannot execute the request from that application pool.
  • 403.19 – Cannot execute the CGIs for the client in this application pool.
  • 403.20 – Passport login has failed.
  • 403.21 – Source access is denied.
  • 403.22 – Infinite depth is denied.
  • 403.502 – Multiple requests from the same client IP; Dynamic IP Restriction limit reached.
  • 403.503 – Rejected due to IP address restriction

Depending on the sub-status, you can troubleshoot the problem.

How to Fix 403 Error in WordPress?

Now that you know what 403 error is and what causes it, here are some easy ways to fix it: 

1. Double-check the Website URL.

More often than not, you mistype the website URL you are trying to visit. That is why we recommend double-checking the website URL as the first step after facing a 403 error.

2. Clear Your Browser Cache and Cookies.

Your browser keeps a record of the cache and cookies of the website you visit regularly. The idea of cache is to speed up the website loading you once visited. But those records do not update as you make changes to the site. In such cases, you may face 403 errors. 

We recommend clearing your browser cache and see if it solves the issue.

3. Check if Core Files and Theme Files are Missing.

Check if all the core files of your WordPress are in place. In case of any missing core files, you can manually upload them using the file transferring tool. Also, check that you have uploaded all the theme files properly. Check the index.php files at wp-admin, individual plugin folder, and theme folder. 

4. Check the .htaccess File Configuration.

The .htaccess file defines the web response to user queries such as redirecting, restricting bots access, and more. There are different files for WordPress directories and subdirectories such as wp-includes and wp-admin. 

Most often, the 403 error is due to a corrupt .htaccess file in your WordPress. Here is how you can fix it: 

Access Your .htaccess File.

You need to connect to your site using a file manager or FTP client in cPanel. You need to access your .htaccess file on it. If you cannot find the .htaccess file, go to the ‘Settings’ on your cPanel.

go to setting on FTP
  • Now, check the box that reads “Show hidden files (dotfiles)” and save the changes.
show hidden dotfiles
  • You should now see the .htaccess file.
htaccess file
  • Right-click on it and select the ‘Download’ option. It will save a copy of the file in your system.
  • Now delete the file from that list.
delete the htaccess file
  • Check if your website works now. If doing this resolved the 403 error, it means your .htaccess file was corrupt.

You can create a new .htaccess file as follows: 

  • Log in to your dashboard.
  • Go to ‘Settings’ on the left side panel. 
  • Click on the ‘Permalinks’ option. 
  • Scroll down to the ‘Save Changes’ button at the bottom of the page. Click it. 
  • WordPress will now create a new .htaccess file. 
create new htaccess file in WordPress

5. Check the File Permission in WordPress.

All the files of your website have file permission. These permissions determine who can access the files and folder of your site. Sometimes, incorrect permissions can cause a 403 error on your website. Here is how to resolve this issue: 

Caution: If you are not sure about what you are doing, DO NOT continue. Inappropriate file permission can compromise your site’s security. It can be a window for hackers and malware. We suggest taking help from an expert if you are not confident. However, if you do want to do it yourself, here are the steps: 

  • Connect to your website using an FTP client. 
  • Scroll down to the root folder that contains all the WordPress files. 
  • Right-click on the folder and click on the ‘File permissions…’ option.
file permissions option
  • A dialogue box pops up. 
  • Set the numeric value of all the root folders to 744 or 755.
  • Every time you set the value, make sure to select the ‘Recurse into subdirectories’ option. Click on the ‘Apply to directories only’ option. 
  • Set the numeric value of all the files to 644 or 640. Select ‘Recurse into subdirectories’ and click on the ‘Apply to files only’ option.
  • Click on the ‘OK’ button.

NOTE: For the wp-config.php file, set the value to 440 or 400 instead of 644 or 640.

Dialouge box of file permissions

6. Check the WordPress Plugins.

Chances are, you might have recently installed a plugin, and it is causing the 403 error. Here is what you need to do:

  • Deactivate all the plugins using your WordPress dashboard. 
  • Check if your website works now. If it does, then congratulations, you have detected the error.
  • Now re-activate the plugins one-by-one. Check if your website works after re-activating each plugin.
  • Repeat it until your website displays a 403 error once again.
  • The last plugin you re-activated is the faulty one. Delete that plugin and search for its alternative with similar functionality.

Note: Most of the time, security plugins and caching plugins are the ones that cause the 403 error. Keep an eye on those plugins.

7. Deactivate Browser Extension.

Most of the users install some extensions on their browsers. While troubleshooting the 403 error, we recommend deactivating all those extensions. 

8. Check Your Firewall Settings.

Your firewall may be blocking the requested page and causing the 403 error. Disable your firewall settings while troubleshooting the 403 error.

FAQs (Frequently Asked Questions)

Q. Does 403 error affect search engine rankings?

Yes, if your site is showing a 403 error and you don’t take care of it promptly, search engines downgrade your site’s ranking. Eventually, the search engine’s algorithm removes the inaccessible pages to the users or bots from the index.

Q. How to get rid of a 403 error?

There are mainly seven ways to get rid of a 403 error: 

• Check the website URL for any typo errors.
• Clearing browser cache and cookies.e
• Check if core files and theme files are missing.
• Check the .htaccess file configuration.
• Check the file permissions.
• Check the WordPress plugins.
• Deactivate your browser extensions. 
• Deactivate your firewall settings. 

We have explained these seven methods in the above section. Check it out.

Conclusion

Multiple factors may cause 403 errors on a website. Detecting the prominent cause in your case can be quite irritating. Don’t give up yet. Fixing it requires patience and perseverance through all the methods explained above one by one. One of those methods is sure to get your site back into action. If the issue persists, feel free to hit us in the comment section below.

Leave a Reply

Your email address will not be published.