How to fix the "403 Forbidden" error in 2024 (2024)

Errors

Sep 10, 2024

Ariffud M. & Jordana A.

10min Read

“403 Forbidden” is a standard HTTP status code indicating that the web server understands the request but refuses to authorize it. This could be due to permission issues, incorrect file permissions, or server configuration problems.

How to fix the "403 Forbidden" error in 2024 (1)

Here are potential causes that can trigger this error:

  • Misconfigured file and folder permission settings. Prevents users from accessing sensitive files or certain parts of a website, often leading to a “403 Forbidden” error.
  • Corrupt .htaccess file. Misconfiguration and malware can break the .htaccess code.
  • Missing index page. The index.html or index.php file, which is the default homepage template, isn’t available in the website’s directory.
  • Incompatible WordPress plugin. A WordPress plugin might be conflicting with another plugin or was incorrectly configured.
  • Incorrect IP address. The domain name points to an inaccurate IP address whose website blocks your access.
  • Malware scan. Your website’s security measures can limit access to specific resources to prevent malicious attacks.
  • New web page link. The webpage link was recently updated, making it different from the cached version.
  • Empty website directory. The URL is trying to access your website’s directory instead of a file.

Download comprehensive HTTP status codes cheat sheet

What Is the 403 Forbidden Error?

403 forbidden errors are often caused by incorrect settings for certain files or folders, restricting access. You can usually resolve this by adjusting these settings to allow proper permissions.

Error code403 Forbidden Error
Error typeClient-side error
Error variationsForbidden: You don’t have permission to access [directory] on this server
HTTP Error 403 – Forbidden
Error 403 – Forbidden
403 Forbidden request forbidden by administrative rules
403 Forbidden
Access Denied – You don’t have permission to access
Error 403
HTTP 403
Forbidden
Error causesAccess misconfiguration
Corrupt .htaccess file
Missing index page
Broken WordPress plugin
Wrong IP address
Malware infection
New web page link
Empty website directory

How to fix the “403 Forbidden” error

If you discover pages returning a “403 Forbidden error” either by using a website crawler or by simply noticing it, there’s no need to panic. Here are 12 effective ways to ensure that your website remains accessible and operates optimally.

These solutions will help you resolve and prevent potential downtime, keeping your site running smoothly.

1. Clear your browser cache and cookies

The browser cache speeds up website loading on future visits. However, if the web page’s link changes, it can cause a mismatch with the cached version and trigger the 403 HTTP status code. Browser cookies – small files that remember your preferences and details – are also a common culprit of the “403 Forbidden” error.

While cache is dedicated to improving website loading speed, cookies focus on personalizing your browsing experience. That’s why a forbidden page error usually occurs on a frequently logged-in website.

Keep in mind, that this method will force the browser to re-request site files, requiring you to sign in again on most websites.

Here are the steps to clear cache and cookies on Google Chrome. The steps are similar in Firefox and Safari:

  1. Click on the three-dot icon in the top right corner and select Settings.
  2. Locate Privacy and securityClear browsing data.
How to fix the "403 Forbidden" error in 2024 (2)
  1. Use the drop-down menu to choose the time range. We recommend choosing All time to remove all the old files. Then, select Cookies and other site data and Cached images and files.
  2. Click Clear data to erase them.
How to fix the "403 Forbidden" error in 2024 (3)

After completing these steps, try revisiting and logging into the problematic website to see if it fixes the error. This method also works for other errors, like the 400 Bad Request.

2. Temporarily disable VPN

A virtual private network (VPN) can trigger a “403 Forbidden” error on websites that block access from VPN servers due to security or regional restrictions.

To test this theory, temporarily disconnect your VPN and retry accessing the web page. If this resolves the error code, consider switching to a different VPN server or contact your VPN provider.

3. Temporarily disable CDN

A content delivery network (CDN) is a network of servers that caches and delivers content from the closest web server to the user, reducing load times and bandwidth usage.

