Using Cloudflare to Thwart Bots

Martin OrtegaI posted previously about recently discovering that some of our Managed Hosting customers running nopCommerce sites were experiencing high traffic with no increase in sales activity. It seemed suspicious, and for those customers using our Advanced Monitoring service, we detected an increase in CPU resource usage and a noticeable slowing down of their sites. As it turns out, the traffic was from bad bots. We contacted our customers, let them know what we saw, and helped them fix the issue.

There are many options to prevent bad bots from affecting your site, but the best and ultimate option to strive for is to prevent the bot from hitting your site in the first place. Here I discuss my preferred method.

My personal preference is to use a CDN called Cloudflare to stop bots. Cloudflare offers an excellent free plan that allows you to block bots by country, IP, or IP Range. They also provide higher-tier paid plans that block more advanced and complex bots from hitting your site.

The way CloudFlare works is pretty interesting since it requires you to change your name servers to CloudFlare name servers. When you do this, the system imports the DNS records you currently use for your domain name. However, in practice, the system doesn’t always import all the records your site requires. This is why it’s important to double-check the records that are to be imported into CloudFlare. Once you know all your current DNS records, you can confirm that all the records from your old DNS provider have been added to CloudFlare.

You can find the CloudFlare name servers listed in your CloudFlare account. You will need to make the DNS update with your domain registrar provider. If you registered a domain through Everleap, you can update the DNS through the Everleap Control Panel. Once the DNS is updated, the traffic going to your site will route through the CloudFlare network first before coming to Everleap servers. All traffic gets routed through CloudFlare and scrubbed before getting to your Everleap hosted site.

If you’re having issues with bots constantly hitting your site, and you’re ready to move beyond using the typical IP block and Request Filtering on IIS, it’s time to prevent those bots from ever getting your site in the first place. If you need guidance on dealing with bots let us know. If you need help setting up a CDN service let us know. Depending on the CDN setup, the work could become out of the scope of what we can provide with our standard technical support but we can provide you with options for getting hands-on technical support.

Learn more about Everleap Managed Hosting services.

No responses yet

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

oui décor