DataDome Magento with Fastly CDN integration detects and protects against bot activity.

This module is dedicated for use with Magento utilizing Fastly CDN.

DataDome works as a preflight to detect bots. A fingerprint is sent and DataDome detects in real-time if the traffic is legitimate or not.

This module leverages Fastly integration into Magento.


Before integrating DataDome bot protection in Magento, you need to:

  • Ask Fastly Support to enable DataDome support for your Fastly service as described here
  • Use Fastly integration version 1.2.127 or higher in Magento
  • Have DataDome server-side key available in your DataDome dashboard
  • Have access to Magento StoreFront Admin Portal
  • Have already set up Fastly as Caching system for your Magento website

How to install and configure

1. Enable Fastly Edge Modules

  1. Connect to your Magento StoreFront Admin Portal
  2. Go to Stores > Configuration > Advanced > System > Full Page Cache > Advanced Configuration
  3. Find Enable Fastly Edge Modules and select Yes then press the Save Config button at the top-right.

After enabling, the Fastly Edge Module sub-menu should appear as seen below:


Click on Manage and then Refresh. Select DataDome Bot Detection integration in the list and click on Save.


2. Configure DataDome integration

  1. Click on the wheel icon

  2. Paste your server-side key inside the Field API Key and click on Upload. The server-side key is found in the DataDome dashboard.


You need to contact Fastly Support to enable advanced features (Pragmas) before enabling this change.

  1. You are now protected by DataDome Bot & Fraud Protection

## Settings

API KeyYour DataDome License keyYes
Exclusion regexThe regex that will be applied to req.url.pathYes(?i)\.(avi|flv|mka|mkv|mov|mp4|mpeg|mpg|mp3|flac|ogg|ogm|opus|wav|webm|webp|bmp|gif|ico|jpeg|jpg|png|svg|svgz|swf|eot|otf|ttf|woff|woff2|css|less|js)$
Connection timeoutHow long to wait for a timeout (in milliseconds)Yes150
First byte timeoutHow long to wait for the first byte (in milliseconds)Yes50
Between bytes timeoutHow long to wait between bytes (in milliseconds)Yes50