Protecting your website from bots and DDoS attacks with Cloudflare

from PLN 499

VulCode, a software house from Cracow, Poland, sets up protection against bots and attacks from PLN 499 (about EUR 112), one-off. We put Cloudflare in front of your site: proxied DNS, WAF, custom rules and rate limits, login and form protection with Turnstile, and country or network (ASN) blocking where it makes sense. We hide the server's address, and after the rollout we check that Google and real customers get through without trouble.

What we protect against

A site does not have to be a target to be attacked. Bots work through every address they find: guessing passwords, spamming forms and probing for known holes.

These bots do not pick their victims. They try the same paths, such as the WordPress login, on every site they come across. You see the effects in the server logs, in an inbox flooded with form spam, and in a slower site when the server is busy with bots instead of customers.

An application-layer DDoS attack works the same way, only bigger. The heaviest addresses, such as search or the cart, bypass the cache, so every request hits PHP and the database, and the server stops responding long before its bandwidth runs out.

Cloudflare sits between visitors and your server and stops that traffic before it arrives. On its own, though, it guarantees nothing: set up badly, it lets bots through or blocks customers and Google, and a known server address lets attackers go around it. That is why the rollout is configuration and testing, not just a DNS switch.

An account in your name
We set up or configure Cloudflare on your own account.
The free plan first
We suggest a paid plan only when the free one is not enough.
Checked after rollout
Google, payments and forms get through.

A request's path after the rollout

Every request passes through a series of filters. Only what clears them all reaches your server.

  1. Visitor or bot a request for your domain request
  2. Proxied DNS answers with a Cloudflare address, not your server's HTTP traffic
  3. DDoS protection on every Cloudflare plan attack-free traffic
  4. WAF and rules managed rules, custom rules and rate limits allowed requests
  5. Turnstile on login and forms token verified on the server
  6. Your server accepts traffic only through Cloudflare
When it works
Customers and Googlebot get the site as before, and static files can be served from Cloudflare's cache.
When it fails
A bot gets a block or a challenge, and the event lands in the Cloudflare log we review during testing.

Cloudflare's free plan versus paid plans

For a company website we start on the free plan. This is how, according to Cloudflare's documentation, the plans differ in what we set up.

FreeProBusiness
Unmetered DDoS protection on layers 3-7, HTTP included YesYesYes
Managed WAF rules Free Managed Rulesetplus the Cloudflare Managed Ruleset and OWASP Core Rulesetas on Pro
Custom rules 520100
Regular expressions in rules NoNoYes
Rate limiting rules 1, counted per IP, 10-second window2, window up to 1 minute5, window up to 10 minutes
Bot protection Bot Fight Mode, which WAF rules cannot skipSuper Bot Fight Mode with rule-based exceptionsas on Pro
Country and ASN conditions in rules YesYesYes
Turnstile, up to 20 widgets per account YesYesYes

You pay for a paid plan directly to Cloudflare, on your own account. We suggest one when the free plan falls short: when an API, webhooks or a mobile app need exceptions from bot protection, when you need the full managed rulesets, or when one rate limiting rule is not enough.

04

What the rollout configures

The scope of the rollout from PLN 499 (about EUR 112). Every item is set up for your site, not copied from a template.

  1. 01

    Rollout

    Proxied DNS

    We move the DNS zone to Cloudflare, copy every record and switch on the proxy for the site's records. Only A, AAAA and CNAME records can be proxied, so email and TXT records keep working as before.

  2. 02

    Encryption all the way to the server

    We set Full (strict) mode: the connection from Cloudflare to your server is encrypted and the server's certificate is validated.

  3. 03

    Managed WAF rules

    We switch on the Cloudflare rulesets your plan includes, which stop known attack patterns.

  4. 04

    Custom rules

    We block paths no customer ever visits: requests for config files and backups, and on WordPress xmlrpc.php when you use neither Jetpack nor the WordPress mobile app.

  5. 05

    Rate limiting

    We put a limit on the login address or another path bots hammer, with verified bots such as Googlebot excluded.

  6. 06

    Login and form protection

    We add Cloudflare Turnstile to login, registration and forms, and verify the token on the server, because the widget in the browser alone protects nothing.

  7. 07

    Bot protection

    We switch on Bot Fight Mode or, on a paid plan, Super Bot Fight Mode with exceptions for APIs, payment webhooks and the mobile app. When Bot Fight Mode on the free plan could stop your integrations, we leave it off and tell you why.

  8. 08

    Country or ASN blocking

    Only when traffic from a country or network is in practice all bots and your customers do not come from there. A challenge is often enough instead of a block.

  9. 09

    A hidden server address

    The server accepts HTTP traffic only from Cloudflare, so nobody can bypass the protection by connecting to it directly. The table below has the details.

