HTTP 403 Forbidden in GitHub Pages
GitHub Pages — free static hosting from a repo.
What triggers it in GitHub Pages
The repo is private and Pages is serving from a branch that requires GitHub Pro/Team.
How to fix it on GitHub Pages
Upgrade the org plan or make the repo public if the content is safe to expose.
Where you'll see it
The GitHub Actions deploy log, the Pages settings tab, or the raw response headers (`x-github-request-id`).
Monitor 403 responses continuously
Lemwatch checks your GitHub Pages endpoints as often as every 5 minutes and alerts the moment a 403 pattern appears — with the full response headers and body captured, so you can debug without waiting for the next customer report.
Same error on other platforms
403 Forbidden in GitHub Pages — FAQs
The repo is private and Pages is serving from a branch that requires GitHub Pro/Team.
Upgrade the org plan or make the repo public if the content is safe to expose.
403 on GitHub Pages is a client-side condition, so it will keep returning until the request or configuration is corrected. Retrying the same request without changes will produce the same 403 response.
Pages returning 403 are not indexed by Google. If a previously-indexed page starts returning 403, Google removes it from search results within days to weeks. A sitewide 403 (often from a hosting suspension or firewall misconfig) deindexes the entire site fast. Google does not distinguish between "intentionally locked" and "accidentally locked" — both look like a content disappearance, which damages rankings. If you need to block access to staging or admin pages, use authentication (401) or robots.txt instead of 403 to avoid this signal. On GitHub Pages specifically, Googlebot sees the same 403 your users see, so unresolved errors get reflected in Search Console's Page indexing report within days.
Set up an HTTP monitor that pings your key GitHub Pages endpoints from multiple regions every 1–5 minutes and alerts on any non-2xx response. Lemwatch does this out of the box — including capturing the full response headers and body when a 403 hits, so you can debug without waiting for the next user report.
Both are client error responses, but they mean different things: 403 Forbidden indicates the server understood the request but refuses to fulfil it — different from 401 in that authentication won't help; you simply don't have permission., while 401 is a distinct condition with its own root cause. On GitHub Pages, the fix path and the log signature are different — check the exact status code your GitHub Pages logs return before applying a fix.