Help for owners
Visitors get a 403 Forbidden error instead of my website
Short answer
When your website shows 403 Forbidden, the server received the request and refused to serve it. The usual reasons are access rules that block some visitors, a missing home page file, or files the web server is not allowed to read. Logging in again does not help, because the refusal comes from the server's rules.
Does this sound like your situation?
- The home page shows 403 Forbidden but some inner pages still open.
- The 403 began once the site was copied over to another server.
- Customers in one country or office see the error and I do not.
- Uploaded images and PDFs return 403 while pages load.
- A security plugin or firewall was switched on shortly before it began.
Why does this happen?
The server understood and said no
MDN defines 403 Forbidden as the server understanding the request but refusing to process it. Unlike a 401 error, authenticating or authenticating again makes no difference, so the cause sits in the site's permissions or rules.
Confirmed by developer.mozilla.org
An access rule blocks the visitor
Web servers can allow or deny visitors by address, host name or other conditions. Apache's access control guide shows rules that keep a given IP address or domain from seeing content, and its rewrite rules can send a 403 Forbidden response on purpose. Security plugins and firewalls write rules like these, sometimes broader than intended.
Confirmed by httpd.apache.org
No home page file where the server looks
When someone asks for a folder, the server looks for an index file such as index.html or index.php. If none is there and folder listings are switched off, nginx and Apache answer with 403. A move that missed a file or changed the web root often causes this.
Technical detail: nginx returns 403 and logs directory index is forbidden
File or folder permissions are wrong
After a migration or a manual upload, files can end up owned by the wrong user or readable only by their owner. The web server then refuses them, which is why images or downloads fail while other pages work.
Technical detail: Apache returns 403 Forbidden for a new VirtualHost
What can I do about it today?
- Note who sees it and whereCheck from your phone on mobile data and ask someone in another place. A 403 for some people only points at an access rule, while a 403 for everyone points at files or configuration.
- List the pages that failWrite down whether the home page, all pages or only uploads return 403. Copy the full address of each failing link.
- Think back to the last changeA host move, a new plugin, a firewall setting, an SSL change or a file upload just before the error are the likeliest triggers. Tell your developer or host the date.
- Ask the host for the error logHosting support can read the server error log for the failing address. That log line usually names the exact reason in one sentence.
- Do not loosen permissions to the maximumSetting every file to be writable by anyone can hide the error while opening the site to attack. Leave permission changes to someone who checks each one.
When should I bring someone in?
- The whole site is down for customers and the host's answer did not fix it.
- Only some countries, offices or networks are blocked and you cannot see which rule does it.
- You run your own server with nginx or Apache and nobody on staff manages it.
How do I handle it?
- Reproduce from several networksI request the failing pages from different locations and read the response headers to see whether the 403 comes from the server, a firewall or a CDN in front.
- Read the logsThe server's error log and access log for that request show which rule or file caused the refusal.
- Fix the narrow causeI correct the single rule, index setting or file permission at fault, and leave every other protection in place.
- Recheck the whole siteHome, inner pages, forms, uploads and admin are checked from outside after the fix, and the change is written down for your records.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
What does 403 Forbidden mean on my website?
The server received the request and refused to serve it. MDN notes that logging in again makes no difference with a 403, unlike a 401 error.
Why do only some visitors get 403 Forbidden on my site?
An access rule is probably matching them, for example by IP address, country or browser. Firewalls and security plugins create such rules.
Can a 403 error hurt my site in Google?
Pages that answer 403 cannot be read by visitors or crawlers. Fixing it quickly limits the time those pages are unreachable.
Why do my images return 403 but pages load?
The image folder often has different permissions or rules from the pages, especially after uploads or a server move.
Sources
For your developer: the technical fixes
Related help
- Website Slow or Down When Traffic SpikesBuying a bigger server helps only if that part is the limit.
- I updated my website but visitors still see the old versionA CDN keeps copies of files at its edge until they expire or are purged, so a change at your server may not show for a while.
- My WordPress site sends visitors to casino or spam websitesA site that sends some visitors to spam pages has almost certainly been compromised.
- iPhone visitors never get my website's push notificationsWhen website push notifications are not working on iPhone, the site is usually being used in a Safari tab.
Read next
- CodeIgniter 3 shows 'The action you have requested is not allowed.'Fix: The action you have requested is not allowed.
- Graph Access is denied. Check credentials: missing app roleFix: {"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and tr
- Apache 403 With %3F in the URL: UnsafeAllow3F FixFix: a request like /page%3Fname=test is refused while /page?name=test works