An issue that plagues both regular users and webmasters is when they encounter issues with access to individual webpages or even to entire websites on the internet. Instead of the requested page with the text and media files, you get an Nginx 403 Forbidden error, an issue we will try to provide a solution now, both for regular users but also for website administrators.
What does Nginx 403 Forbidden exactly means?
The very nature of the error comes from the fact that when you try to load a website hosted on an Nginx web server, you can’t access it. There are a wide variety of reasons for this error, this being considered a general error.
The message itself doesn’t indicate an error, but the fact that Nginx 403 Forbidden is a regular resource code. More often than not, this warning is issued on Ubuntu based systems.
As the root cause of why this error is generated, they can be divided into two classes; one addressed to ordinary users and the other to webmasters.
For regular users, we can enumerate the following reasons:
1. An issue with the internet resources on the users’ computer.
2. Inputting an incorrect website address;
3. A change of resources on the website;
4. The users’ IP was blocked because of website policy violation or banned because of other reasons.
5. The browser has timed-out.
When it comes to the reasons on the website administrators’ side, the reasons why an Nginx 403 Forbidden error is issued are different:
1. The index page has been corrupted or renamed with a different name.
2. The index page is located in a directory for which the auto index parameter is off.
3. The files that need to be loaded have incorrect file permissions.
4. The file is in an incorrect format.
5. You experience an error when trying to update the DNS cache by changing the host.
6. Incorrect .httacess configuration or in another configuration file from the server.
If a failure is temporary, a simple restart usually does the trick. It is more than just that, the following solutions can be recommended as universal fixes:
1. Check the accuracy of writing the website link, so it does not contain capital letters and symbols in other alphabets but latin.
2. Clear the browser cache and cookies.
3. Try using a different browser.
4. Make sure you are not banned from accessing the site.
5. Try using utilities to hide your external IP.
6. Contact the administrator of your website resources and ask for clarification with the performance issues.
7. Wait a while and retry access if the problem is the availability of the internet resource.
For webmasters we recommend the following quick fixes to solve this error:
1. Check that the file index.html has a correct file name, and not something like index.htm, index.php, index.shtml, or that they do not have a symbol from another alphabet different from the latin one.
2. Set the correct permissions for the public_html folder and all of the files inside, which is 755 for any folder and 644 for the files.
3. Check if the files and folders have the correct paths.
4. If you recently changed the DNS settings, allow it up to 24 hours for it to propagate all around the globe.