> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.dorik.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Integrating CloudFlare Turnstile

# Getting Started

This article will guide you in integrating [Cloudflare Turnstile](https://www.cloudflare.com/application-services/products/turnstile/) into your Dorik website. Sometimes, you may face issues with many bot traffic visiting your website, and Cloudflare Turnstile can help you filter them. 

# Adding Cloudflare Turnstile

Follow these steps to integrate cloudflare turnstile into your website.

1. Create a [CloudFlare Turnstile](https://www.cloudflare.com/application-services/products/turnstile/) account or Sign in to your existing account.

![Create Clouflare account](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_azsi9s.png)




2. Click on the **Add Widget** button, to add your website.

![Add widget](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_wc0lnf.png)


3. Add a **name** for your widget and add your **domain hostname**.


![Add hostname](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_1dq9ht2.png)

4. Set the widget mode to `Invisible`


![Widget mode](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_142p8qj.png)




5. Now click the `Create` button.

![Create widget](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_1i27mam.png)




6. Once you have created the widget, you should get a **Site key** and **Secret key**. 

**Note:** Don't Share the Secret key with anyone.




![Site key and Secret key](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_10zhm5i.png)


7. Now **copy** the following code:

```
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
```



8. Go to your Dorik website **Site settings** and **Header Code** and paste the script.


![Site settings](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_1ev59rj.png)


9. After that add a [custom code element](https://help.dorik.com/en/article/add-custom-code-19siwk8/) anywhere on your website.


![Custom code](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_16g8z0u.png)

10. Now **copy** the following code:

```
<div
  class="cf-turnstile"
  data-sitekey="YOUR_SITE_KEY"
  data-callback="javascriptCallback"
></div>
```


11. Then paste it inside the custom code => **HTML** block and replace the **data-sitekey"YOUR_SITE_KEY"** value with your own Site key.

![Cloudflare turnstile code](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_1xigttp.png)

12. Now **Save** and **Republish** your website.


![Save and Republish](https://storage.crisp.chat/users/helpdesk/website/-/c/f/1/f/cf1fc9cc00911000/image_1j1oe1k.png)

Congratulations 🎉 You have successfully integrated **Cloudflare Turnstile** into your Dorik website 😊



### Related Articles:
[Adding custom code](https://help.dorik.com/en/article/add-custom-code-19siwk8/)
