# Bot protection for downloads (Turnstile or reCAPTCHA)

*Collection: Downloads, Leads & Analytics · Category: Downloads · Availability: FileDeck Pro · Canonical URL: https://www.getfiledeck.com/docs/bot-protection-for-downloads/*

A public document library is a scraping target: one script can walk every
download link on the page. FileDeck Pro can put a CAPTCHA check in front of
downloads — the visitor confirms they're human once, then downloads normally
for an hour.

Two services are supported, and you pick one:

- **Cloudflare Turnstile** (the default) is free, sets no advertising cookies,
  and usually verifies without the visitor clicking anything.
- **Google reCAPTCHA v2** — the "I'm not a robot" tickbox — if you already run
  it elsewhere on the site and would rather not add a second vendor.

Whichever you pick covers this gate,
[front-end submission](https://www.getfiledeck.com/docs/front-end-submission/), and the
[client portal](https://www.getfiledeck.com/docs/client-portal/)'s sign-in and password-reset forms: one
choice, not three. The submission and portal forms show the CAPTCHA whenever
keys are saved, even with the download gate switched off.

> **FileDeck Pro** — **Documents → Settings → Downloads → Bot protection**.

## Setting it up

1. Get keys for the service you want:
   - **Turnstile** — create a free widget at **dash.cloudflare.com → Turnstile**.
   - **reCAPTCHA** — register a **v2 ("I'm not a robot")** site at
     **google.com/recaptcha**.
2. Under **Documents → Settings → Submissions**, choose the service under
   **CAPTCHA service** and paste its site key and secret key.
3. Under **Documents → Settings → Downloads**, tick **Require a quick CAPTCHA
   check before the first download of a visit**. Save.

Until both keys for the selected service are saved, the switch has no effect —
the gate does not fail closed on a missing configuration.

Switching service later keeps the keys for the other one, so moving back needs
no re-typing. 
A value that is neither of the two reads as Turnstile rather than as "no
gate". 

## How it behaves

- The first download click opens a small dialog with the check. Passing it
  unlocks downloads for **one hour**; most visitors never see it again.
- **Logged-in users are never challenged** — they already passed a login.
- **Share links you create skip the check**, like every FileDeck gate: a
  [single-use link](https://www.getfiledeck.com/docs/single-use-links/) or a
  [transmittal](https://www.getfiledeck.com/docs/transmittals/) is its own authorisation.
- Multi-select **zip downloads are covered** by the same check.
- The check is enforced on the server, not just in the browser: a script that
  calls the download URL directly is refused until it holds a grant.

## What it does and doesn't stop

Be clear-eyed about the strength of this: it is **friction, not access
control**. The grant that a passed check issues is a cookie bound to nothing —
not your visitor's address, not their browser, not a download count — so one
person solving one challenge can hand that cookie to a script and download for
an hour. What the check buys you is that a scraper must now solve a CAPTCHA to
start at all, which defeats the naive ones and costs the determined ones money.
**If the files themselves matter, restrict them** — pair this with
[access control](https://www.getfiledeck.com/docs/access-control-overview/) rather than relying on it.

Within that limit it does stop *casual scripted bulk downloading through
FileDeck's download routes* and keeps your
[download counts](https://www.getfiledeck.com/docs/download-counts/) honest (search-engine
crawlers are already excluded from counts, with or without this gate). Like
the terms and form gates, it guards the FileDeck download route — a document
with no access restriction still has a directly reachable file URL, so pair
bot protection with an [access restriction](https://www.getfiledeck.com/docs/access-control-overview/)
when the file itself must not be fetchable.

For metering rather than bot-blocking — "each visitor may download N files a
day" — use [download quotas](https://www.getfiledeck.com/docs/download-quotas/); the two work well
together.
