403 Forbidden Error Through a Proxy

The request was understood, but access was denied. The refusal may come from the site or from the proxy itself - these cases are fixed differently.

Updated · Prokso editorial team

Key takeaways
  • Code 403 means access denied: either the site or the proxy itself can send it
  • Most often the site does not accept requests from this address or its subnet
  • Read the full response: a reason name after the code means the proxy answered

What the error means

The 403 code means “access forbidden”. Unlike 407, proxy authentication has passed: the question is where and how you are sending the request.

First find out who answered. If the code comes with a name in capital letters - 403 PORT_BLOCKED, 403 SITE_PERMANENTLY_BLOCKED or 403 HOST_BLOCKED - the proxy answered. If there is no name, it is the site's own response.

Who returns the error: 407 comes from the proxy, 401 and 403 from the website itselfYour appProxygw.prokso.comWebsite407 - the proxy answers: username, password or traffic left401 / 403 - the website answers: site login or access
Who returns the error: 407 comes from the proxy, 401 and 403 from the website itself

Causes

  • The site does not accept requests from this address. The site restricted the address or a whole subnet: too many requests, an unsuitable country, a suspicious set of headers.
  • The site is closed to all customers of the service. SITE_PERMANENTLY_BLOCKED: government resources, banks, payment systems and similar categories.
  • A closed port. PORT_BLOCKED: for example, mail ports. You cannot send email through the proxy.
  • You blocked the site yourself. HOST_BLOCKED: the domain is on the “Blocked sites” list in the plan settings.
  • The request does not look like a browser request. An empty or unusual User-Agent or missing standard headers is a common reason for a refusal by the site.

How to fix it

  1. Look at the full response text: is there a reason name after the code?
  2. If the proxy answered, check the blocked sites page. Restrictions by category and port cannot be lifted; your own block list is edited in the plan settings.
  3. If the site answered, lower the request rate and add pauses.
  4. Change the address: turn on rotation or choose a sticky IP from another country that suits this site.
  5. Check the request headers in your program: the User-Agent, language and cookies should look like those of a regular browser.
  6. Follow the rules of the site you work with: some resources explicitly forbid automated requests.

How to check that it works

Open the same URL in a browser with the proxy and without it. If the site opens without the proxy but not through it, the cause is the address or the country; change them and try again. You can see which address and country the site sees on the My IP page.

Two-minute diagnosis

First paste the line into the proxy checker. If the proxy works there, the cause is in your app or its settings. If not, test the line from a terminal:

curl -v -x "http://USERNAME:PASSWORD@gw.prokso.com:823" https://api.ipify.org
  • A < HTTP/1.1 407 line right after CONNECT means the proxy answered. The name after the code, for example NO_USER, points to the cause.
  • The proxy answered CONNECT with 200 and then another code arrived - the proxy works, and that answer came from the website.
  • No answer at all, only a timeout - the connection never reached the proxy: check the host, port and network.

Setup guides where this error comes up

Proxy not working? Check it in 6 steps

FAQ

Will I get my money back if the site returns 403?

Such requests use almost no traffic: a refusal response takes just a few kilobytes. The refund terms are described on the refund policy page.

Will changing the proxy type help?

Sometimes. Sites treat addresses of datacenters, home ISPs and mobile carriers differently. We do not promise that a particular site will accept an address, but it makes sense to try another type on a small volume.

Why does the site open in a browser but return 403 in a script?

The script sends a different set of headers and does not store cookies. The site sees the difference and refuses. Compare the request headers of the browser and the script.

How do I tell who returned the 403: the proxy or the site?

Look at what follows the code. 403 HOST_BLOCKED, 403 SITE_PERMANENTLY_BLOCKED and 403 PORT_BLOCKED are responses from the Prokso gateway. A plain 403 without such a name, often with a page styled by the site, was sent by the site itself. For https sites the browser does not show the proxy response, so check with curl -v - step 4 of the proxy check.

Why do I get 403 on one site only?

If the site sent it, the site limits access by its own rules: country, network type, request rate or how the request looks. Other sites are not affected. If the gateway answered with HOST_BLOCKED, check the blocked sites list in your plan settings: you may have added the domain there yourself.

Does 403 mean my IP is blocked for good?

No, a 403 does not say how long the restriction lasts. A site may refuse one address, a subnet or a country, or it may react to the request headers. On ports 823 and 824 every request goes out from a new IP, and a sticky IP can be changed by taking another port from 10000-20000. If 403 comes from any address, change the request rate and how requests look rather than the IP, and follow the site's rules.

Residential $1.59, mobile $2.50, datacenter $0.65 per GB

Sign up in a minute, get access right after payment.

Create account

Install the Prokso app