HTTP Errors

What Is the 403 Status Code? (403 Forbidden)

What Is a 403 Error (Forbidden)? — conceptual illustration
On this page

HTTP 403 Forbidden means the server understood the request but refuses to fulfill it. Unlike 401 (which means "you're not authenticated"), 403 says "we know who you are and the answer is still no." For scrapers, 403 is the canonical anti-bot block — the server has decided this request looks automated and has cut it off before serving the page.

Quick facts

Status code403
Category4xx Client Error
Common causes (scraping)Bot detection, missing/wrong headers, blocked IP, geo restriction
Common causes (general)Insufficient permissions, expired auth, IP allowlist
Typical body"Access Denied", "Forbidden", or a Cloudflare challenge page

Why 403s happen in scraping

On a normal API, a 403 means you authenticated but lack permission. In scraping, 403 almost always means an anti-bot system fired. The trigger could be any of: a known datacenter IP range, a missing or suspicious User-Agent, a TLS fingerprint that doesn't match the User-Agent, a request rate that crossed a threshold, a geo block on your country, or a behavioral signal collected on an earlier page. Cloudflare in particular returns 403 with its branded challenge page as the response body — if you see "Cloudflare" and a ray ID in the HTML, that's the source. The 403 itself is the symptom; the actual decision happened a layer above.

How to diagnose a 403

Open the response body — that's where the truth is. A short "Forbidden" page usually means a simple WAF rule; a Cloudflare/Akamai/DataDome branded page means a managed bot detection service. Check the response headers for `cf-ray`, `x-amzn-waf-action`, `server: AkamaiGHost`, or `x-datadome` to identify the vendor. Then check what you're sending: User-Agent realistic? Accept-Language present? TLS fingerprint matching the browser you're claiming to be? Try the same URL from a residential proxy in the target's primary geo — if that works, the block is IP-level. If it still fails, the block is fingerprint-level.

How to recover from a 403

The fix depends on the cause. IP-level 403s clear with residential or mobile proxy rotation. Header-level 403s clear with realistic headers — copy a real browser's headers from DevTools verbatim. Fingerprint-level 403s require a real-browser stack: Playwright with stealth patches, or a managed scraping API that maintains fingerprint pools. CAPTCHA-redirect 403s require a solver. Geo-403s require a proxy in the right country. Never retry a 403 without changing something — repeat 403s from the same identity reinforce the block.

Related terms

Concept map

How 403 Status Code (403 Forbidden Error) connects

The terms most directly tied to this one. Hover a node to see its neighbours, click to preview, drag to rearrange.

0 terms · 0 connections
You are here · HTTP Errors
Building map…

Frequently asked questions

What's the difference between 401 and 403?

401 Unauthorized means you haven't authenticated — log in and try again. 403 Forbidden means you're authenticated (or no auth is required) but still not allowed. For unauthenticated scraping, 403 is the relevant one.

Does a 403 mean my IP is banned?

Sometimes. The fastest way to check is to send the same request through a different IP. If the second attempt succeeds, the first IP is on a block list. If it still fails, the block is based on something other than the IP.

Can changing User-Agent fix a 403?

It fixes the most naive bot rules but not modern bot detection. Real systems check User-Agent against TLS, header order, JavaScript-derived signals, and behavior. A new UA alone moves the needle a little; aligning UA with everything else moves it a lot.

Is a 403 the same as a Cloudflare block?

Cloudflare blocks usually return 403 with their challenge page in the body, but 403 can come from many sources. Look at the response body and headers to identify which vendor (Cloudflare, Akamai, DataDome, PerimeterX) is doing the blocking.

Last updated: 2026-05-26