Magento
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.
Prerequisites
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.224 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
- Connect to your Magento StoreFront Admin Portal
- Go to Stores > Configuration > Advanced > System > Full Page Cache > Advanced Configuration
- 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
-
Click on the wheel icon
-
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.
- You are now protected by DataDome Bot & Fraud Protection
Settings
Setting | Description | Required | Default |
---|---|---|---|
API Key | Your DataDome License key | Yes | |
Exclusion regex | The regex that will be applied to req.url.path | Yes | (?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 timeout | How long to wait for a timeout (in milliseconds) | Yes | 150 |
First byte timeout | How long to wait for the first byte (in milliseconds) | Yes | 50 |
Between bytes timeout | How long to wait between bytes (in milliseconds) | Yes | 50 |
Enable referrer restoration | Restore original referrer when a challenge is passed. | No | false |
Enable GraphQL support for POST requests | Enable GraphQL extraction of operation name on POST request. | No | false |
Enable Replay protection | Enable prevention of replay attack in case of Early-Data requests. | No | false |
FAQ
How can I get Fastly full VCL to troubleshoot any issue ?
- You can download it by going to :
Stores > Configuration > System > Full Page Cache > Fastly Configuration > Tools > List all versions
- Select the lastest version and click on the "eye" to see it and download it
How can I update Datadome Edge module ?
You can update the Datadome Edge Module when they got updated in a new Fastly Magento module release by following the steps below:
Ensure your installed Fastly Magento module is the most up-to-date version
- Click the Manage button in the Fastly Edge Modules section
- Click Refresh and Save buttons on right-top
- Click the gear button of Datadome's Edge module and re-update it
How can I upgrade the Fastly Magento module
Check if you have the latest version using the extension page here
To upgrade the module, follow the procedure provided by Adobe Upgrade modules and extensions
The command to upgrade Fastly module to the latest version is
composer update vendor/fastly/magento/fastly-magento2
Then the upgrade must be performed and the cache cleaned - following Adobe documentation
bin/magento setup:upgrade --keep-generated
bin/magento setup:static-content:deploy
bin/magento cache:clean
Once the module is upgraded in Magento, it has to be updated in Fastly in the Adobe Store configuration following this section: https://docs.datadome.co/docs/magento-with-fastly-cdn#how-can-i-update-datadome-edge-module-
Updated 1 day ago