Free auditStart free
GuideError · HTTP status codes

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.

3 min
read
9
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
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
  2. Causes specific to Apache and where to fix them
  3. Directory requests and index files
  4. 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 withChatGPTClaudePerplexityGoogleAI Mode
01Check 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. If you run nginx, see 403 Forbidden in 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
03Explained

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.
04How 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 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. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02Apache HTTP Server 2.4: Upgrading to 2.4 from 2.2httpd.apache.org · checked 2026-10-25
  3. 03Apache HTTP Server 2.4: Access Controlhttpd.apache.org · checked 2026-10-25
  4. 04Apache HTTP Server 2.4: Security Tipshttpd.apache.org · checked 2026-10-25
  5. 05Apache HTTP Server 2.4: mod_authz_corehttpd.apache.org · checked 2026-10-25
  6. 06Apache HTTP Server 2.4: core features (AllowOverride, Options)httpd.apache.org · checked 2026-10-25
  7. 07Apache HTTP Server 2.4: mod_dirhttpd.apache.org · checked 2026-10-25
  8. 08Apache HTTP Server 2.4: RewriteRule flagshttpd.apache.org · checked 2026-10-25
  9. 09How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
Questions

Asked a lot.

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

01How 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.

02What 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.

03Is 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.

04Does 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.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane