A 403 Forbidden error indicates that the web server understands the request but refuses to authorize access to the requested resource. This typically occurs due to incorrect file permissions, a restrictive .htaccess file, or a security rule blocking a specific IP address or directory.
Before you begin
You will need:
Access to your website's files via an FTP client or a File Manager.
Access to your website's control panel (such as cPanel or Windows Control Panel).
The specific URL where the 403 error is occurring.
Check for incorrect file or folder permissions
Incorrect permissions can prevent the web server from reading the files or executing the scripts necessary to load your page.
Log in to your hosting control panel.
Open the File Manager or connect via an FTP client.
Navigate to the directory containing the site.
Check the permissions of the folders. Folders should typically be set to
755.Check the permissions of the files. Files should typically be set to
644.If you find files or folders with restrictive permissions (such as
700or600), update them to the standard values.
Check the .htaccess file
A misconfigured or corrupted .htaccess file is a common cause of 403 errors, especially on Linux-based servers.
Access your site's root directory via File Manager or FTP.
Locate the
.htaccessfile. (Note: You may need to enable "Show Hidden Files" in your File Manager settings).Rename the file to
.htaccess_old.Refresh your website in a browser.
Note: If the site loads correctly after renaming the file, the issue is within the .htaccess configuration. You should then create a new, clean .htaccess file or manually correct the rules in the old one.
Check for IP blocks or security rules
Sometimes a security plugin or a server-level firewall may block your specific IP address or a range of IPs.
Check if the site is accessible from a different network (such as a mobile device using cellular data).
If the site works on a different network, your IP may be blocked by a security firewall.
If you use a security plugin (like Wordfence or Sucuri), check the "Blocked" or "Whitelist" logs to see if your IP is listed.
If you use a service like Cloudflare, check the Cloudflare Firewall Events to see if a rule is triggering a block.
Check for missing index files
If a directory does not contain a default index file (like index.html or index.php), the server may be configured to deny access to the directory listing.
Verify that the directory you are trying to access contains an
index.htmlorindex.phpfile.Ensure the filename is lowercase and does not contain spaces.
If the file is missing, upload the correct index file to the directory.
Confirm the result
The website loads successfully at the affected URL.
The 403 Forbidden message no longer appears in the browser.
If the error persists after these checks
If you have verified permissions, checked the .htaccess file, and confirmed the existence of an index file, but still see a 403 error, the issue may be related to a specific server-side configuration or a complex security rule.
To help Hostek investigate, please provide the following:
The specific URL where the error occurs.
A screenshot of the full error page.
A list of any security plugins or third-party firewalls currently active on your site.
