Webhosting – Error 403 Forbidden

  Web Hosting

In this article, you will learn:

Error 403 Forbidden

You can recognize Error 403 by the large Forbidden heading at the top of the page. Below the heading you will find a more detailed description of the error. In the page tab is the text 403 Forbidden.

An Error 403 page
An Error 403 page

Troubleshooting Error 403

Error 403 can have various causes. According to the message under the Forbidden heading, you can isolate the specific cause, but if you are not sure, go through the entire procedure.

The procedural steps are:

To check whether the solution worked, reload the page using the keyboard shortcut Ctrl + Shift + R, which will clear the browser cache. If the shortcut doesn’t work, clear your browser cache according to this guide.

Repair File Permissions

Repairing file permissions ensures that the browser is allowed access to all files and folders on the site. Incorrect file permissions are one of the most common causes of Error 403.

File permissions repair can take up to several tens of minutes depending on the number of files on the Webhosting.

Follow these steps:

  1. Log into the customer administration panel.
  2. In the navigation bar, select Web c Email Hosting Webhosting or WMS.
  3. Select the service where you need to repair file permissions.
  4. In the left menu, select Tools.

In the Repair File Permissions, click the Repair File Permissions button.

WEDOS Webhosting file permissions repair
Webhosting file permissions repair

If repairing file permissions didn’t help, continue by checking files on FTP.

FTP File Check

Before making any changes on FTP, we strongly recommend performing a file backup according to the Webhosting – Backups instructions.

If the file access issue was not caused by their permissions, the files necessary for the website operation are probably damaged or deleted.

For the next procedure, log in to FTP, for example, via the WebFTP interface (manual) using the main FTP account. If you do not know the login information, follow the FTP – Accounts instructions.

First, check that the root directory only contains the following folders: session, tmp and www.

WEDOS WebFTP The session, tmp and www folders in FTP root
The session, tmp and www folders in FTP root

If any of the folders are missing, create them (you can find detailed instructions in the article Webhosting – Restore Basic FTP Directory Structure). If you see completely different folders, first make sure that you are really in the root folder of the account, accessible only to the main FTP account.

In the next step, make sure that the www folder contains the following:

  • An .htaccess file (including the dot).
  • The web file index.html (alternatively index.php), a domains (possibly subdom) folder, or both.
WEDOS WebFTP The www folder containing the .htaccess and index.html files and domains and subdom folders
The www folder containing the .htaccess and index.html files and domains and subdom folders

If the .htaccess file is missing, restore it in Webhosting Tools (same access as described in the Repair File Permissions, but scroll to the Restore Default .htaccess section).

If you have content management system files (such as WordPress) in the www folder, upload the missing .htaccess file from a working installation or backup (or find the code on the system’s website). The default .htaccess probably won’t work.

If the file index.html or index.php is missing, restore them from backup or from a functional installation of your CMS system. If your website is located in a subfolder of the domains directory (or subdom for subdomains), you do not need an index file in the www folder.

If both the site files and the domains (or subdom) folders are missing, the site has been completely deleted. If you do not have your own backup, you can try requesting ours according to the Webhosting – Backups instructions.

Finally, check the contents of the domains or subdom folder.

  • The domains folder should contain other folders with the full domain or subdomain names on which the websites work. Only inside these folders should there be web page files, i.e. index.html or index.php.
  • The subdom folder works similarly to domains, but contains folders with subdomain names without the domain name itself. Inside these folders, there should be index.html or index.php files.
WEDOS WebFTP An index.php file (among others) in a sample www/domains/wds-test.eu directory
An index.php file (among others) in a sample www/domains/wds-test.eu directory

If all files are fine and Error 403 persists, check the contents of all .htaccess files for content blocking code like this:

order deny,allow
deny from all // deny access to everyone
allow from X.X.X.X // only allow access from the specified IP addresses

This code will throw a 403 Error for anyone who tries to view the folder contents from an IP address other than the one on the allow list.

Activate HTTPS

In some cases, Error 403 can be caused by a HTTPS problem. Usae the Webhosting – Manual HTTPS Setup guide to check that you have your domains added to the certificate that has been active for at least 30 minutes.

Request Support

If none of the steps above resolved the Error 403, you can ask customer support to review the issue.

Support will not make any changes on FTP for you – they will only point out the possible sources of the issue. You can find detailed information about the scope of our support on the Customer Support page.

Follow these steps:

  1. Activate temporary support FTP access according to this guide
  2. Contact us via the form. Include the webhosting name.
  3. Wait patiently. If the investigation lasts longer than the temporary FTP access period, keep it enabled.

FAQ

Question: What if nothing in the guide helped me?
Answer: Contact support and wait for their response. These interventions are beyond the scope of normal support, so processing a request may take much longer than the normal response time.

Question: Is there any way I can make sure that the correct rights are also set for newly uploaded files?
Answer: Not from our side. Consult the manual of your FTP client or other mechanism you use to upload files. Alternatively, you can fix permissions with a custom PHP script run periodically using CRON.

Question: Does Error 403 occur anywhere other than WEDOS?
Answer: Yes, this is a common error caused by unavailability of key files on the server. The server (webhosting) works, the fix consists in setting the correct file permissions and making sure key files and folders are accessible.

Děkujeme za zpětnou vazbu!