Skip to content

Works with your stack

Cookie consent behind the Sucuri Firewall

country from the firewall

← Cookie Rocks for your stack

The Sucuri Firewall sits in front of your site and sends the visitor’s country with each request it passes on. Cookie Rocks Pro can use it for rules by country, but only for requests that really come from the firewall.

By Sucuri · sucuri.net

Is this your product? Tell us if anything here is out of date. Write to us

Setting the visitor’s country

Where the country comes from
The Sucuri Firewall sends the visitor’s country in the X-Sucuri-Country header.
In Cookie Rocks
In Cookie Rocks Pro, open Rules by country. Under Where the country comes from, choose Sucuri, then save.
At Sucuri
To keep requests from skipping the firewall, allow only the firewall’s addresses to reach your server. Cookie Rocks ignores the header on any other request anyway.
When in doubt
When a visitor’s country is unknown, they get the strict rules: nothing loads before a yes. Once it works, each visitor gets the rules of their own country.

What matters for consent with Sucuri Firewall

The country in each request

The firewall adds an X-Sucuri-Country header with the visitor’s country. It gives the country only, not the US state.

Trusted only from the firewall

A visitor who reaches your server without going through the firewall could send the same header with any country. Sucuri’s own advice is to read it only once the request is known to come from its firewall. Cookie Rocks Pro uses it only when the request comes from the address ranges Sucuri publishes for its firewall.

Without the signal

When the header is missing, or the request does not come from the firewall, the visitor’s country is unknown and the strict rules apply: nothing loads before a yes.

The firewall cache

Cookie Rocks 2.12.2 or later: nothing to do, Sucuri never caches POST. With an older version, the default cache level keeps answers for 180 minutes, even when they say not to. Add /wp-json/cookie-rocks/v1/geo under Performance > Non-Cache URLs.

Questions

Does the Sucuri Security plugin need consent?

The plugin scans and hardens your site from the admin side. The firewall is separate: it runs in front of your site. Cookie Rocks holds known trackers until consent either way.

What happens after the 30-day trial?

The banner, your visitors’ choices and your proofs of consent keep working. Without a key, most settings lock, updates and support stop. Take a key at any time and everything opens again.

For sites behind Sucuri

The firewall in front, the right rules for each country.

sucuri stays on

Rules by country are part of the complete plugin. Every feature of the complete plugin for 30 days, no card.

  • During the trial: everything, including the full settings and the scans
  • After 30 days without a key: the banner, your visitors’ choices and your proofs of consent keep working
  • What waits for a key: most settings, updates and support

How the trial works, in detail

Cookie Rocks

Get your trial key

Your e-mail and your site. Your key arrives as soon as you confirm your e-mail.

One trial per domain. Local and staging sites never use up your key.

We keep your e-mail address to send your key and help you with it, as explained in our privacy policy. No newsletter, nothing else.