If your website uses a CDN, it may cache a “403 Forbidden” error due to issues like file permissions, IP blocking, and incorrect .htaccess rules. Temporarily bypassing CDN helps determine whether the source of the error is the original web server or the CDN itself.

We automatically enable our in-house CDN for our Business Web Hosting plan and above. Follow these steps to troubleshoot “403 Forbidden” by disabling Hostinger CDN temporarily:

  1. Navigate to Performance CDN from hPanel.
  2. Find the CDN status section and click Disable.
How to fix the "403 Forbidden" error in 2024 (4)
  1. If this fixes the issue, keep the CDN disabled for now and contact our support team for troubleshooting assistance.

4. Scan for malware

.htaccess is a web server configuration file that primarily works by altering the Apache web server settings. Located in your website’s root directory public_html, it contains a set of rules for how your website should behave in certain situations, including who can access what resources or pages.

If your WordPress site is infected with malware, unwanted code can be injected into the .htaccess file. Having the rules changed can cause the HTTP status code 403.

Hostinger users can leverage our built-in scanner to remove malware in WordPress. You don’t need to purchase third-party integrations because the automated tool can scan your websites for malware for free.

Here’s how to do it:

  1. On hPanel, navigate to Security → Malware Scanner.
  2. If no malware is found, this section will display your hosting plan’s name and the time since the last scan.
  3. Otherwise, the malware scanner will summarize detected malicious files in the past 30 days and the actions taken to fix them.
How to fix the "403 Forbidden" error in 2024 (5)

For extra security, use a WordPress malware scanner plugin to identify malicious software on your WordPress website. The top WordPress security plugins, such as Sucuri and Wordfence, offer this feature.

If the error persists after fixing the infected file, we recommend creating a new .htaccess file.

5. Restore the .htaccess file

If your .htaccess file is infected or misconfigured, replace it using an FTP client or file manager.

For Hostinger users, follow these steps to locate and create a new .htaccess file. If you’re using cPanel, the steps should be similar:

  1. On hPanel, navigate to FilesFile Manager.
  2. Open the public_html directory and locate the .htaccess file. Right-click on it and select Download to create a backup on your local computer.
How to fix the "403 Forbidden" error in 2024 (6)
  1. Delete the current .htaccess file from your hosting account.
  2. Create a new server configuration file by clicking New file and naming it .htaccess without any extensions.
How to fix the "403 Forbidden" error in 2024 (7)
  1. Copy the following code to the new file, then Save it.
# Enable URL RewritingRewriteEngine On# Rewrite rule to redirect requests to index.phpRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?/$1 [L]

Pro Tip

Check out our guide for tips on using File Manager at Hostinger to manage website files. We also have a tutorial covering the server configuration file in greater detail, including how to locate it in cPanel.

Alternatively, follow these steps for WordPress websites:

  1. Log in to your WordPress dashboard and select Settings → Permalinks.
  2. Click the Save Changes button at the bottom without making any modifications. It will generate a new .htaccess file for your WordPress site.
How to fix the "403 Forbidden" error in 2024 (8)

Try to re-access the web address. If this method fixes the “403 Forbidden” error code, it indicates a corrupted .htaccess file.

6. Reset file and directory permissions

Websites have unique file permissions that control how users can read, write, and execute data. If misconfigured, it can cause HTTP 403 forbidden errors.

With Hostinger, you can fix file permission issues in just one click. To access the built-in tool on hPanel, look up Fix File Ownership in the search bar.

Select the confirmation checkbox and click Execute. The tool will automatically assign default permissions to all website files and folders.

How to fix the "403 Forbidden" error in 2024 (9)

Alternatively, configure an FTP client like FileZilla to reset file and folder permissions manually. Keep in mind that this method requires an understanding of FTP protocol and file permissions.

Here’s how to reset file permissions using FileZilla:

  1. Make sure FileZilla is connected to your website.
  2. Right-click on the public_html directory and select File Attributes.
How to fix the "403 Forbidden" error in 2024 (10)
  1. In the Numeric value field, enter 755. This value allows only the owner to read, write, and execute the file or directory, preventing others from modifying it.
