Are you getting a 403 Forbidden error message in WordPress?
When they get a 403 Forbidden error, most users panic, mainly because it appears to be essential. However, these mistakes should not raise as much concern as they do.
I’ll go through how to resolve the 403 Forbidden WordPress issue rapidly.
But, before I go any further, let’s look at what it is and why it occurs. This way, you’ll be able to comprehend why this happens. As a result, resolving the 403 Forbidden issues will be much easier.
- 1 What is a 403 Forbidden – Access Denied WordPress Error?
- 2 What Is the Root Cause of a 403 Forbidden Error in WordPress?
- 3 Resolving the 403 Forbidden Error in WordPress
- 3.1 Make a Backup
- 3.2 Troubleshooting a 403 Forbidden Error Caused by a WordPress Plugin
- 3.3 Switch back to the Running Version Using Your Hosting Backup
- 3.4 Resolve the 403 Forbidden Error Caused by a Corrupt. htaccess file
- 3.5 Resolve the 403 Forbidden Error in WordPress Caused by File Permissions
- 3.6 Deactivate all plugins
- 4 Steps for Additional Troubleshooting
- 5 Effects of 403 on Search Engine Rankings
What is a 403 Forbidden – Access Denied WordPress Error?
When an issue occurs on your website, WordPress displays codes and notifications.
The error code 403 Forbidden is shown when your server restrictions prevent you from accessing a particular page.
As a result, the error is generally accompanied by the following text:
|Forbidden – 403 On this server, you do not have the authorization to access ‘/.’
Additionally, while using an ErrorDocument to handle the request, it received a 403 Forbidden error.
This error can be seen in a variety of situations. Consider the following scenario:
- Access to the wp-admin or WordPress login pages is blocked with a 403 Forbidden error.
- During the WordPress installation, a 403 Forbidden error occurs.
- When accessing any page on your WordPress site, you’ll get a 403 Forbidden error.
- It’s also conceivable that you’ll get “Access Denied” rather than the entire 403 Forbidden message.
- You could also get a message that says, ‘Access to yourdomain.com has been denied.’ This page is not accessible to you because you do not have permission to see it.’
Now that you’ve learned about the many 403 errors, let’s look at what produces them.
What Is the Root Cause of a 403 Forbidden Error in WordPress?
In WordPress, the most common reason for the 403 Forbidden error is improperly installed security plugins. Many WordPress security plugins can ban an IP address if they suspect them of being malevolent.
That is why we employ Sucuri to enhance the security of all of our WordPress sites.
A corrupt. htaccess file is another possibility. Or perhaps your server’s file permissions are wrong.
Your WordPress hosting provider may occasionally make inadvertent modifications to their server settings. It might lead to a 403 Forbidden error on your website.
Resolving the 403 Forbidden Error in WordPress
Before you start doing anything. We recommend that you create a complete backup of your WordPress website.
If you already had a backup plugin for WordPress installed.
Before proceeding, ensure that you have access to the most recent backup.
The mistake might be challenging to fix because your browser cannot load the scripts. After all, the server does not let them.
That is how to fix the 403 prohibited error if you have a WordPress website.
Follow the instructions carefully to resolve the WordPress 403 refused problem.
Make a Backup
Before proceeding further and attempting the troubleshooting procedures, creating a complete website backup is strongly advised.
Because if something goes wrong during the troubleshooting process. It will assist you in quickly recovering your website.
Troubleshooting a 403 Forbidden Error Caused by a WordPress Plugin
The first step is to disable all WordPress plugins temporarily. Any security plugins are included in this that you may have put up on your website.
If this fixes your issue, this implies that one of your website’s plugins was generating the problem.
You may determine which plugin generated the issue unless you can replicate the 403 prohibited error by activating each plugin one at a time.
Switch back to the Running Version Using Your Hosting Backup
Suppose your hosting company provides an application or server-level backup. Then you may roll back to the prior operating version and undo the modifications. For example, your website was operational on March 4th but not on March 5th.
In such a scenario, a few mouse clicks will take you back to the old web version. And attempt to resolve this issue as shown in the illustration below.
It is the application backup part of Cloudways. In addition, I have several backups of my WordPress site.
Resolve the 403 Forbidden Error Caused by a Corrupt. htaccess file
A corrupt. htaccess file on your WordPress site is frequently the source of the 403 error. However, it is pretty simple to repair this file.
First, log in to your cPanel account and connect to your website through an FTP client or file manager.
Then, in the root folder of your WordPress site, look for the—htaccess file.
You must save the—htaccess file to your PC. So you have a new backup of it. Following that, you must remove the file from your server.
Try visiting your website if the 403 prohibited error is fixed. That indicates that your. htaccess file was corrupt.
Log into your WordPress admin area and navigate the Settings » Permalinks page to create a new one—htaccess file.
Click the Save Changes button at the bottom of the page to save your changes. In addition, WordPress will create a new. htaccess file.
Resolve the 403 Forbidden Error in WordPress Caused by File Permissions
File permissions are set on all files hosted on your website. These file permissions govern who has access to your website’s files and directories.
Incorrect file permissions might cause the 403 prohibited error. It causes your webserver to believe you do not have the authorization to view those files.
If the first two methods do not resolve the 403 prohibited issue on your site, try the third. The most likely reason is improper to file permissions.
You can request that your WordPress hosting provider examine your website for proper file permissions. Some hosts are accommodating. They won’t mind and will most likely fix it for you.
Changing file permissions on your own might have significant ramifications if you don’t feel confident in your ability to accomplish it yourself.
Then, enlist the assistance of a friend or employ a professional.
Suppose you want to do it yourself, on the other hand. Then, here’s how you’d go about checking your file permissions.
Use an FTP program to connect to your WordPress site. First, go to the root folder, which contains all of your WordPress files.
Right-click to choose a folder. Then select File Permissions from the menu.
Your FTP client will display a file permissions dialogue box similar to this:
The file permissions on all folders on your WordPress site should be 744 or 755.
The file permissions for all files on your WordPress site should be 644 or 640.
You can change the root folder’s file permissions to 744 or 755. First, select the checkbox next to ‘Recurse into subdirectories. Then choose the ‘apply to directories only’ checkbox.
Then, press the OK button. Your FTP client will now begin changing the permissions of all subdirectories in that folder.
After that, you must repeat the process for all of the files. You will utilize file permissions of 644 or 640 this time. Don’t forget to check the box next to ‘Recurse into subdirectories. And ‘apply just to files.’ Options.
When you click the OK button, your FTP client will begin adjusting file permissions for all chosen files.
Now try to visit your website. And the 403 prohibited error should now be gone.
Deactivate all plugins
On WordPress sites, this 403 prohibited error might be caused by a poorly written plugin. As a result, we will disable all of our plugins. Also, check to see whether the problem has been fixed.
To deactivate your plugins, you must once again access your WordPress files through FTP, such as FileZilla.
Change the name of the plugins folder to something like plugins-old in public_html > wp-content.
Return to your browser and verify your webpage. Suppose the website begins to function normally. Then the problem is clearly with the plugin.
You must now rename your plugins-old folder to plugins.
Once you’ve updated the folder’s name, navigate to WordPress Dashboard > Plugins > Installed Plugins. You’ll see that all plugins are disabled by default.
As a result, you must activate each plugin one by one. Also, after each activation, verify your website.
-Activate plugins from the WordPress dashboard
The faulty plugin will be detected as soon as possible.
That is the only thing I have to say about it.
Steps for Additional Troubleshooting
In most situations, you should use one of the three techniques discussed above to resolve the 403 Forbidden issues.
However, in some cases, the mistake may necessitate more investigation. Let’s have a look at these scenarios and their remedies.
Mod_ security is an open-source firewall that some servers use for security. Due to a misconfiguration, it might occasionally result in the 403 Forbidden Error.
This problem necessitates the removal of the mod_ security. You can do it yourself if you follow the procedures outlined below. You can also seek assistance from your hosting provider.
It may disable mod_ security by adding the following code to the top of your—htaccess file with an FTP client.
If the problem persists, remove the previously added code as it may provide a security risk.
Hotlink Protection is a cPanel feature that stops other websites from directly connecting to your files. These files are frequently taken. As a result, the 403 error might appear as an inability to see specific photos.
Because this option is used to limit access. When you cannot view a file (image), the error message appears, which should be available.
(Re)configure your Hotlink Protection to resolve this issue. Using your username and password, log into cPanel. To get to the Security section, scroll down.
And then choose Hotlink Protection.
The only thing left to do is fine-tune the settings. Typically, this entails adding more file extensions to the “Block direct access” box. And check the “Allow direct requests” box.
It would be best if you used a comma to separate the file extensions. Then, check the “URLs to grant access” section for a list of sites. And fill in the blanks with the ones that aren’t there.
Those websites have been “white-listed” from the hotlink prevention process.
Changing the Filename
Uploading files to WordPress is an example frequently missed when a 403 Forbidden error (among others) may occur. To be more specific, this problem occurs.
When you upload files that have incorrect filenames, they frequently include an apostrophe.
Manually rename the file to test this. It would be best to use only letters (excluding international language symbols), numerals, and dashes in the filename.
Upload it and see whether the problem has been addressed.
Clear the Cache and Cookies in your browser:
If you continue to receive 403 errors, consider removing your web browser’s particular cookies. In Google Chrome, remove website-specific cookies as follows:
- Launch Chrome.
- Select More Options.
- Then, select Advanced.
- Look for ‘Content settings’ in this menu. Under the heading “Privacy and security,”
- Select ‘Cookies.’
- Look for the website’s name under “All cookies and site data.”
- Click Remove to the right of the webpage.
Go to Google Chrome History to remove all cookies. Also, clear the Cache. A similar procedure may be used in other popular web browsers.
As illustrated below, go to History and click on Clear Browsing Data:
-clear browsing data
You may choose a period and whether or not to include cookies and other site data in your analysis. But, first, choose from a list of cached images and files.
Then select “Clear data” from the drop-down menu.
Deactivate Browser Extensions:
The user has installed specific extensions on all of the browsers. At the same time, they are attempting to resolve the 403 error. Browser extensions should be disabled whenever possible.
Inspect your firewall settings:
Maybe it does not show the requested page because of one of your Firewall settings.
You can disable the firewall temporarily while attempting to resolve the 403 Forbidden problems.
Effects of 403 on Search Engine Rankings
Suppose your website has begun to display a 403 error page that has already been rated. Then it will very certainly lose search engine ranks on well-known websites such as Google, Bing, and others.
The first downgrade the ranks according to the search engine’s algorithm. The pages will ultimately be removed from their Index., which individuals and bots can no longer access.
It is advised that you maintain a careful eye on your website’s statistics to avoid such a predicament.
Look through the data in the search console and web admins to make sure there aren’t any errors.
You may easily access Google Search Console by logging in.
Select your website and go to Index > Coverage. As illustrated in the diagram below:
It will show the number of problems and the types of issues that your visitors have encountered.
To maintain your website Indexing healthy, all you have to do is keep an eye on it. Also, avoid being penalized by search engines.
If you’ve just updated a page’s URL, make sure you utilize a redirection plugin. Also, it would help if you redirected the old URL to the new one. Also, in the search console, update the XML sitemap.
If you’re a newcomer, we also advocate using the troubleshooting mentioned above procedures with the help of a WordPress professional.
In a nutshell, a 403 error implies that the requested resource or file exists on the server. But it is not available to the visitor for one of the reasons listed above.
Following the steps outlined above will most likely resolve the problem fast; however, you can still fix the problem using anyways as mentioned above.
We recommend contacting your hosting provider’s tech support immediately to determine the source of the problem. The server technical staff may perform configuration modifications by accident during maintenance or other stages.
It’s also possible that the server has banned your IP address. Request that your IP address is checked and unblocked by the technical staff.