All the users of the website receive this error named 403 Forbidden Error at least once in a while during their usage. This error means the users are not permitted to reach that particular server.
At this point of time, I understand that you do not have much knowledge about this error, but I promise that you will get to know enough about it after having a look at this article. Here is one quick approach to resolve this issue of 403 Forbidden Error –
Step 1: Mark or modify the .htaccess file.
Step 2: Modify all the folder and file access permissions.
Step 3: Make the Word Press plugins inactive.
First, we will let you know all the possible reasons behind this 403 Forbidden Error and then the recommended methods to resolve this issue. Here we are taking the Word press as the website. But the similar procedure is applicable for rest of the static or CMS sites.
The 403 Forbidden Error acts differently based on the situation and condition, respectively. Sometimes, when the host organization provides any modification, this error scenario could occur because of the execution of a few updates.
So, here we begin with the matter to enlighten your mind.
Read Also:
Contents
- 1 What is the 403 Forbidden Error?
- 2 Causes of 403 Forbidden Error
- 3 Fixing the Error 403 Forbidden Message
- 4 Conclusion
- 5 FAQs on the “403 Forbidden” Error
- 5.1 1. What is a “403 Forbidden” error?
- 5.2 2. Why does the “403 Forbidden” error occur?
- 5.3 3. How can I fix the “403 Forbidden” error as a website visitor?
- 5.4 4. How can I fix the “403 Forbidden” error as a website owner or admin?
- 5.5 5. What are file and folder permissions, and how do they cause the “403 Forbidden” error?
- 5.6 6. How do I change file and folder permissions to fix the error?
- 5.7 7. How do I check and fix the .htaccess file to resolve the “403 Forbidden” error?
- 5.8 8. What should I do if clearing the cache and cookies doesn’t fix the “403 Forbidden” error?
- 5.9 9. Can a misconfigured firewall cause a “403 Forbidden” error?
- 5.10 10. How do I fix a “403 Forbidden” error caused by IP blocking?
- 5.11 11. Can directory browsing cause a “403 Forbidden” error?
- 5.12 12. What should I do if the “403 Forbidden” error occurs only on certain pages?
- 5.13 13. How do I troubleshoot the “403 Forbidden” error if I’m using a content management system (CMS) like WordPress?
- 5.14 14. Can a CDN cause a “403 Forbidden” error?
- 5.15 15. What should I do if none of these solutions work?
What is the 403 Forbidden Error?
To begin with the topic, first, let us know what is the actual meaning of this error is. This falls in the category of the HTTP status code.
You come across this error only in that scenario when you are making access to a site which is not permitted to do so. Here is the list of some of the errors which are visible in this situation –
- Forbidden: You don’t have permission to access [directory] on this server
- HTTP Error 403 – Forbidden
- 403 forbidden request forbidden by administrative rules
- 403 Forbidden
- Access Denied You don’t have permission to access
Now, let us see the causes behind this 403 Forbidden Error.
Causes of 403 Forbidden Error
It is quite irritating when you are busy doing your work and you suddenly encounter this error. Let us get to the reason so that you can understand the procedure for its solution in a better way.
In lame man’s words just know that it occurs when the users are trying to access a site or URL address which are not supposed to be. Those sites could be out of their league.
So, the 403 Forbidden Error just acts like a warning to make you know that you are short of the permissions which are required to access this particular site.
The error’ s reasons are the wrong folder or file permissions as well as the wrong settings inside your .htaccess file.
Now let us see the resolving procedures.
Fixing the Error 403 Forbidden Message
So, after having the knowledge of all the possible causes, here are few of the solutions to guide you in the situation.
Before starting, let me tell you the I have taken Word Press as the base site but you can try them for rest of the sites too. Let’ s get started:
Method 1: By Checking .htaccess File
I guess many of you are not well aware of the .htaccess file. The reason for this is that the .htaccess file is always hidden inside the directory provided for the project.
But if at all the user is utilizing the Hostinger File Manager for this purpose then it is visible at the .hPanel as by default.
If the user is utilizing the cPanel then proceed by acquiring the hosting Control Panel under the assistance of File Manager. Follow the steps that are mentioned below that will guide you.
Step 1: Search the File Manager in the hosting Control Panel.
Step 2: Under the public_html directory, you are supposed to find .htaccess file.
Step 3: In case you are not able to find the .htaccess file, just hit on the Settings. Now, activate the Show Hidden Files (dotfiles) from the choices provided.
The question arises- What is .htaccess file? Well! This file is a kind of server configuration file. It usually functions through the alteration provided to the configuration present under the Apache Web Server Settings.
The .htaccess file in built-in every Word Press sites. But if there is a case where this Word press site or any other site does not consist of this file or might have got it deleted, accidentally then the user is supposed to form a .htaccess file by themselves.
Yes, it can be created manually. When the .htaccess file is visible to you, proceed with these steps as mentioned below –
Step 1: You are strongly recommended to download the .htaccess file for the system. This would act as the back- up.
Step 2: When you are done with the process, proceed to eliminate the file,
Step 3: Give an attempt to access the website.
Step 4: If you find that the site functions well then it means, the .htaccess file was deceitful.
Step 5: To start a new journey with the .htaccess file, you are supposed to log into the Word Press dashboard. Then hit on Settings followed by the Permalinks.
Step 6: With no further modifications, proceed to hit on the button named Save Changes which is present at the end of the page.
Step 7: The steps you followed will lead you to the new journey with the .htaccess file required by the site.
In case if this method does not help you out with the error, proceed to the upcoming solution.
Method 2: By Resetting File and Directory Permissions
Next in the row of the causes, falls the not so enough permissions which are required to access the folders of the site. Thus, end up getting the 403 Forbidden Error.
Usually, if the files are formed, the process is executed along with some inbuilt permissions. The permissions are assigned to manage the way for the read, execute as well as write operation on the files.
In case the user is utilizing the Hostinger, then it is easy to resolve this permission issue that arises. You just have to type Fix File Ownership and hit Enter in the text field assigned for searching.
You can also move to the end of the control panel and reach Others. Here you can spot it. Hence the tool provided by Hostinger, helps you to minimize time duration for resolving the permission faults and preserve it as it was by- default.
Normally, File Zilla FTP client gives what is required to modify the permissions for the particular folders or files. So, here are the steps –
Step 1: Utilizing the FTP client, acquire the site’ s files.
Step 2: Go through the parent directory that is assigned for the hosting account.
Step 3: Choose the public_html, the folder responsible to have each and every file for the website. Then hit a right-click on it. Now, choose the File Attributes.
Step 4: Choose the Apply to Directories only. Then input the permission 775. This input should be done in the text field responsible to take numeric values. Then hit on OK.
Step 5: When File Zilla has finished with modifying the permissions, you have to perform Step 3 again. But now, choose the Apply to files only from the choices provided. Then input permission 644 in place of 775 in the text field provided.
Step 6: When you have completed the whole procedure, attempt to access the site again. Look for whether the issue is resolved or not.
In case you are still facing the same issue again, it is the time to proceed with the next solution in the town is the.
Method 3: CVBy Disabling WordPress Plugins
When you have reached this solution then it makes it clear that this 403 Forbidden Error has been encountered because of the not so genuine plugins. Here in this solution, we will proceed with making the plugins inactive.
For the best approach, try to inactive every plugin altogether and not doing it one by one. This will point out the issue and you can resolve it easily. Follow these steps carefully –
Step 1: Acquire the hosting account along with the FTP. Search the public_html folder, the folder that has the duty to keep all the Word Press installation files.
Step 2: Spot the wp-content folder from the page.
Step 3: Then, you are supposed to spot the folder named Plugins. Now, modify the name of the folder. You can go with the name “disabled- plugins_” or anything that could be easier enough to get spotted and preserved.
After when you are all done with disabling every plugin, give an attempt to acquire the site for one more time. In case you are again spotting this issue, try to disable the plugins, individually. After doing that, once again try to reach the site.
I hope it functions as it is supposed to. Here you learnt the method of how to get rid of the not so genuine plugins. You may proceed to provide an update to your plugins if required. You can also download the latest one.
In case, none of them came in your use, I recommend you to reach the hosting provider.
Read Also:
Conclusion
I know this 403 Forbidden Error drives you crazy as it does not allow you to acquire the site midst of your work. Don’t worry the above procedures would help you to resolve the problem in only few minutes.
In case, you have shifted to some other host and not modified the Name- servers, you can spot this error in your approach to reach the site.
This is because the domain is still coming up with the old one. So, once check for this side too and make your website to point on the genuine spot. Then you can resume your work, seamlessly.
FAQs on the “403 Forbidden” Error
1. What is a “403 Forbidden” error?
A “403 Forbidden” error occurs when a web server understands the request made by the user’s browser but refuses to fulfill it.
This error typically means that access to the requested resource is restricted or that you do not have the necessary permissions to view the webpage.
2. Why does the “403 Forbidden” error occur?
- Common causes of the “403 Forbidden” error include:
- Incorrect file or folder permissions on the server.
- Directory browsing is forbidden by the server.
- IP blocking or restricted access set by the website’s owner.
- Corrupted .htaccess file on the server.
- Misconfigured security plugins or firewalls.
- Authentication required for the requested resource, but the user has not logged in.
3. How can I fix the “403 Forbidden” error as a website visitor?
- If you’re a visitor encountering a “403 Forbidden” error, try the following:
- Refresh the page by pressing F5 or Ctrl + R.
- Check the URL for typos, as entering an incorrect URL can trigger the error.
- Clear your browser’s cache and cookies, as stored data may cause access issues.
- Check if you are logged in: Some websites require you to be logged in to access certain pages.
- Try using a different browser or device to see if the error persists.
- Contact the website owner or admin to ask if access to the resource is restricted.
4. How can I fix the “403 Forbidden” error as a website owner or admin?
- As a website owner, you can try these steps to fix the “403 Forbidden” error:
- Check file and directory permissions: Ensure that the permissions are correctly set (for most files, permissions should be set to
644
, and for directories,755
). - Correct the .htaccess file: A misconfigured
.htaccess
file can cause this error. Open the file and check for any incorrect rules or restrictions. - Disable security plugins: If you’re using WordPress or another CMS, temporarily disable security plugins to see if they are blocking access.
- Check for IP blocking: Ensure that you haven’t inadvertently blocked the IP addresses of users trying to access your site.
- Ensure proper server configuration: Verify that your server’s configuration settings (like Apache or Nginx) are not restricting access to important resources.
- Check file and directory permissions: Ensure that the permissions are correctly set (for most files, permissions should be set to
5. What are file and folder permissions, and how do they cause the “403 Forbidden” error?
- File and folder permissions control who can read, write, or execute files and directories on a web server. If permissions are incorrectly set, the server may block access, resulting in a “403 Forbidden” error. For example:
- Files should typically have permissions set to 644 (readable by the server).
- Directories should typically have permissions set to 755 (readable and executable by the server).
- If permissions are too restrictive (e.g., 600 for files), the server may deny access, causing the error.
6. How do I change file and folder permissions to fix the error?
- To change permissions:
- Access your server via an FTP client like FileZilla or your hosting control panel.
- Navigate to the file or directory that is causing the issue.
- Right-click the file or folder, select File Permissions, and adjust the permissions to 644 for files and 755 for directories.
- Save the changes and refresh your website to see if the error is resolved.
7. How do I check and fix the .htaccess file to resolve the “403 Forbidden” error?
- The
.htaccess
file controls server behavior and can cause a “403 Forbidden” error if it contains incorrect rules:- Access your server using FTP or your hosting control panel.
- Locate the
.htaccess
file in the root directory. - Download a backup copy of the file before making any changes.
- Open the file and review the rules for any misconfigurations (e.g., IP blocking, directory restrictions).
- If you are unsure of the changes, rename the
.htaccess
file to something like.htaccess_old
to see if the error resolves. - If renaming the file works, this indicates a problem with the
.htaccess
file, and you may need to create a new one with correct configurations.
- If clearing your cache and cookies doesn’t resolve the error, try the following:
- Disable browser extensions that may interfere with the website (e.g., ad blockers or privacy extensions).
- Try a different network: Some websites block certain IP ranges or networks.
- Use a VPN: If access is restricted based on your geographic location, a VPN may help you bypass the restriction.
- Contact the website admin to confirm if there are access restrictions or temporary issues.
9. Can a misconfigured firewall cause a “403 Forbidden” error?
- Yes, a misconfigured firewall can block access to certain resources, resulting in a “403 Forbidden” error. This can happen on both the server and user side:
- On the server side: A firewall may block requests from specific IP addresses or regions.
- On the user side: Your personal firewall or antivirus software might prevent access to the website. You can temporarily disable your firewall to see if it resolves the issue.
10. How do I fix a “403 Forbidden” error caused by IP blocking?
- To fix an IP blocking issue:
- Check your server or .htaccess file for any rules that block specific IPs or IP ranges.
- Whitelist your IP address: If the server is blocking your IP, add it to the whitelist in the firewall settings or
.htaccess
file. - Contact your hosting provider if you’re unsure how to modify IP rules.
11. Can directory browsing cause a “403 Forbidden” error?
- Yes, if directory browsing is disabled on the server, and there is no default index file (like
index.html
orindex.php
), the server may return a “403 Forbidden” error. To fix this:- Ensure that a default index file exists in the directory.
- Alternatively, enable directory browsing in your
.htaccess
file by adding the following line:mathematicaOptions +Indexes
- This will allow users to browse the contents of the directory.
12. What should I do if the “403 Forbidden” error occurs only on certain pages?
- If the error occurs on specific pages:
- Check the permissions of the affected pages to ensure they are not overly restrictive.
- Review the .htaccess file for any page-specific rules that may be blocking access.
- Verify if the pages require authentication (e.g., login), and ensure you are logged in with the correct credentials.
13. How do I troubleshoot the “403 Forbidden” error if I’m using a content management system (CMS) like WordPress?
- To troubleshoot the error on a CMS like WordPress:
- Disable all plugins to see if a security or caching plugin is causing the issue.
- Check file and folder permissions for WordPress core files.
- Review the .htaccess file for any incorrect rules.
- Reinstall core files if the issue persists and ensure that no files are corrupted.
14. Can a CDN cause a “403 Forbidden” error?
- Yes, if you’re using a Content Delivery Network (CDN), it might block access due to misconfigured security settings or firewalls. To resolve this:
- Purge the CDN cache to remove any outdated rules.
- Check the CDN’s firewall settings for any restrictions or blocking rules that could be affecting access.
15. What should I do if none of these solutions work?
- If none of these solutions fix the “403 Forbidden” error:
- Contact your web hosting provider for assistance with server configuration.
- Review server logs for more detailed information about what’s causing the error.
- Contact the website owner or administrator if the issue persists on a site you’re trying to access.
By following these steps, you can troubleshoot and resolve the “403 Forbidden” error, ensuring you can access the website or fix access issues for visitors.