How to fix the "403 Forbidden" error in 2024 (11)
  1. Select Apply to directories only, and click OK.
  2. After changing directory permissions, repeat steps 2 and 3. This time, enter 644 in the Numeric value field and select Apply to files only. The 644 value allows the owner to read and write, while others can only read.
How to fix the "403 Forbidden" error in 2024 (12)

After applying the correct permissions, reaccess your website to check if the permission error persists.

Are You on Linux?

Check out our article on how to change file permissions and owners in Linux.

7. Disable WordPress plugins

If the previous methods fail, check whether an incompatible or problematic WordPress plugin is causing the HTTP 403 error.

Hostinger users can disable their WordPress plugins straight from hPanel. Go to WordPress Security and scroll down to the Installed plugins section. Then, click on the toggle to disable each plugin individually.

How to fix the "403 Forbidden" error in 2024 (13)

If you’d rather disable the plugins manually, use a file manager or an FTP client. Here’s how to do it via the hPanel file manager:

  1. Navigate to the wp-content folder in public_html.
  2. Locate the plugins folder and rename it to disabled-plugins. This will make the folder temporarily unrecognizable by the web server, deactivating all plugins simultaneously.
How to fix the "403 Forbidden" error in 2024 (14)
  1. Now, try accessing your website. If HTTP error “403 Forbidden” is gone, a problematic plugin was likely causing the issue.
  2. Revert the folder’s name to plugins to re-enable all plugins.
  3. Go to Plugins Installed Plugins from your WordPress dashboard and Deactivate all plugins one by one. Whenever you deactivate a plugin, check if it resolves the error. This step will help identify the faulty plugin.
  4. Once identified, update or remove the plugin to fix the issue.

8. Verify the A record

The “403 Forbidden” error can occur if your domain points to an incorrect IP address, denying you access even with valid credentials. To prevent this, ensure your domain points to your hosting provider’s IP address.

Hostinger users can navigate to Plan Details on hPanel to find their website’s IP address.

How to fix the "403 Forbidden" error in 2024 (15)

Follow these steps to check if the domain A record is pointed correctly via hPanel:

  1. From the hPanel dashboard, navigate to AdvancedDNS Zone Editor.
  2. You will find a list of DNS records. Locate the A records by scanning the Type column.
  3. Examine the IP addresses in the Content column.
How to fix the "403 Forbidden" error in 2024 (16)
  1. If the A records don’t point to the correct IP address, click Edit to modify them. Once you’re done, click Update.

Editing an existing A record may affect any services or subdomains currently using it. If changing the existing A records doesn’t resolve the error or disrupt other operations, consider creating a new one.

On hPanel, you can create a new A record in the Manage DNS Records section. Select A as the Type and input the valid IP address in the Points to field. Then, click Add Record.

How to fix the "403 Forbidden" error in 2024 (17)

9. Update nameservers

If you’ve migrated to a new hosting provider and forgot to update your nameservers, your domain might still point to the old host and lead to a 403 error status code.

To resolve this issue, you must update your domain’s nameservers.

If you have recently migrated to Hostinger, here’s how to change your nameservers to Hostinger’s:

  1. Go to Domains and select Manage next to your domain.
How to fix the "403 Forbidden" error in 2024 (18)
  1. Click on the Change link in the Nameservers section.
How to fix the "403 Forbidden" error in 2024 (19)
  1. Pick the Use Hostinger nameservers option and click Save.
How to fix the "403 Forbidden" error in 2024 (20)

10. Upload an Index page

The following methods are more technically complex. If you’re unsure of the steps, contact your hosting provider’s support team for troubleshooting assistance.

Most web servers disallow directory browsing for security reasons. Instead of showing what’s inside a folder on the page, they’ll show a standard web page.

Moreover, attempts to access a directory without a standard web page, usually in index.html or index.php format, result in a “403 Forbidden” error message.

First, check whether your website’s homepage name is index.html or index.php. If not, rename it in the FTP client or file manager.

