Proxies have many practical purposes, however, they are often used as a vector for abuse. Many websites block or restrict access to users connecting from proxies in order to reduce things like fraud or spam. Whatever the case may be, it is very important to consider the methodology, methods, and implementation for blocking proxies from your website.


Block Proxies with Blocked

Detecting Proxies

Before a proxy can be blocked, it must be detected somehow. This can be done in various ways ranging from the extremely rudimentary to the overly complicated. Some methods can even be used in conjunction with each other but just like everything else, proxies come in many shapes and sizes and switching between various detection methods can lead to false positives. This also leads to slower user experience and still requires a lot of leg work by the webmaster.

One efficient way to stay on top of all the various proxies that are created each day is through the use of blacklists. Many blacklists are available online but the important thing about using a blacklist is knowing and trusting the source of the data.

Blocked is a popular choice because it offers a fair mix of detection technologies with extensive proprietary blacklists. Blocked maintains up-to-date blacklist of proxies, VPNs, Tor exit nodes, and others which are incorporated into the software in an encoded format. Blocked blacklist data is automatically updated at least once per day and because the software contains the blacklists, no external queries are required, enabling checks to be performed faster. Unlike other proxy blocking services, the Blocked software is a one time purchase. Updates are free and there are no recurring monthly costs or confusing "per query" pricing.

Blocking Proxies

Implementing the correct solution to block proxies is the other piece of the puzzle. Effectively using any blacklist data or code is just as important as the data itself. There are also many ways to implement blocking of IPs within a website, depending on the software powering it. The most common way is through the use of an .htaccess file, where the webmaster could enter known IPs of proxy servers. The problem is then finding a way to keep this data updated without creating an .htaccess file that contains an endless list of IPs. What if an IP that was a proxy in the past is no longer a proxy?

Another aspect to consider is reporting and logging of blocked traffic. Knowing who was blocked, when, and why is helpful in determining the right approach.

Every website is different and the way in which blocked traffic is handled is something to consider. If blocking proxy traffic is not an option, another solution may be to redirect blocked users to an alternate page or show them an error message.


The best all-in-one solution for detecting and blocking proxies is Blocked. Blocked combines a powerful firewall software with regularly updated blacklists. Although written in PHP, Blocked includes a powerful API that is built into the software. In this way, an installation can be queried locally for use within external systems.