Does your website display a 403 Forbidden error notification – you don’t have permission to access/on this server? This error is usually caused by an error in your .htaccess file.
However, you don’t need to worry. In this article, you will learn how to easily fix the 403 Forbidden error in WordPress.
What is the 403 Forbidden Error?
Error 403 Forbidden is an HTTP status code that indicates a permissions error when you access the website. Generally the message that appears is written as: “Forbidden: You don’t have permission to access [directory] on this server”.
Usually, the 403 error appears when you try to access a part of the website that you don’t have access rights to. In other words, this error appears as a file or resource protection on Ada’s website page. So, visitors cannot access the website.
Causes of HTTP Error 403 Forbidden
Then, what are the causes of HTTP Error 403 Forbidden? Primarily, the main causes of the 403 forbidden error are:
– Error in file or folder permissions
– Error setting in .htaccess file
In addition, several possible causes for the 403 error to appear include:
– No index.html file
– WordPress plugin configuration error
– DNS record configuration error
– Malware attacks
– Misconfigured hotlink protection
– Errors on Content Delivery Network (CDN)
Now, after knowing the cause, let’s see how to deal with the 403 Forbidden error below!
15 Ways to Overcome 403 Forbidden in WordPress
Previously, you already knew a number of things that caused the 403 Forbidden WordPress error. In this article, we offer 10 ways that you can follow to deal with the 403 error, namely:
1. Check the .htaccess file
One way you can try to overcome the 403 forbidden error is to check the website’s .htaccess file.
First download .htaccess. If the .htaccess file has been downloaded, delete the .htaccess file in your hosting public_html folder. If the website runs well, it can be concluded that the 403 forbidden error is caused by a damaged .htaccess file.
Apart from that, you can also create a new .htaccess file by logging into the WordPress dashboard and selecting the Settings > Permalinks menu. After that, just click the Save Changes button.
This method will automatically create a new .htaccess file for your website.
2. Check File Access Rights
Another reason that causes your website to display a 403 Forbidden error is a problem with file or folder permissions. Usually, by default, the files created have certain permissions.
These permissions define control over files, such as:
– Read: permission to open, read and view the contents of files or folders on a website
– Write: permission to modify (add, edit, delete) files or folders on a website
– Execute: permission to run files as script/folder access and perform commands
Sometimes, in order to access files, you need to change the permissions on a file or folder first. You can do this in two ways, namely via an FTP Client or via the File Manager on cPanel.
3. Deactivate Plugins
If the previous two methods don’t work, it’s possible that the error could be caused by a plugin. To fix this, you can deactivate all plugins on your WordPress.
To find out which plugins are having problems, please rename the disabled-plugins folder to plugins. Then, go to the Plugins menu on your WordPress dashboard and deactivate the plugins one by one.
Do a website check every time you deactivate a plugin. This way, you will find the plug-in that is causing the 403 Forbidden error. You can delete the plugin then install or update the latest version if there is one.
4. Upload the index.html page
When you access a website domain name, you will be directed to the index.html or index.php page as the website homepage. If this index file does not exist or maybe you use another name for the homepage, the website will display a 403 forbidden error message.
5. Check the A Record
The next way to deal with the 403 forbidden error is to check the A record. Make sure the domain is pointing to the correct IP Address.
In general, you can check A records through the DNS Zone Editor menu on cPanel hosting.
6. Perform Malware Identification
If you have tried various ways to deal with the 403 forbidden error, but it still doesn’t work either, maybe this error is caused by malware that has attacked your website.
Therefore, try to identify malware by using a malware detection plugin on WordPress such as Wordfence.
7. Edit File Ownership
For VPS users with the Linux operating system, File Ownership or file ownership can also be the cause of the 403 forbidden error.
Usually, a file or folder is assigned to an Owner, a specific Group or both. By default, the file owner should be your hosting account username.
8. Disable the CDN Temporarily
If a 403 forbidden error appears for an asset in the form of an image, Javascript, or CSS, then there may be an error with your Content Delivery Network (CDN).
To overcome this, you can disable the CDN that you use, for example, Cloudflare.
9. Check Hotlink Protection Configuration
Hotlink Protection is a setting to prevent the use of links in the form of your files or images on other websites without permission. In other words, hotlink protection prevents content theft.
Hotlink Protection can easily be activated on your hosting. However, make sure the configuration is correct, OK? This is because a configuration error will trigger a 403 forbidden error.
10. Contact the Hosting Provider
Then, what if as a website owner, you have done all of the methods above but still encounter the 403 Forbidden error?
The final solution, you can contact your hosting provider. It is possible that an error did occur from the server side so that it requires repair from the hosting service provider’s side.
11. Do a Page Refresh
Most of the time, a 403 error is only temporary. Therefore, it never hurts to refresh the website page that you access.
12. Clear Website History/Cache
Cache is useful for storing website data so that when it is accessed again, it can load faster. Unfortunately, if the website has been updated with new information or the web page is different from before, then the cache can actually cause a 403 error to appear.
Well, to fix this, you can delete history, cache and cookies on your web browser.
13. Make sure the Website URL is Correct
One of the things that often causes the 403 forbidden error to appear is an error in writing the website URL. So, make sure the address you are accessing is correct.
To do this, make sure the website URL you write ends with .com, .php, .org, .php or other extensions.
If it ends with a ‘/’ sign, it means you are accessing a directory. For security reasons, most servers do not allow access to directories.
Generally, if there is such an error, visitors will be redirected to another page. However, if the configuration is not good, then you will see a 403 forbidden error message.
14. Check Permission To Access URL
The next way is to make sure you have permission to access the URL. What’s more, for websites that have a login system because not everyone can access it.
Typically, the server will be configured to provide information that you need to be logged in to access certain content. But if no special configuration is given, what appears is a 403 forbidden error.
15. Try Again Later After Error 403 Forbidden Resolved
If you have tried all the methods above, but the 403 error still appears when visiting a website, try accessing it a few moments later.
The 403 forbidden error can occur due to a problem with the website, whether it is being repaired by the developer or on the server side.
Immediately Overcome Error 403 Forbidden on Your Website!
Error 403 can be caused by many things, one of which is an error in the .htaccess file or setting file permissions.
Our article above has explained various ways to deal with it appropriately.
So, if you have tried several methods and still fail, you can try asking and contacting the customer support where you bought the hosting used for making your website.
[hurrytimer id=”247″]