Another way to resolve this issue is to upload an index page to your public_html directory and create a redirect to your existing homepage. Here’s how to do it:

  1. Access the public_html directory using an FTP client or file manager.
  2. Create a New File named index.html or index.php inside the root directory.
  3. Open the .htaccess file in the root directory. Insert the following code snippet to redirect index.php or index.html to your existing homepage. Be sure to replace homepage.html with the actual name of your page.
Redirect /index.html /homepage.html
  1. Save the changes, then check your website’s homepage to see if the problem is resolved.

Whichever method you choose, we strongly advise against enabling directory browsing to resolve the “403 Forbidden” error. This can expose your directory’s content to the public, leading to security risks.

11. Edit File Ownership

Incorrect file ownership can trigger the “403 Forbidden” error, particularly in Linux-based computers or VPS hosting. If you’re using a VPS with SSH access, you can modify file ownership by connecting your VPS to an SSH client like PuTTY.

After connecting to the SSH server, check the ownership using the following SSH command:

ls -l [file name]

The result will resemble the following:

-rwxrw-rw- 1 [owner][group] 22 Sep 22 10:00 filename.txt

Pay attention to the owner and group sections. The correct ownership should match your hosting account’s username. Otherwise, utilize the chown Linux command to adjust file ownership.

Here’s the basic syntax for the chown command:

chown [owner][:group] [file name]

For example, if your username is John, use the command below:

chown John filename.txt

12. Use Hostinger AI Troubleshooter

Although still in beta, Hostinger’s built-in AI Troubleshooter provides a practical solution to troubleshooting. Hostinger users can use it to fix the “403 Forbidden” error with a few clicks.

Here’s how to use Hostinger AI Troubleshooter:

  1. On hPanel, navigate to WordPress → AI Troubleshooter (beta). You can check the Help page to see if it detects the “403 Forbidden” error on your website.
How to fix the "403 Forbidden" error in 2024 (21)
  1. Click on the Fix with AI assistant button to see its troubleshooting recommendations.
  2. Select Fix my website if you approve its corrective action. Otherwise, choose Try another solution so the AI will come up with another solution.
How to fix the "403 Forbidden" error in 2024 (22)

More Reasons to Use Hostinger

Besides AI Troubleshooter, all our WordPress hosting plans come with an object cache feature, auto-updates, and vulnerabilities scanner for optimal website performance and user experience. Take advantage of the 30-day money-back guarantee to test our hosting services risk-free.

Learn how to fix the “403 Forbidden” error with Hostinger Academy

Watch this video if you need help visualizing the troubleshooting steps.

How to fix the "403 Forbidden" error in 2024 (24)

Subscribe For more educational videos! Hostinger Academy

Conclusion

The “403 Forbidden” error can disrupt your website’s functionality and lead to a poor user experience. Multiple causes can trigger this HTTP error, including incorrect file permissions, a corrupted .htaccess file, faulty plugins, and IP blocking errors.

Let’s recap the 12 most effective solutions:

  1. Clear the web browser cache and cookies
  2. Disable VPN temporarily
  3. Disable CDN temporarily
  4. Scan for malware
  5. Restore the .htaccess file
  6. Reset the site’s file permissions
  7. Disable WordPress plugins
  8. Verify the A record
  9. Update nameservers
  10. Upload an index page
  11. Modify file ownership
  12. Use Hostinger AI Troubleshooter

Focusing on “403 Forbidden” error prevention is key. Conduct regular security audits, document access controls, and update web server software to avoid future errors.

Suggested Reading

Check out our website troubleshooting guide for best practices on diagnosing and fixing a broken website.

403 Forbidden error FAQs

Can incorrect file permissions cause a 403 error?

Yes. The website can block access to the requested resource when file permissions are misconfigured. This causes an authentication failure that prevents users from viewing or accessing specific files or directories. To fix the “403 Forbidden” error, it’s crucial to check the file permissions, rectify any discrepancies, and ensure the server configuration aligns with access requirements.

Can server misconfigurations cause a 403 error?

