How To Block ASN’s Through CloudFlare
- Enter an IP
- IP Range Country Name, or ASN
Naturally, you may think you should enter ASN123456, but that is incorrect. You simply need to drop the N. The correct format would be AS123456 (then select the block option). The ASN number listed above is an example. Use the numbers related to the ASN you want to block.
However, if you want to block the ASN that was attacking my website, this is AS134928. This ASN belongs to an Indian "web development" company and they were the ones hammering my server with nonsense requests.
I wrote a post a few months ago that goes into more detail on what happens when you get a lot of spam comments and that lists the most common ASN's that you should block.
Note, you need to fully understand the company that you want to block. This is to avoid blocking an internet service provider (ISP) that your users might actually be using.
If you have any questions please feel free to ask me below!
Scott Hartley
Founder & CEO, Sert Media
Founder and CEO of Sert Media, a Nashville-based digital marketing agency. Scott has spent over 15 years helping businesses grow through SEO, web performance optimization, and strategic digital marketing. His deep expertise in WordPress development, site speed, and technical SEO has guided hundreds of brands toward measurable results. When he's not auditing Core Web Vitals or refining campaign strategies, he's writing about the tools, techniques, and trends shaping the modern web.
Related Articles
How to Add Security Headers to WordPress Using Cloudflare Transform Rules
If you've ever run your WordPress site through securityheaders.com and gotten a D or F…
Use This Cloudflare Rule To Reduce Plugin Hack Attempts
Cloudflare Firewall Rules give you a lot of flexibility in further protecting your website. Here…
Set Up Cloudflare's Automatic Platform Optimization Feature
Automatic Platform Optimization (APO) is a new feature from Cloudflare that allows you to cache…