The CookieAsk scanner (CookieAskBot)
This page is for site owners and for the people who run their servers and firewalls. It explains what the CookieAsk scanner is, how to recognise it, how to allow or block it, and how scans behind a login work. The scanner's user agent links here (the SCANNER_POLICY_URL setting points at the published copy of this page).
What the scanner does
The scanner loads a few pages of a site that a CookieAsk customer added to their account, in a real Chromium browser, the way a first-time visitor would. It records which cookies, storage entries and requests appear before and after a choice in the cookie banner, so the site owner can see what their site does. It does not submit forms, buy anything or create accounts. It reads a small number of pages per scan (3 to 100, depending on the plan).
It only scans sites a customer added. If you see it on a site you run and did not add, someone listed your site in their account; you can block it as described below, or contact CookieAsk support.
How to recognise it
User agent. Every request the scanner makes, from the browser and from the plain fetches of robots.txt and sitemaps, carries a desktop Chrome user agent followed by the scanner's own token, version and this page:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 (CookieAskBot/<version>; +<policy URL>)
Match on CookieAskBot/. The Chrome part is there because sites often change what they serve by browser, and the scanner has to see what visitors see.
Published identity. GET /scanner/identity.json on the CookieAsk app answers a public, versioned document:
| Field | Meaning |
|---|---|
version, updated | Raised and dated whenever anything below changes. |
robots_token | CookieAskBot, the name to use in robots.txt. |
user_agent_contains | CookieAskBot/, the part of the user agent to match. |
policy_url | This page. |
egress | The address ranges (CIDR) scans come from. |
reverse_dns_suffix | Every scanner address has a reverse DNS name ending in this suffix. |
The source of this document is content/scanner/identity.json in the CookieAsk repository.
Not published yet. The scanner's own network is not deployed, so today egress is an empty list and reverse_dns_suffix is null. Until both are filled in, do not allow-list by address. The user agent token is the only stable mark. When the network is live, the ranges and the suffix are added, version goes up and this note is removed.
Checking that a visitor really is the scanner
Anyone can copy a user agent. To be sure a request came from CookieAsk, check its source address with a forward-confirmed reverse lookup:
- The address is inside one of the
egressranges. - Its reverse (PTR) name ends with
.followed byreverse_dns_suffix. - Looking that name up again (A or AAAA) gives back the same address.
With standard tools (replace the address and the names with real ones):
$ dig +short -x 203.0.113.7
w7.eu.<reverse_dns_suffix>.
$ dig +short w7.eu.<reverse_dns_suffix> A
203.0.113.7
or host 203.0.113.7 followed by host w7.eu.<reverse_dns_suffix>. If any step fails, the request did not come from the CookieAsk scanner. CookieAsk support runs the same check with manage.py verify_scanner_ip <address>.
robots.txt
By default the scanner follows robots.txt (RFC 9309):
- A group for
CookieAskBotapplies when there is one. Otherwise the*group applies. With neither, everything is allowed. - The longest matching rule wins, and
Allowwins a tie.*and a trailing$work as in the RFC. - No
robots.txt(an answer of 4xx) means everything is allowed. A server error (5xx) or no answer means the scanner fetches nothing from the site in that scan, and so does a redirect forrobots.txtthat cannot be followed to a readable file. User-agent: CookieAskBotandUser-agent: CookieAskBot/1.0both name the scanner; case does not matter.Sitemap:lines are used to find pages.
To keep the scanner out of your site entirely:
User-agent: CookieAskBot
Disallow: /
To keep it out of one part only:
User-agent: CookieAskBot
Disallow: /internal/
If the homepage is closed to the scanner, a scan loads no pages and says so in its notes.
Ignoring robots.txt for your own site
Some sites close pages to all robots that their owner still wants checked. In the dashboard, under Sites → (site) → Advanced settings → Scanner, an owner or admin of the account can choose Ignore robots.txt for this site. This choice is only offered once the site's main domain is verified (on the site's domains page), so it can only ever apply to a site whose owner proved control. If the domain later stops being verified, scans follow robots.txt again until it is verified again. Every change is recorded in the account's activity log.
Scans behind a login
To check pages that only signed-in visitors see (an account area, a checkout), an owner or admin pastes the cookie their browser sends while signed in. CookieAsk never asks for passwords.
- Sign in to your site with a test account, never a real customer's account.
- Open your browser's developer tools, choose any request to your site, and copy the value of its
Cookierequest header. - In Advanced settings → Scanner → Scans behind a login, paste it. Choose the verified host it should be sent to, how many days to use it (1 to 30, 7 by default) and, if you like, a start page such as
/account.
What CookieAsk does with it:
- It is encrypted on the server (AES-256-GCM, with a key the server keeps outside the database) and bound to this one site, so a copy of it cannot be used for another site.
- It is never shown again. The dashboard shows only the host, the cookie names and the date it is used until. It is never written to logs or to the activity log; the activity log records that a cookie was saved or deleted, and its names.
- The scanner sends it only to the host you chose, as a host-only cookie: not to subdomains, other hosts or third parties the page loads.
- It is never used after the number of days you chose. An expired cookie is erased the next time a scan of the site starts or its scanner settings are opened, and Delete the cookie now erases it at once. It is also not used while the host is not verified, and it is erased when the site moves to another organization.
- Signed-in scans never follow links that look like signing out, so the session stays valid. The cookie itself is not reported as a finding about your site, and its value never appears in a scan's evidence.
When your session expires on your site (for example after a password change), paste a fresh cookie.
Login scans need a key on the CookieAsk server (SCAN_LOGIN_KEY_FILE). Without one the dashboard says that login scans are not available yet.
For CookieAsk operators
content/scanner/identity.json: the published identity. Changeegressandreverse_dns_suffixonly together with the network they describe, raiseversionand setupdated. Ranges must be public, and ranges need a suffix.SCANNER_POLICY_URL: the public URL of this page, used in the user agent.SCAN_LOGIN_KEY_FILE: a file in the server's.credentials/folder (mode 600) with one base64 key of 32 bytes per line. The first line encrypts and every line decrypts, so to rotate, put a new key on the first line and keep the old one below it until the stored cookies have expired (30 days at most). Losing the file makes stored cookies unreadable; scans then run signed out and customers paste again.manage.py verify_scanner_ip <address>: the forward-confirmed reverse lookup above.