# 403 Forbidden in Apache

> Fix an Apache 403 Forbidden: read the AH01630 or AH01797 log line, then check Require rules, mixed 2.2 and 2.4 directives, rewrite [F] flags and index settings.

Canonical: https://scaplet.com/errors/http/403/apache

Guide Error · HTTP status codes

Fix an Apache 403 Forbidden: read the AH01630 or AH01797 log line, then check Require rules, mixed 2.2 and 2.4 directives, rewrite [F] flags and index settings.

3 min

read

9

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

403 4xx · Client error

The short answer

In Apache httpd, a 403 Forbidden means the server understood the request and an access rule refused it. The error log names the reason, often `AH01630: client denied by server configuration`. Look for `Require` rules that deny the client, old `Order` and `Allow` directives mixed with new ones, or a `RewriteRule` with the `[F]` flag.

1. [What a 403 means when Apache sends it](#what-a-403-means-when-apache-sends-it)
2. [Causes specific to Apache and where to fix them](#causes-specific-to-apache-and-where-to-fix-them)
3. [Directory requests and index files](#directory-requests-and-index-files)
4. [Verify the fix](#verify-the-fix)

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fapache%20(%22403%20Forbidden%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fapache%20(%22403%20Forbidden%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fapache%20(%22403%20Forbidden%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fapache%20(%22403%20Forbidden%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Check it

## What a 403 means when Apache sends it

RFC 9110 defines 403 as the server understanding the request but refusing to fulfill it. In Apache that is almost always a rule, not a missing file. The general meaning, and the difference from 401, are on [403 Forbidden](/errors/http/403). If you run nginx, see [403 Forbidden in nginx](/errors/http/403/nginx). This page covers Apache's rules.

Start with the error log. Apache's security tips page shows how a denied request is recorded, and how to list the most recent denials.

Find the denial in the error log

```
# Path depends on ErrorLog; Debian/Ubuntu: /var/log/apache2/error.log grep "client denied" /var/log/httpd/error_log | tail -n 10 # Example of the line you are looking for # [Mon Apr 14 09:42:03.817295 2026] [authz_core:error] [pid 1234:tid 5678] [client 192.168.1.100:54312] AH01630: client denied by server configuration: /usr/local/apache2/htdocs/.env
```

_02_Apache 403 causes

## Causes specific to Apache and where to fix them

Cause

### A `Require` rule denies the client

What to check

`Require all denied`, `Require ip`, `Require host` or `Require not ...` in the `<Directory>`, `<Location>` or `.htaccess` that covers the URL

Fix

Use `Require all granted` for public content, or add the client's address to an allow rule. A `Require not` line can never authorize a request on its own, so pair it with `Require all granted` inside `<RequireAll>`

Cause

### Apache 2.2 directives left in a 2.4 config

What to check

`Order`, `Allow from` and `Deny from` lines

Fix

Replace them: `Order allow,deny` with `Allow from all` becomes `Require all granted`, and `Order Deny,Allow` with `Deny from all` and `Allow from example.org` becomes `Require host example.org`

Cause

### Old and new access directives mixed

What to check

A `<Directory>` using `Order` and a `<Location>` using `Require`, or the reverse

Fix

Do not mix them. Apache's upgrade notes show `GET /server-status 403` with `AH01797: client denied by server configuration` because the `mod_access_compat` directives take precedence in that merge

Cause

### A rewrite rule forbids it

What to check

`RewriteRule ... [F]` in the vhost or `.htaccess`

Fix

The `[F]` flag sends a 403 Forbidden response. Narrow the `RewriteCond` or remove the rule

Cause

### A condition on a header

What to check

`<If>` blocks or `Require expr` that test `HTTP_USER_AGENT`

Fix

Fix the expression. Apache warns that access control by User-Agent is unreliable, since the header can be set to anything

Cause

### Authentication passed, authorization failed

What to check

`AuthzSendForbiddenOnFailure On`

Fix

With the default `Off`, failed authorization after a successful login returns 401. Setting it `On` returns 403 instead, so check the `Require user` or `Require group` line

Public site directory in Apache 2.4

```
<Directory "/var/www/html"> Options FollowSymLinks AllowOverride None Require all granted </Directory>
```

Deny one address and allow everyone else

```
<RequireAll> Require all granted Require not ip 10.252.46.165 </RequireAll>
```

**Rules in .htaccess only apply if AllowOverride permits them** `AllowOverride` and `AllowOverrideList` both default to `None`, and with both at `None` `.htaccess` files are completely ignored. If a rule seems to have no effect while another 403 persists, check which file the active rule really lives in, and put the fix in the vhost or `<Directory>` section.

_03_Explained

## Directory requests and index files

When a URL maps to a directory, `DirectoryIndex` lists the files httpd looks for (default `index.html`). If none exists and the `Indexes` option is set, mod_autoindex returns a formatted listing instead. Turn `Indexes` on only where a public listing is intended.

_04_How it works

## Verify the fix

1. 1

### Validate and reload

Run `sudo apachectl configtest`, then `sudo apachectl graceful`.
2. 2

### Repeat the failing request

Use `curl -sSI https://example.com/path` and confirm the status changed from 403.
3. 3

### Check the log

The `client denied` line for that path should stop appearing.

Google treats a 403 like other 4xx errors: it does not index the URL, and indexed URLs that return 4xx are removed. See [4xx errors](/seo-issues/4xx-errors) for the effect on your site.

Sources · 9

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- apache.org
- google.com

1. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-10-25
2. 02 [Apache HTTP Server 2.4: Upgrading to 2.4 from 2.2](https://httpd.apache.org/docs/2.4/upgrading.html) httpd.apache.org · checked 2026-10-25
3. 03 [Apache HTTP Server 2.4: Access Control](https://httpd.apache.org/docs/2.4/howto/access.html) httpd.apache.org · checked 2026-10-25
4. 04 [Apache HTTP Server 2.4: Security Tips](https://httpd.apache.org/docs/2.4/misc/security_tips.html) httpd.apache.org · checked 2026-10-25
5. 05 [Apache HTTP Server 2.4: mod_authz_core](https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html) httpd.apache.org · checked 2026-10-25
6. 06 [Apache HTTP Server 2.4: core features (AllowOverride, Options)](https://httpd.apache.org/docs/2.4/mod/core.html) httpd.apache.org · checked 2026-10-25
7. 07 [Apache HTTP Server 2.4: mod_dir](https://httpd.apache.org/docs/2.4/mod/mod_dir.html) httpd.apache.org · checked 2026-10-25
8. 08 [Apache HTTP Server 2.4: RewriteRule flags](https://httpd.apache.org/docs/2.4/rewrite/flags.html) httpd.apache.org · checked 2026-10-25
9. 09 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ How do I fix 403 Forbidden in Apache?

Read the error log for the `client denied by server configuration` line and the path it names. Then fix the `Require` rule, `.htaccess` file or rewrite rule that covers that path, run `apachectl configtest`, and reload.

_02_ What is the common cause of a 403 Forbidden error in Apache?

A `Require` rule that denies the client. After an upgrade from Apache 2.2, leftover `Order` and `Allow` directives can do it too: Apache's upgrade notes show mixed old and new directives denying access even when the config looks right.

_03_ Is a 403 error my fault?

As a visitor, only if you were told you need permission or a login. As the site owner, a 403 comes from your access rules, so it is yours to fix.

_04_ Does 403 Forbidden mean I'm blocked?

It can. A `Require ip`, `Require host` or User-Agent rule can deny one client while others get through, so test from another network. Apache's error log shows the denied client address.

## Keep learning

[All errors](/errors)

[Learn 403 Forbidden HTTP status codes](/errors/http/403) [Related 404 Not Found on Apache HTTP status codes](/errors/http/404/apache) [Read next 403 Forbidden in WordPress HTTP status codes](/errors/http/403/wordpress) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 403 errors
[API Gateway 403 Forbidden](/errors/cdn/api-gateway-403-forbidden) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [403 Forbidden](/errors/http/403) [403 Forbidden in Chrome](/errors/http/403/chrome) [403 Forbidden in Django](/errors/http/403/django)

Nearby in errors
[402 Payment Required](/errors/http/402)

More in 403 Forbidden
[403 Forbidden in Apache](/errors/http/403/apache) [403 Forbidden in Chrome](/errors/http/403/chrome) [403 Forbidden in Django](/errors/http/403/django) [403 Forbidden in IIS](/errors/http/403/iis) [403 Forbidden in Laravel](/errors/http/403/laravel) [403 Forbidden in nginx](/errors/http/403/nginx) [403 Forbidden in Spring Boot](/errors/http/403/spring-boot) [403 Forbidden in WordPress](/errors/http/403/wordpress) [403 Forbidden on Cloudflare](/errors/http/403/cloudflare) [403 Forbidden on CloudFront](/errors/http/403/cloudfront)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
