When you want to visit or access a webpage with a browser; google chrome, Mozilla Firefox, Opera, Internet Explorer, Tor browser, etc, and you see the page displaying “403 Forbidden” Error message, with a similar like “You don’t have permission to access this sever” and the likes, just know you have encountered a 403 Forbidden error.
To start with, this post will explain what 403 Forbidden Error is, access a site that shows 403 forbidden error and how to fix the 403 Forbidden Error as a developer and site visitor.
What is a 403 Forbidden Error?
Simply put, 403 Forbidden Error is a returned access denier response to a site visitor from accessing a particular web page or a website in a server.
403 Forbidden Error Response Explained
From the angle of a site visitor, maybe on one or two occasions, you have tried visiting a particular website or a web page and the response 403 Forbidden was displayed on your screen. To start with, most of the time, the error doesn’t come from the site visitors but from the site owner or developer. The 403 Forbidden Error is a status response code HTTP server used to communicate a breach in their transfer protocol.
Possible reasons for getting 403 Forbidden Error Response– Causes of 403 Forbidden Error
They’re the two most common reasons for the 403 Forbidden Error response which is basically as a result of the back view challenge encountered in giving visitors of a particular site the permission to view certain resources or web pages.
- Server access denial by the site owner.
- Incorrect access permission setting by the site owner.
- Specific user access denial to a directory
All the three causes of 403 Forbidden response are caused by the site developer, however, there are certain things a visitor can to be sure the error is not from his/her own end. To be quite honest, you can say for sure that users who get 403 Error messages are shown the same response or message as what is shown to the site visitor can be altered by the site owner or developer.
However, to save you from the confusion you would experience, let’s show you a similar message or 403 Forbidden message one can come across, when you see any of the below messages, be rest assured that you are still faced with 403 Forbidden Error.
How to Identify 403 Forbidden Error Response –
If you try accessing a web page or site and you are faced with any of the below error messages, be rest assured it’s 403 error, which means you should follow the fixed guide laid down on this post.
Similar Display of 403 Error: HTTP Error 403 – Forbidden, 403 Forbidden, HTTP 403, Forbidden, HTTP Error 403 – Forbidden, HTTP Error 403.14 – Forbidden, Error 403, Forbidden: You don’t have permission to access [directory] on this server, and Error 403 – Forbidden.
Solution for HTTP Error 403 Forbidden – How to Solve 403 Forbidden Error in WordPress
Truth be told, as a site visits, there is practically nothing you can do when an HTTP Error 403 message response appears when you try visiting a website or page, as 99% of the solutions lies in the hand of the site owner, developer or the site manager with the Cpanel username and password.
Be it as it may, there are few times visitors have attempted a few technical tips and they were able to access a site with such forbidden response.
Note: the error message can happen in WordPress site, in java enabled platform, in PHP, as well as in LoadRunner.
How to Fix 403 Forbidden Error
Error Fix #1: Refresh the Web page from your Browser
Most times the error message might be temporal, other times, it might be as long as the site owner wants it last. to check if you will be given access to the page, you will need to refresh the page. To refresh the browser page on google chrome, Mozilla Firefox, internet explorer, and the rest in both Windows and iOS (Mac), you will need the following instructions.
How to refresh a page in a Browser
To a page in both windows and mac, you will need the following keyboard combination.
Windows: Press Ctrl+F5. If that doesn’t work, hold down Ctrl and click the “Refresh” icon.
Mac: Press Command+Shift+ R. When you are using the Safari browser, you can also hold Shift and click the “Refresh” icon.
In most browsers, you might just need to press on the F5 key to refresh a page.
Check If the URL is Correct
The common problem is a mistyped or entered web URL. Imagine trying to access a room and you are trying to gain access through the wrong door or even through the wall instead of the right entrance to such room. Just make sure the site URL is the correct one, you can check the URL extension. If you are trying to access the page through a directory extension (/) you will be bounced back due to security purposes.
Erase Cookies and Cache in your Browser History
Clearing your cookies and cache is can also help especially if it’s a site you have visited in time past that returned a 403 error message. Clearing your browser becomes a solution; it’s possible the site directory was changed by the site owner but you have a different URL cached in your browser. But you need to know that clearing your cookies and cache will clear all the site login details saved on your site and would require you login afresh when you visit such site. So we would recommend you save all you password or copy them out using your browser password manager before clearing cookies and cache.
How to Clear Cookies & Cache in All Browser
You can clear cookies and cache in all browsers as well as on your Mac.
Clear cookies & Cache on Mac: To clear your cookies& cache, go to Settings> Safari, and tap Clear Cache and Website Data. Clearing your history, cookies, and browsing data from Safari won’t change your AutoFill information.
To clear your cookies and keep your history, go to Settings > Safari > Advanced > Website Data, then tap Remove All Website Data.
Clear Cookies & Cache in All Browser: To clear your cookies& cache in Google Chrome and Mozilla Firefox follow the below key combination:
- Press Ctrl + Shift + Delete from your keyboard
- A dialog will open with options to check.
- Check the option “Cookies and other site data” and Cached images and files” from the list.
- Click “Clear Data”.
Login to Access the Site Content
You might be wondering, how do I log in to a site I can’t see the content? The answer is simple some sites are configured to allow visitors who are logged in to view its content. But a few times because of incorrect setup, if a visitor isn’t logged in these site returns the 403 error message. So, you might need to try signing in first to view the site. Sites with the login access issue will always show you where and how to log in.
Sometimes the site in question might be under maintenance by the owner or the developer, in such cases, you might need to wait a while and come back to the site a couple of days later, to check if the error message is disappeared.
Reach out to the site owner
Alternatively, if the above-recommended solution isn’t working for you, you may try and reach out to the site owner, maybe there is a contact form, contact info, or a social media channel show on the page, or from where you got the site URL. You might need to use any of such contact info available to you to reach out to the site owner or developer.
Solving 403 Forbidden Error as a Developer – How Site Owners can resolve 403 Forbidden Error Response on their Website/Webpage
If you are an owner of a site that returns a 403 Forbidden error message, you will need to solve it technically. I will be brief and comprehensive and outlining what you will do to fix your site or web page to stop losing your visitors.
The challenge with 403 Forbidden error in most cases from the developer’s angle might be any of these three problems;
- The issue with (.htaccess file).
- Incorrect file and folder permission settings.
- Problem with an Installed WordPress Plugin.
As a developer, you need to know that the real cause of a 403 error message on your website or webpage is in some cases changes made by your hosting companies while doing system update or upgrades.
Be it as it may, you can resolve the issue by following the guidelines laid in this part of the post.
The first step will be to check if your “.htaccess” file is correct But it will require access to your Cpanel. So, get you’re your Cpanel username and password ready and follow the below instructions.
- Login to your Cpanel with your username and password.
- Navigate to your Cpanel File Manager.
- Go to the public HTML directory, and locate the .htaccess file.
- In the event, you didn’t see the .htaccess file.
- Click on Settings and enabled Show Hidden Files (dotfiles) option.
After enabling the hidden files option, your .htaccess file should appear, after which follow the below process to generate a fresh one, as they might be a misconfiguration with the one you have.
- To Have a backup, save a copy of the .htaccess to your computer.
- After saving delete the .htaccess file.
- Now, try accessing your website.
- Go back and open your site to see if the 403 error message disappeared.
Next, is to generate a fresh .htaccess file;
- Login to your WordPress dashboard.
- Click on Settings › Permalinks.
- Tap the“Save Changes” button at the bottom of the page. don’t edit or change anything.
- Refreshing permalinks to fix 403 Forbidden error message
- Which will generate a fresh .htaccess file for your website
The next thing if the above didn’t work is to reset file and Directory permission
How to Reset File and Directory Permission
- Use any FTP client to access your site.
- Go to the root directory of your hosting account.
- Select the main folder containing all your site files (public_html).
- Right-click on the public_html and select File Attributes.
- On the file Attribute interface select Apply to directories only, key in“755” in the Numeric value field and press OK.
- Next, change Folder Permissions with FileZilla
- Then, repeat step 5, but this time select the Apply to files the only option and enter 644 in the Numeric value field.
- FileZilla Change File Permissions Only
After the process, open your site and see, if the error message disappeared, if it didn’t, then we are left with the final option. Which is to disable WordPress plugins.
How to Disable WordPress Plugin
- Go to your hosting account with FTP.
- Locate the public_html folder or the folder containing your WordPress installation files.
- Then, locate the wp-content folder on the page.
- Locate the Plugins folder, and rename it to anything. Something like “Disabled-plugins”.
- FileZilla will disable the plugins to look for errors.
After which opens your site to see if the 403 forbidden error message is disappeared, if it doesn’t, you will finally need to contact your hosting provider to assist you in solving the 403 response message. More so, if the instructions above aren’t clear to you, you might need to visit developers’ 403 Forbidden error message fixed to get more clear instructions with images and detailed explanations.