Skip to content

403 Forbidden Error on Your Site: How to Tell Who Is Blocking and How to Fix It

On this page

Last updated: · By

In short: a 403 Forbidden error means the server understood the request and refuses it. To fix it you first have to know who blocked it: Cloudflare, Nginx, Apache or a WordPress plugin. On 7 Nov 2026 I tested about 20 requests to my site and got four different kinds of 403. The cf-cache-status header and the error page tell you who answered.

⏱ Diagnosis time: 5–15 minutes · Difficulty: Intermediate · Last checked against my site: 7 Nov 2026

In short: four kinds of 403 I got from the same site (checked on 7 Nov 2026)

Cloudflare Challengewp-login.php, wp-admin: header cf-mitigated: challenge, a “Just a moment…” page
Cloudflare blockwp-config.php, xmlrpc.php, .env, the Bytespider bot: an “Attention Required! | Cloudflare” page, no cf-cache-status
Nginx on the server.htaccess (and, until 7 Nov 2026, ClaudeBot, CCBot and Amazonbot too): cf-cache-status: BYPASS, a 403 page with nginx at the bottom
Apache on the server/wp-content/uploads/, /wp-includes/: an Apache 403 page (no directory listing)
Regular pages200 for visitors, Googlebot, Bingbot, GPTBot, OAI-SearchBot and Claude-SearchBot

What is a 403 Forbidden error?

403 Forbidden is an HTTP response code that says “I understand, and I do not allow it.” According to MDN, unlike 401, logging in or using a different password will not change the result. The official definition is in the HTTP Semantics standard (RFC 9110).

In practice, a 403 on a WordPress site almost always comes from one of four places: a CDN and security layer such as Cloudflare, the web server (Nginx), Apache with .htaccess and file permissions, or a security plugin inside WordPress. Each one leaves a different fingerprint.

CodeWhat it meansWhat to do
401You need to authenticateLog in with the right credentials
403Identified or not, you are not allowedFind the layer that blocked you and change the rule
404There is no such pageSee the 404 error guide

How do you tell who blocked you?

The fastest way is to read the response headers. It is the method I use, and it takes a minute. The rule that worked for me, on a site behind Cloudflare: no cf-cache-status = Cloudflare blocked it. A cf-cache-status (for example BYPASS) = the request reached the server, and the server blocked it.

curl -s -o /dev/null -D - "https://example.com/path?t=1" | grep -iE "^(HTTP|cf-cache-status|cf-mitigated|server)"
curl -s "https://example.com/path?t=1" | grep -ioE "<title>[^<]*|nginx|Apache[^<]*"

The ?t= parameter at the end bypasses the cache, so you get the server’s real answer and not a stored copy. According to the Cloudflare documentation, BYPASS means the request was sent to the origin server, and NONE appears when the response was generated without cache, for example in a WAF block. On my site, in Cloudflare blocks, the header did not appear at all.

What you seeWho blockedA real example from my site
cf-mitigated: challenge, a “Just a moment…” titleCloudflare, a Challenge checkwp-login.php
“Attention Required! | Cloudflare”, “you have been blocked”Cloudflare, a WAF rule or a bot blockxmlrpc.php, .env, Bytespider
cf-cache-status: BYPASS, a 403 page with nginxNginx on the server.htaccess, and until 7 Nov 2026 ClaudeBot too
A 403 page with “Apache … Server at”Apache on the server/wp-content/uploads/
A 403 page styled like your site or a pluginWordPress or a security pluginNot seen on my site

The cf-mitigated header is documented in the Cloudflare guide to detecting a Challenge, and its only value is challenge. If you do not have Cloudflare at all, skip straight to checking the error page.

Why does Cloudflare return 403?

Cloudflare returns 403 when a security rule decided to block or check the request. On my site I saw two modes: a Challenge on the login page, and a full block for sensitive files and for the Bytespider bot. Those requests never reached the server at all.

  • Challenge (a check): a real browser passes it on its own within seconds. A script, a monitoring tool or an app gets 403. If a monitoring tool fails, add an exception for it in the rule.
  • WAF block: check the security events in the Cloudflare dashboard, find the rule that caught the request, and change it or add an exception.
  • Bot block: if a legitimate bot is blocked, check the bot settings in Cloudflare before looking at the server.

If you are connecting Cloudflare to a site on Cloudways, see the Cloudflare setup guide.

Why does the server (Nginx) return 403?

When cf-cache-status appears and the error page is signed nginx, the block is on the server itself, before WordPress. Nginx is the first layer on a Cloudways server, and a full explanation is on the page what is Nginx.

On my server Nginx blocked two things. The first is files that must not be exposed, such as .htaccess, which is excellent. The second was AI bots: until 6 Nov 2026 ClaudeBot, CCBot and Amazonbot received a 403 with BYPASS on a request that reached the server, while GPTBot and PerplexityBot received 200. That block could not be changed from the panel, so I opened a ticket, and on 7 Nov 2026 Cloudways support removed it. The full story and the ticket template: how I got the AI bot block removed on Cloudways.

