# Cloudflare Turnstile

<figure><img src="/files/E90DWGlPEIhZkZjKN5zf" alt=""><figcaption><p>Cloudflare Turnstile in the Comment Section</p></figcaption></figure>

[Cloudflare Turnstile](https://developers.cloudflare.com/turnstile/) is an alternative to reCAPTCHA 3 and is a non-interactive captcha replacement.

Turnstile can be used even if you do not host your sites with Cloudflare.

It works by sending a "challenge", and if that challenge succeeds, you should be able to complete an action (e.g., submitting a comment).

The challenge is dynamic, so if a particular challenge isn't effective anymore, the Turnstile widget can adapt to a new challenge automatically without having to do anything.

### Comment Edit Pro Turnstile Settings

<figure><img src="/files/jyhH9AqrOGffvMJQFN72" alt=""><figcaption><p>Turnstile Options in the Spam Protection Admin Tab</p></figcaption></figure>

When enabling Turnstile, you can choose to enable it for logged-in users.

You'll also be prompted to retrieve a "Sitekey" and "Secret Key."

[Turnstile's Getting Started section](https://developers.cloudflare.com/turnstile/get-started/) can help you retrieve your sitekey and secret key.

{% embed url="<https://developers.cloudflare.com/turnstile/get-started/>" %}
Instructions on retrieving your sitekey and secret key
{% endembed %}

{% hint style="info" %}
**Test keys**: Test keys are shown in the [Turnstile FAQ Section](https://developers.cloudflare.com/turnstile/frequently-asked-questions/#are-there-sitekeys-and-secret-keys-that-can-be-used-for-testing).
{% endhint %}

### Additional Options

<figure><img src="/files/MPqbciN8E1UkpFfVeRvu" alt=""><figcaption><p>Additional Turnstile Options</p></figcaption></figure>

Additional options allow you to determine:

* The language used (set to Auto for auto-detection)
* The widget appearance (light or dark mode)
* The widget size (compact or normal)

The final option, the Submit button ID, is so we can add Turnstile to the submit button on your comment form. Since every comment form is unique, you'll have to input the ID for the submit button if it's not a standard comment section.

### How Turnstile Works

When a user starts typing into the comment textarea, Turnstile is initiated.

<figure><img src="/files/TR7VzvDnFIHeuYelvNuv" alt=""><figcaption><p>Turnstile on the Frontend</p></figcaption></figure>

A Turnstile widget is shown and if successful, it'll pass a token back.

Comment Edit Pro takes this token and verifies it when the comment is submitted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dlxplugins.com/comment-edit-pro/features-overview/spam-protection/cloudflare-turnstile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
