A 403 Forbidden error is an internet error code or an HTTP status code, which indicates that the client (browser or device) does not have the authority to access the requested content or resource.
All 4xx error codes are regarded as client error responses. Having said that, it is presumable that the client is at fault for the issue, but that is not always true. The 403 error does not necessarily imply an issue with the client. The server is still responsible for responding with the HTTP status code to the browser. Therefore, we cannot rule out the server as the culprit behind the issue.
The 403 Forbidden error appears in various ways, including:
- HTTP Error 403 – Forbidden
- Error 403
- 403 Forbidden
- HTTP 403
- Error 403 – Forbidden
- HTTP Error 403.12 – Forbidden
There is a heap of possible reasons behind this error. Below, we have compiled different scenarios and solutions for your reference.
Table of Contents
- Verify the URL
- Clear the cache and cookies
- Log out account
- Downgrade recent updates
- Check file permissions
Important Note: Before making any changes, please make sure to back up your website first.
Verify the URL
An incorrect URL is the most common reason behind a forbidden error. Thus, it’s ideal to double-check the URL causing the issue to make sure that it is the website you intend to access.
Clear the Cache and Cookies
The 403 error often indicates that the browser is not authorized to perform the request. Hence, it is safe to conclude that cookies are no longer valid or corrupted. In such scenarios, the cookies give irrelevant authentication to the server, resulting to a forbidden error. Try clearing your browser’s cookies. Your concern should be limited to the cookies relevant to your website only. However, it’s safe to clear all cookies if you are inexperienced with clearing specific cookies.
It is also possible that your browser’s cache is issuing the error. There are cases when cached files or stored copies of your website files conflict with the current files, causing the error. Try clearing the browser’s cache, and check if the error disappears.
Here is the fastest way to clear cache and cookies on major browsers (Chrome, Internet Explorer, Firefox, Opera and Edge):
- Open your preferred browser.
- On your keyboard, press Ctrl+Shift+Del simultaneously.
- A pop-up box will appear. Make sure to select cache and cookies.
- Click the appropriate button to clear cache and cookies.
Log Out Account
In some cases, a browser may fail to send accurate credentials to the site, leading to a forbidden error. If your website requires user authentication, it’s imperative to log out after you have cleared the cookies, then log back in.
Downgrade Recent Updates
If the error appears immediately after updating the CMS or Content Management Systems, consider downgrading to the previous version. Reverting to older versions may help solve the problem.
Important Note: Popular CMS hardly provide a downgrade option. This simply implies that the latest version is extremely stable and bug-free.
Check File Permissions
If your website was functioning before the error appeared, file permission is hardly the culprit. However, if the error appears after modifying or making changes in the website, it’s possible that incorrect file permissions were set. This leads to a failure to propagate the site contents that eventually leads to a forbidden error.
Unless a specific script needs special permissions, files should be set to 644 permission while folders are set to 755.
As for Linux permissions, it can be represented with words, numbers or letters. In addition, it includes an entry for different users: User, the owner; Group, the other users on the server; and World, the site visitors. Access ranges from Read, files are shown to the user; Write, users can modify files; and Execute, users can execute files as programs.
It is important to set correct file permissions so the server can respond successfully to the browser’s requests. Here are simple instructions to check and change file permissions:
- Click on My Account at the top of this page.
- Select Hosting Manager from the drop-down menu.
- Enter your username and password, and click Log In.
- On the Home page, click the word Files or the [ v ] arrow symbol on the right side.
- Click the File Manager icon, which is next to the Directory Privacy icon.
- On the File Manager page, check file permissions.
- If necessary, change file permissions:
- Right-click the file or folder you need to modify.
- Select Change Permissions.
- Tick the appropriate access on every user group to set permission.
The permission number will follow accordingly as you check the box.
- Click on the Change Permissions button.
Congratulations! You just learned about 403 Forbidden error.
Fantastic...Thank you for your feedback =)