How a server address leaks, and what we do about it

The proxy hides your server's address only if nothing else gives it away. Cloudflare's documentation lists these sources.

SourceWhy it gives the address awayWhat we do
Records without the proxya subdomain, say for FTP or a panel, points at the same server and answers with its real addresswe proxy whatever can be proxied, and check the rest do not point at the site's server
Email on the same serverMX records cannot be proxied, and bounced emails reveal the mail server's addresswhere possible we separate email from the web server, for example onto business email
SPF and TXT recordsthey may contain the server's IP address written out in fullwe review them and propose a change when they expose the web server
DNS historyold records are archived publicly, so the old address stays known after the proxy goes onwhen the host allows it, we change the server's IP address after the rollout
A server that answers anyoneanyone who knows the address can connect around Cloudflarethe firewall lets HTTP in only from Cloudflare's addresses, and on a server where we control the configuration we add Authenticated Origin Pulls or Cloudflare Tunnel

On shared hosting not every step is possible, because the firewall and server configuration belong to the provider. We then tell you plainly what can and cannot be done.

Country and network blocking: when it makes sense

Blocking a whole country is a blunt tool. We reach for it only when your own traffic data justifies it.

It makes sense

  • You sell only in Poland, and login attempts and spam come from countries you have no customers in.
  • The attack comes from a few hosting networks (ASNs) people do not browse from.
  • It is about the admin panel only your team uses.

We block or challenge, but only on the chosen paths or for the chosen countries and networks.

It makes no sense

  • You have customers or partners abroad.
  • The block would cover the US. Google says Googlebot's default IP addresses appear to be US-based, so such a rule cuts the site off from search.
  • Payments and integrations may connect from servers abroad.

Rate limits and Turnstile stay, and they do not care about country.

A challenge instead of a block

  • Traffic from a country looks suspicious, but real customers do turn up.
  • The rule covers only login or forms, not the whole site.

A real browser passes the challenge, a simple bot does not. Customers keep access, and Google reads the site unhindered.

How we would do it: a store flooded with login attempts

A sample rollout on a typical store.

Example

Site
a WooCommerce store on shared hosting
Symptoms
slow evenings, failed logins in the logs, spam from the contact form
Cloudflare plan
free
  1. 1

    Diagnosis in the logs

    The server logs show requests to wp-login.php and xmlrpc.php from many hosting-network addresses. We also list what must get through: payment gateway webhooks, the wholesaler integration and Googlebot.

  2. 2

    DNS and the server address

    We move the DNS zone to Cloudflare, switch on the proxy and check that email and TXT records do not expose the server's address.

  3. 3

    Rules

    We block xmlrpc.php, since the store does not use Jetpack, and put the free plan's single rate limiting rule on wp-login.php, with verified bots excluded.

  4. 4

    Turnstile

    We add Turnstile to login, registration and the contact form, with the token verified on the server.

  5. 5

    No Bot Fight Mode

    Bot Fight Mode on the free plan cannot be skipped with WAF rules, and Cloudflare warns it may challenge API traffic, so it could block payment webhooks. We leave it off and explain when moving to Pro would pay off, since Super Bot Fight Mode there takes exceptions through rules.

  6. 6

    Testing

    A test order with payment, a live URL test in Search Console and a review of Cloudflare events after a few days of traffic.

We measure the effect in the server logs: how many login requests reach the server before and after the rollout.

How the rollout goes

From the list of what must get through to a description of every rule.

  1. 1

    Review

    We check who and what connects to the site: payments, integrations, APIs, a mobile app and Googlebot. Every one of them has to get through the protection.

    a list of what must get through

  2. 2

    Server logs

    In the server logs we check which paths the bots hit, for example the login or a form, and which networks the traffic comes from.

    paths to protect

  3. 3

    Account and DNS

    We set up or configure a Cloudflare account in your company's name, copy the DNS records and change the nameservers at your domain registrar.

    the DNS zone on Cloudflare

  4. 4

    Encryption

    We set Full (strict) mode: the connection from Cloudflare to the server is encrypted and the server's certificate is checked.

    encryption all the way to the server

  5. 5

    Rules

    We set up the WAF, custom rules and rate limits. New rules start as a challenge, and we switch on blocking after reviewing the events.

    protection switched on

  6. 6

    Login and forms

    We add Turnstile to the login, sign-up and forms, and verify the token on the server.

    protected forms

  7. 7

    Server address

    We check unproxied records, mail and TXT records, and the firewall lets HTTP traffic in only from Cloudflare, as far as the hosting allows.

    a hidden server address

  8. 8

    Testing

    A test order, the forms, logging in from a phone and a computer, a live URL test in Search Console and a review of events: making sure neither Google nor real customers are among those blocked.

    a test report

  9. 9

    Handover

    You get a description of every rule: what it does and why we set it. The account stays in your company's name.

    rule descriptions and access