Another finding from the same test, before the removal: when the page was already in the Cloudflare cache, ClaudeBot got 200 too. The same bot can get 200 on one page and 403 on another. That is why you always test with a parameter that bypasses the cache.

Other reasons for a server-level 403 on Cloudways:

Black Friday80% off
80% off 2 months of managed hosting

The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Ends in—days—hours—minutes—seconds
Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator

How do you fix an Apache 403: file permissions and .htaccess?

A 403 page signed “Apache … Server at” comes from the layer that runs WordPress. The three common causes are a directory with no index file, wrong file permissions, and a deny rule in .htaccess.

A directory with no index: on my site /wp-content/uploads/ returns 403, and that is normal. The server simply does not show a directory listing. If the images themselves load, there is nothing to fix.

File permissions: after you move files manually, permissions or ownership get scrambled and Apache cannot read them. On Cloudways you reset them from the panel:

  1. In the management panel, select the server and the application.
  2. In the side menu click Application Settings.
  3. In the Reset File/Folders Permission section, choose a user (the application user is recommended, not Master).
  4. Click Reset. According to the Cloudways article, folders go back to 775 and files to 664, only inside public_html.

Note the gap: the WordPress documentation recommends 755 for folders and 644 for files on shared servers, and is even stricter for wp-config.php. The Cloudways default is slightly more open to the group, because the application user and the Master user share a group.

.htaccess: a line such as Require all denied, or an IP block left behind by a security plugin, will return 403. Temporarily rename the file, refresh, and if the error disappears, look for the problem line. Cloudways documents examples in the .htaccess article.

What do you do when the 403 comes from WordPress itself?

If the error page is styled like your site, or shows the name of a plugin, the block is in WordPress. The common causes: a security plugin that blocked your IP after several login attempts, or a REST API block that breaks the editor.

  1. Log in from a different network (for example from your phone) to check whether only your IP is blocked.
  2. Temporarily disable the security plugin through SFTP or WP-CLI, and test again.
  3. Check the application’s error logs in the panel. See how to read logs on Cloudways.

Common mistakes when diagnosing a 403

Testing without bypassing the cache: a stored copy in Cloudflare can return 200 even when the server blocks. Add a random parameter to the URL.

Fixing permissions when the problem is in Cloudflare: if there is no cf-cache-status, no change on the server will help. Start with the security events in Cloudflare.

Opening everything up: a 403 on .htaccess, wp-config.php and xmlrpc.php is good protection. Fix only what was blocked by mistake.

Black Friday80% off
80% off 2 months of managed hosting

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

Frequently asked questions

What is a 403 Forbidden error?

It is a response where the server understood the request but refuses to carry it out. Usually a permission is missing, or a security rule blocked the request. Logging in again will not help, because it is not a password problem but a decision by the server or by a security layer in front of it.

What is the difference between 403 and 404?

404 means the page was not found. 403 means the page probably exists, but you are not allowed to access it. Some servers return 404 instead of 403 so as not to reveal that a resource exists, so it is sometimes worth checking both.

How do you know whether Cloudflare or the server blocked you?

Check the response headers. If there is cf-mitigated: challenge or a Cloudflare Attention Required page, and no cf-cache-status, the block is in Cloudflare. If there is a cf-cache-status such as BYPASS and a 403 page from nginx or Apache, the request reached the server and it blocked it.

Why do I get a 403 only on the WordPress login page?

Usually because a security layer protects wp-login.php specifically. On my site it is a Cloudflare rule that shows a check (Challenge) to everyone who enters that page. In a regular browser the check passes on its own within seconds, but scripts and automated tools get 403.

Can wrong file permissions cause a 403?

Yes, it is one of the common causes after a hosting move. On Cloudways you can reset the permissions from the panel in Application Settings, and they go back to 775 for folders and 664 for files. After the reset, check .htaccess too.

A Google bot is getting 403. What do you do?

First check in Search Console with a live URL inspection. Then check the WAF rules in Cloudflare, security plugins and User-Agent blocks. On my site Googlebot and Bingbot get 200, but some AI bots were blocked in the Cloudways Nginx.

Sources

The measurement: about 20 curl requests from a computer in Israel to cw-servers.com, on 7 Nov 2026 at around 01:40 UTC, with the User-Agent of a browser and of bots. The Cloudflare rule results reflect my own site’s settings, and on your site they will be different.

Official source: How Can I Reset File and Folder Permissions (Cloudways Knowledge Base). Written and checked by Asael Dreyer · Updated: 7 Nov 2026

Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details

Picture of Asael Dreyer
Asael Dreyer

Hi, I'm Asael Dreyer, CEO of an SEO agency that runs hundreds of websites hosted on dozens of Cloudways servers.
Everything you will find here comes from hands-on experience, mine and my teams', straight from the field: from the guides to the recommendations. All to help you get the most out of Cloudways.

More about me →

Need help? Got a question about your server or this guide? Write to us and we will get back to you.

More guides on this topic:
מפריד
Thanks for your message!
We will get back to you soon.
Ready to get started?

Sign up with the coupon code ASAEL