The 403 Forbidden Error problem is considered one of the annoying problems that website owners face on their sites, as it prevents them and prevents users from accessing their sites or one of their pages. Therefore, if the 403 error problem appears on your site, you must work to solve it properly. Immediate so you do not lose visitors and customers to your site.
For this reason, we have prepared this article in which we will introduce you to the problem of error 403 and the reasons for its appearance. We will also provide you with suggested solutions so that you can solve it yourself, whether you are a website owner or an ordinary user.
What is the problem of 403 (Forbidden Error)?
The problem of the 403 error (Forbidden Error) appears on WordPress sites and other sites, and when it occurs, the server displays the 403 error message instead of the content of the site or page that the user is trying to access. This is due to many reasons, but most often the cause of the problem is a defect in the permissions of the site’s files. Or the htaccess file is corrupt.
The 403 error problem may occur throughout the entire site or only in parts of it. The error message may appear in multiple forms and is often accompanied by text explaining the server’s inability to process the request. The most common forms of the 403 error message are:
- Error 403 – Forbidden
- 403 Forbidden – nginx
- 403 – Forbidden: Access is denied
- Forbidden – You don’t have permission to access / on this server
- 403 – Forbidden Error – You are not allowed to access this address
What causes the 403 error problem?
There are many reasons that could cause the 403 Forbidden Error problem, and below we will mention the most important of them:
- htaccess file corruption: Corruption of your website’s htaccess file is one of the main reasons that causes the problem.
- Incompatibility of a site add-on: It is possible that a site add-on conflict with the site components may cause a 403 error to appear on it.
- File permissions error: Incorrectly setting the site’s file access permissions causes the problem.
- Home index not found: The 403 Forbidden Error problem may appear when the home page file is not found among the site files.
Solutions to the 403 Forbidden Error problem for website owners
If you are suffering from the 403 Forbidden Error problem on your site, there are a set of solutions that you can apply to solve the problem, and these solutions include the following:
Solution #1: Check installed extensions
First, you must ensure that the add-ons installed on your site are compatible with each other and with other site components. In order to do this, you must deactivate all add-ons on your site. To do this, connect to your site through the File Transfer Protocol ( FTP) .
After that, find the (Wp-content) folder and open it. Inside you will find a folder called (plugins). Change the name of this folder to (plugins old), and create a new folder called (plugins), and thus you have deactivated all active plugins on your site.
Now try logging into the site. If the 403 error problem disappears, this means that one of the add-ons is the cause of the problem and it must be deleted or replaced with another add-on that performs the same function. But before doing that, you must know which add-on is the cause.
You can find out which plugin is causing the problem by going back to the FTP file transfer protocol and deleting the new folder you created named (plugins), then changing the name of the old folder (plugins old) to (plugins), and thus all plugins are available but are still disabled.
Now go to the WordPress control panel and go to ( Add-ons ) and activate the add-ons one by one, and try logging in to the site after activating each add-on until the problem appears, and then the last add-on you made will be the cause of the 403 error problem and must be deleted in order to solve the problem.
Solution #2: Check the .htaccess file
If htaccess file is corrupt, it causes Error 403, hence you need to repair this file.
htaccess file repair steps:
1. First of all, you should connect to your website via FTP or cPanel’s file manager.
2. Next, locate the htaccess file in the root folder of your WordPress site. Then download the (.htaccess) file to your computer so that you have a new backup copy of it, and then delete it from the files.
3. Now; You should try to access your own site, and if the 403 error is resolved it means that the .htaccess file was corrupt.
4. You can create a new htaccess file by logging into your WordPress dashboard, and going to the Settings » Permalinks page.
Simply click the “Save Changes” button at the bottom of the page, and WordPress will create a new .htaccess file.
You can also create a new htaccess file by accessing the (public_html) folder and creating a new file named (htaccess) and then placing the following code inside it.
Solution #3: Check file permissions in WordPress
Permissions control who can access the files and folders on your website, and each file stored on your website has permissions and permissions.
In case you have something wrong with these permissions, you will get a 403 error, because this means that your web server will think that you do not have permission to access these files.
You can ask your hosting company to check your website for the correct file permissions or you can do it yourself.
How to check file permissions
1. First, you need to connect to your WordPress site using FTP or cPanel.
2. After that, go to the main folder that contains all your site files, then go to Public_html, then select the WP-admin folder, then specify file permissions.
3. It will show you a pop-up window containing the file permissions.
- All folders in WordPress must have a file permission of 744 or 755.
- All files on your WordPress site must have a file permission of 644 or 640.
- now; Select the option to duplicate subfolders, and FTP will then start assigning permissions to all subdirectories in that folder.
- Once this is done, you will need to repeat the process for all files.
now; Try accessing your website, and the 403 error should go away.
Solution #4: Check if the home page index
As we mentioned previously, the problem may be caused by not finding the home page file (index). Most often, the reason is changing its name to a name other than index.html or index.php. In order to solve the 403 error problem, the home page file must be renamed. To one of the previous two names.
You can do this by connecting to your site via FTP, then going to the (Themes) folder located within the (Wp-content) folder, then opening the template folder activated on your site and renaming the home page file to index.html or index. php.
If you do not want to change the name of the home page file on your site to index.html or index.php, you can keep it, but you must create a new file named index.html or index.php and redirect it to the home page file on your site, by adding The following code is at the end of your website’s htaccess file:
Note: The site’s home page file name must be placed in place of homepage in the previous code.
Solution #5: Temporarily stop the CDN
A content delivery network ( CDN ) is a group of servers spread in different parts of the world, and is used mainly to increase the performance of your site, because each of its servers has a copy of the site’s data, and when the user sends a request to the original server, it CDN servers handle this request instead, which increases the speed of your site.
Any malfunction in the content delivery network can cause a 403 (Forbidden Error) issue, and you can check the CDN is the cause by disabling it, and then try to access the site. If the 403 error problem disappears, this means that the content delivery network is the cause and the defect must be repaired in order for the problem to be resolved.
Solution #6: Check Hotlink settings
The Hotlink feature is used to protect the bandwidth speed of your site’s hosting through media, as it prevents other sites from publishing your site’s media on their pages and fetching it from your hosting to present it to its visitors, but sometimes this feature may cause the 403 error problem to appear on your site, because When it is set incorrectly.
You can check whether the Hotlink feature is the cause of the problem by canceling it and then trying the site. If the 403 error problem disappears, it is the cause. The method of canceling the feature depends on the method of activating it. If it was activated through add-ons, it will be canceled when solution No. 1 above is applied. .
If it is activated through the (htaccess) file, it will be canceled when deleting and generating the file as mentioned in Solution No. 2. If the Hotlink feature is activated through the hosting settings, you must contact technical support in order to ensure that it is set correctly.
Solutions to the 403 Forbidden Error problem for users
If you are browsing the Internet and encounter the 403 Forbidden Error error on a website while browsing it, it may not require the site owner to intervene to solve the problem, as this problem can be temporary and transient, and you may be able to solve it by following one of the following solutions.
Solution #1: Refresh the page and verify the URL
The 403 Forbidden Error issue can be temporary rather than permanent, which is why it will likely be resolved right away when you reload the page.
You may also encounter a 403 Forbidden Error if the URL is wrong and directs to a folder on the server and not a web page, so make sure the address you are visiting is correct.
Solution #2: Clear cache (and cookies)
Although your browser’s cache is important for speeding up a website, it can sometimes cause problems, including a 403 Forbidden Error, due to a content mismatch, so clearing this cache may solve the problem.If you’re using In the Google Chrome browser, you can solve the 403 Forbidden Error problem by clearing the cache by clicking on the options icon , then choosing ( clear browsing data ) from the ( more tools ) menu.
The (Clear browsing data) window will appear. To clear the cache completely, put a check mark next to (Cookies and other data for websites) and (Cached images and files). It is preferable to also put a check mark next to (Browsing history), then specify the time range with ( All times ), then click Click on the “ Erase Data ” button.
Your browsing data will be completely cleared within a few moments, and you can then try to visit the page again and see if the 403 Forbidden Error issue has been resolved, or if you should try another solution.
It is worth noting that the steps to clear cache and other browsing data in other web browsers are somewhat similar to what we explained above, which is why you can apply the previous steps in general to any browser.
Solution #3: Disconnect from the VPN
Some websites do not allow visits through a VPN, and this can cause a number of errors to appear, including the 403 error, so if you are using a VPN program while visiting the site, try stopping the program and try again, or change your IP through the program.
Warning: It is not legal in some countries of the world to use a VPN, so use such a program only after making sure that it is completely legal in the country in which you live.
Solution #4: Try again later
If none of these solutions work for you, the cause of the problem may be related to the site or the hosting on it. In this case, you can exit the site and try to visit it again later. If you are able to communicate with the site administration, you can speak to them and inform them of the problem you are experiencing. You face it.
Thus, we conclude by explaining how to solve the 403 Forbidden Error problem on websites, by the site owner or user. We would like to point out in conclusion that solving this problem and any other problems on your site is very important to retain visitors and move the site forward.
Leave a Reply