Table of Contents
At times we get discouraged when trying to access websites and get the 403 forbidden error. What is a 403 forbidden error? The 403 forbidden error occurs when you are forbidden or denied permission from accessing a website resource for some reason.
The 403 forbidden error is an HTTP status code that can be configured in the server such that when one tries to access what is not allowed, the server throws the 403 forbidden error. At times, as an end-user, there is nothing much you can do since it’s a server error, but it can sometimes be a problem on your end. Let’s try to understand this analogy.
403 forbidden error messages
Since we have seen that this is a server message, it means one can customize the error and determine how you need it to be displayed to users on your site. For example, you might get these errors.
- Error 403-forbidden
- 403 error
- 403 forbidden: access denied
- HTTP 403
Causes of 403 forbidden error
If your IP address ranges within the blocked IPs, then you will get this error on the site. In this scenario, there is nothing you can do unless your IP address is unblocked.
Missing index page
Most site’s home pages are named index.php or index.html. These pages are the default landing page for a website. In the case that this file is missing, you may experience this error. The best way to solve this is to make sure your files have this page.
The owner might hide some files for users although they are on the server. When you try to access these hidden files, the server throws the 403 forbidden error.
Bad file permissions
This is where the owner has set up improper setup permissions. This leads to getting the error even when you should not be getting the error.
An empty website directory
This happens when you are trying to access a directory that does not exist on a website. You might be trying to access a directory that has not been defined on a website.
At times you may be trying to access a directory that does not exist. Always make sure the contents have been uploaded to the correct directory. Directories end with (/).
How to fix the 403 forbidden error
Although we have mentioned that there is nothing you can do at times as a user, it might be a problem from your side and hence let’s look at how to try and fix this error.
Refresh the page
At times this might be a temporary error server down so that a simple refreshing could solve the error. In a browser to refresh, just press the CTRL+R buttons on the keyboard. Alternatively, there is a refresh icon, as shown below.
Check your Address
Be sure to double-check your address; sometimes, it’s a mistyped URL. Ensure the directory you are trying to access valid, or the address of a webpage is okay. Regular URL end with .org, .com, .html, .php etc, directories URL end with forward slash [/].
Why do we check this? Some servers, due to security reasons, are bound to disallow directory browsing.
Let’s take, for example, you tried to access a website got the 403 forbidden error. After the site URL has been rectified, you still get the same file. You still get the 403 forbidden error. The could only because your browser cached the first URL, but the actual link was made some changes. This could be solved by clearing the browser cookies and cache.
Check permission access to a URL
Let’s look at another scenario where you are trying to login to the site to enter the incorrect login credentials. Servers are typically configured to show various denial errors, but some improper configuration on the server can result in it throwing that 403 forbidden error instead.
Deactivate Browser extensions
It’s also possible to get the 403 forbidden error due to extensions/ add- ons added into your browser. Hence your browser has been rejected from accessing the site. If you get this error, try to deactivate your add-ons and refresh the page. If this was the cause, you good to go.
It’s also possible there is a problem with your firewall responsible for the HTTP error. It’s risky to disable the firewall, but you can disable the firewall and open the website again if you trust the web page. If this works, simply adjust your firewall settings to allow this page.
Contact your ISP
This can also be a solution if the site is working for others but not for you. If you confirm this, then there is a possibility your ISP’s public IP address (Internet service provider) has been blocked, maybe for some reasons. This is a very rare thing but might help also.
403 forbidden error in WordPress websites
You can have this error in WordPress at various levels. Example. 403 Forbidden – during WordPress install.
Causes of 403 forbidden error in wordpress
Incorrect settings in the .htaccess file
The .htaccess file is a server configuration file, and it works by changing apache server settings. If this file is corrupt, then you will get the 403 forbidden error. You can delete this file and generate another new file. Follow these steps:
Login into WordPress Admin>>Go to Settings >>permalinks page >>save changes
At times in WordPress, this error is caused by WordPress plugins. To solve this, always make sure your plugins are updated. You can also deactivate the plugins and determine which one is causing an error, and resolve it.
File Permissions in WordPress
Permissions in WordPress control who has access to certain folders and files of your site. Setting up incorrect permission results in 403 forbidden error. This is a result of the webserver denying you permission. To configure these permissions or change, connect your WordPress site using an FTP client, then go to the root folder where all the WordPress website files are.
In this tutorial, we have discussed error 403, its causes, and how to fix it. I hope you find this helpful in your daily online surfing. In one way or another, you will come across this error. There is nothing perfect, including websites in the world, but the best thing is you got an idea of how to fix this error. It will also be good to look at the various errors you might encounter, like the errors 404 and 503.