1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Resolve a 403 error as a website visitor
This guide explains what you need to determine as a website visitor if you encounter a 403 error to resolve the issue.
What is a 403 error?
The HTTP 403 error code generally means that access to a resource is denied to the client by the server.
When does this error occur?
The user is not authenticated: the server requires the user to identify themselves to access the resource. This can be the case for private pages requiring authentication, for example.
The user is authenticated but does not have the necessary permissions: the server recognizes the user but does not grant access to the requested resource due to permission or role restrictions. This cause of the 403 error can be due to incorrect permissions on a folder or file. For a folder, the error message is "403 Forbidden", and for a file, it is "failed to open stream: Permission denied". In this case, you should check that the permissions of your folders/files are correct, which should be at least 644 for a file and 755 for a folder. Learn more
The user's IP address is blocked or restricted: the server may block access to a specific IP address for security reasons, protection against attacks... Learn more
The requested resource does not exist on the server: in this case, the server returns a 403 error instead of a 404 error to avoid disclosing sensitive information. If you are trying to access your homepage or a part of your site by entering an address like www.domain.xyz or www.domain.xyz/folder/, ensure that there is a homepage named "index.html or .htm or .php" placed in the correct location (at the root of your FTP space, in the /web directory, or in the /folder/ directory). Learn more
Additionally, ensure there are no uppercase letters in the file name; all file or folder names must be in lowercase, without accents or spaces.
Script-related error: if you were running a script, filling out a form, or uploading a file online and received this type of message:
Access forbidden!
You don't have permission to access the requested object.
It is either protected or unreadable by the server.
If you think this is a server error, please contact the site administrator.
Error 403
the cause may be a filter that prevents unwanted use of scripts by spammers. Indeed, Infomaniak's antivirus blocks file uploads via scripts or FTP. This means that when a hacker sends a file identified as a virus via a form, an unsecured script, or FTP, its upload is directly blocked, the file is not uploaded to the server, and the upload generates a 403 error.
In case of a false positive, contact Infomaniak support providing the URL of the page where you encounter this error message to accurately diagnose the problem.
However, there are many other cases where you might receive a "403 forbidden" message for various reasons (PHP scripts, perl, mod_security, .htaccess, etc.).