Yes. Misconfigured web server settings and files like .htaccess can restrict access to certain resources, resulting in a 403 Forbidden error.

Is it possible to customize the 403 error Page?

Yes. Website administrators can create custom error pages to display an informative message that aligns with the website’s branding. This custom page also lets an administrator provide specific instructions to resolve the 403 error.

How to fix the "403 Forbidden" error in 2024 (26)

The author

Ariffud Muhammad

Ariffud is a Technical Content Writer with an educational background in Informatics. He has extensive expertise in Linux and VPS, authoring over 200 articles on server management and web development. Follow him on LinkedIn.

More from Ariffud Muhammad

How to fix the "403 Forbidden" error in 2024 (27)

The Co-author

Jordana Alexandrea

Jordana is a Senior Content Writer with over 5 years of experience in digital marketing and web development. When she’s not busy with work, she dabbles in creative writing and movie reviewing. Follow her on LinkedIn.

More from Jordana Alexandrea

How to fix the "403 Forbidden" error in 2024 (2024)

FAQs

How to fix the "403 Forbidden" error in 2024? ›

To fix a 403 error, try resetting file permissions, restoring the . htaccess file, deactivating plugins, or contact your hosting provider for assistance.

How to resolve 403 Forbidden error? ›

How to Fix the 403 Forbidden Error
  1. Refresh the web page. ...
  2. Check for URL errors and specify an actual web page file name and extension, not just a directory. ...
  3. Clear your browser's cache. ...
  4. Log in to the website, assuming it's possible and appropriate.
Aug 15, 2024

How to fix error code 403? ›

To fix a 403 error, try resetting file permissions, restoring the . htaccess file, deactivating plugins, or contact your hosting provider for assistance.

Why am I suddenly getting a 403 Forbidden error? ›

The 403 Forbidden error means that your server thinks you do not have the required permission to access that particular page. This is usually caused by an issue with file permissions, but could be caused by another problem related to hosting or authentication.

Does 403 Forbidden mean I'm blocked? ›

A 403 Forbidden error is an HTTP (HyperText Transfer Protocol) status code that blocks you from accessing the page a user is trying to view. This error can deter visitors, reducing traffic and costing you potential customers. HTTP is the set of rules that govern how web pages get sent from one place to another.

Does 403 Forbidden go away? ›

The first thing to try to fix a 403 forbidden error message is to clear your cache and cookies and disconnect from a VPN if you're using one just to make sure it's not an issue on your end. If the problem persists, you may need to contact your ISP or the site's administrator.

Is 403 error permanent? ›

A 403 error occurs when a server won't allow you to access a webpage. You can't always fix a 403 error on your own, but simple tricks like refreshing your page or clearing your cache could help. If visitors to your webpage are getting 403 errors, you may have to reconfigure it.

Does error 403 mean IP ban? ›

The 403 error indicates that the website owner has set up rules that are blocking your IP address. Please contact the website owner directly and provide them with the Cloudflare Ray ID (861c5a459dd516bb) so they can investigate and potentially unblock your IP.

Why am I unable to access the 403 error? ›

403 stands for Forbidden, means the token you are using does not have Read access . Please review the permissions you gave to that token. One more thing, it that a Classic Token or the new Fine-grained Personal access token?

What is 403 error permission? ›

What does 403 Forbidden mean? A 403 Forbidden error means that you are not allowed or do not have permission to view the requested file, resource, or page you are trying to view in a browser.

How do I delete 403 Forbidden? ›

Here are some ways to fix the 403 Forbidden error effectively:
  1. Clear your browser cache and cookies. The 403 Forbidden error can sometimes result from issues with your browser's cache and cookies. ...
  2. Scan for malware. ...
  3. Check the . ...
  4. Reset file and directory permissions. ...
  5. Disable CMS plugins. ...
  6. Update nameservers.
Dec 22, 2023

Is Error 403 temporary? ›

Sometimes the simplest solutions are the only ones capable of solving complex problems. So try to refresh the page you are not able to access. The 403 error is often temporary, so maybe you'll get lucky.