What website protection costs

The rollout is a one-off and costs from PLN 499.

The rollout costs from PLN 499 (about EUR 112), one-off. The starting price covers one domain on Cloudflare's free plan with login and form protection. The figure for your site comes in a free quote. The first list below is what the rollout covers, the second lists work and costs outside it.

  1. Integrations and APIs

    Every integration, webhook and mobile app is an exception to set up and test, so the protection does not stop it.

  2. Hiding the server address

    Separating email, changing the IP address or setting up Cloudflare Tunnel is extra work on the server side.

  3. Forms and login

    Turnstile has to be wired into every form and into the code that checks the token on the server.

  4. Number of domains

    Every domain means its own DNS zone and its own set of rules.

  5. A paid plan

    Pro or Business offers more rules and settings, so configuration takes longer.

Included in the price:

  • a Cloudflare account in your company's name
  • a DNS zone with the site proxied
  • the WAF and custom rules
  • rate limiting on login or another path
  • Turnstile on login and forms
  • hiding the server address as far as the host allows
  • checking Google, payments and forms after the rollout
  • a description of every rule

Not included, quoted separately:

  • the fee for a paid Cloudflare plan
  • repairing a site that is already hacked
  • fixing holes in the site's code
  • ongoing supervision of rules and events
  • protecting services other than the website, such as email or game servers

Questions about bot and attack protection

How much does bot and attack protection for a website cost?
Setting up website protection in Cloudflare costs from PLN 499 (about EUR 112), one-off. The price goes up mainly with integrations and APIs that need exceptions, hiding the server address, the number of forms to wire Turnstile into and the number of domains. A paid Cloudflare plan, if you need one, you pay directly to Cloudflare. Starting prices for all services are on our pricing page.
How long does it take?
Usually 2 days. The exact dated schedule comes with the free quote, and if anything is going to move, you know in advance.
Who can set up Cloudflare for my website?
VulCode, a software house from Cracow, Poland. We set up protection against bots and attacks in Cloudflare from PLN 499 (about EUR 112), one-off: proxied DNS, WAF, rules and rate limits, Turnstile on login and forms, and country or network blocking where it makes sense. After the rollout we check that Google and your customers get through without trouble. The quote is free and comes back within an hour.
Is Cloudflare's free plan enough?
For a company website with no API or mobile app, usually yes. The free plan has unmetered DDoS protection, a basic managed WAF ruleset, 5 custom rules, one rate limiting rule and Bot Fight Mode, and Turnstile is free whatever the plan. We suggest a paid plan when you need exceptions from bot protection, the full managed rulesets or more rate limits.
Won't Cloudflare block Google?
It can, if it is set up badly, which is why we check after every rollout. Rate limits exclude verified bots, we never block the US, where Google says Googlebot's default addresses appear to be, and after the rollout we run a live URL test in Search Console and review the Cloudflare events. Google warns that URLs returning a 4xx error are dropped from the index, so a blocked Googlebot is no small matter.
Will customers see a captcha?
Usually not. Turnstile checks the browser in the background and, according to Cloudflare, sets no puzzles, though with suspicious traffic it may show a checkbox. We put challenges and blocks only where they are needed, such as the login, not across the whole site.
Do I have to change hosting?
No. Cloudflare runs in front of your current server, and the only thing that changes is who serves the domain's DNS. On shared hosting some steps, such as a firewall that admits only Cloudflare, depend on the provider, so we tell you what can be done. If you want full control over the server, we can move the site to VulCode hosting.
Will Cloudflare stop my site being hacked?
It lowers the risk but does not remove a hole in the code. The WAF stops known attack patterns, and rate limits and Turnstile make password guessing harder, but an outdated plugin with a hole is still a hole. That is why we pair protection with the updates in WordPress care or with a security audit that looks for holes in the application itself.
Will you protect my site from DDoS attacks?
Yes. Cloudflare includes unmetered DDoS protection on every plan, the free one too, HTTP-level attacks included. Our job is to make sure nobody can go around it: we hide the server's address and put rate limits on the heaviest addresses. The protection covers the website, not other services on the same server, such as email or a game server.

Sources

The Cloudflare and Google documentation this page relies on.

Describe your project.

A free quote comes back within an hour during working hours.