Does 403 Forbidden mean the website is down? ›

A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server. It's usually a problem with the website itself. However, you can try refreshing the page, clearing your cache and cookies, and disconnecting from any VPN you might be using.

How do I reset my 403 Forbidden? ›

How to Resolve a 403 Forbidden Error
  1. Refresh the page and verify the URL.
  2. Clear your browser cache and cookies.
  3. Run a malware scan.
  4. Delete and renew your .htaccess file.
  5. Review and revise file and directory permissions.
  6. Deactivate WordPress plugins.
  7. A record verification and nameserver update.
  8. Temporarily disable CDN.
Dec 21, 2023

How do I handle 403 Forbidden? ›

If HTTP error “403 Forbidden” is gone, a problematic plugin was likely causing the issue. Revert the folder's name to plugins to re-enable all plugins. Go to Plugins → Installed Plugins from your WordPress dashboard and Deactivate all plugins one by one. Whenever you deactivate a plugin, check if it resolves the error.

How do I get rid of 403 Forbidden on Chrome? ›

Clear your browser cookies and cache

Corrupted or outdated cookies and cache files can interfere with website access and trigger a 403 error. Clearing these files helps your browser establish a new connection.

How do I fix 403 Forbidden on my computer? ›

A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server. It's usually a problem with the website itself. However, you can try refreshing the page, clearing your cache and cookies, and disconnecting from any VPN you might be using.

What is the response status of 403 Forbidden? ›

The HTTP 403 Forbidden client error response status code indicates that the server understood the request but refused to process it. This status is similar to 401 , except that for 403 Forbidden responses, authenticating or re-authenticating makes no difference.

Top Articles
What are impressions, position, and clicks?
What Is Plaid? | How It Works, How Safe It Is & How To Use
Lowe's Garden Fence Roll
Mchoul Funeral Home Of Fishkill Inc. Services
Kevin Cox Picks
Asist Liberty
Kraziithegreat
Craigslist Free Stuff Appleton Wisconsin
Caroline Cps.powerschool.com
Geodis Logistic Joliet/Topco
Directions To 401 East Chestnut Street Louisville Kentucky
Stolen Touches Neva Altaj Read Online Free
Swimgs Yung Wong Travels Sophie Koch Hits 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Springs Cow Dog Pig Hollywood Studios Beach House Flying Fun Hot Air Balloons, Riding Lessons And Bikes Pack Both Up Away The Alpha Baa Baa Twinkle
Oppenheimer Showtimes Near Cinemark Denton
Red Tomatoes Farmers Market Menu
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
Gdp E124
DBZ Dokkan Battle Full-Power Tier List [All Cards Ranked]
Account Suspended
Metro Pcs.near Me
X-Chromosom: Aufbau und Funktion
Catherine Christiane Cruz
Miltank Gamepress
Boston Dynamics’ new humanoid moves like no robot you’ve ever seen
The Boogeyman (Film, 2023) - MovieMeter.nl
Rugged Gentleman Barber Shop Martinsburg Wv
Broken Gphone X Tarkov
Word Trip Level 359
B.k. Miller Chitterlings
Eleceed Mangaowl
Build-A-Team: Putting together the best Cathedral basketball team
Maxpreps Field Hockey
Myfxbook Historical Data
159R Bus Schedule Pdf
The Holdovers Showtimes Near Regal Huebner Oaks
Wilson Tattoo Shops
Fwpd Activity Log
Cnp Tx Venmo
Todd Gutner Salary
Lucyave Boutique Reviews
Costco Gas Foster City
Citroen | Skąd pobrać program do lexia diagbox?
Woody Folsom Overflow Inventory
Craigslist Woodward
Wgu Admissions Login
Caesars Rewards Loyalty Program Review [Previously Total Rewards]
Underground Weather Tropical
Craigslist Pets Charleston Wv
Naomi Soraya Zelda
Lorcin 380 10 Round Clip
Leslie's Pool Supply Redding California
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 6575

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.