How to protect your Shopify website from bots and scraping
Protect your shopify website from bots/scraping in a few clicks
The overall principle is to activate your protection with FP-API to identify bots and automatically block or redirect your bot traffic.
Please note that this method does not require our API. Other methods can be used with our API but require a bit of coding on your end. This guide focuses on how to do it without coding in a few clicks.
Step 1 : install fingerprinting API tag on your shopify website
In fingerprinting-api.com app, go to settings, integration. Copy the code.
Paste it on all pages of your website, try to avoid using a tag manager like GTM. If you are not a subscriber, consider using the required plan according to your traffic.

Go to your Shopify Store Admin > Online Store > Themes. Click on the three dots near your current (live) theme.
As we will have to edit your theme files, it is a good idea to start by duplicating your theme so you have a backup. Duplicate your current theme so that you have a backup option to revert back to in case something goes wrong.
After duplicating, click the three dots > Edit Code.
Scroll to the portion of the code where the <body> section ends.
Right before the </body> paste the fingerprinting-api code you copied earlier under in the theme.liquid layout. Save and validate that everything is ok.
Step 2 : create a specific page to redirect bots (optional)
On your CMS, create a page to which all bot traffic will be redirected. Useful if you want to create an audience to prevent ad fraud.
Step 3 : activate bot protection / scraping protection
In the security tab, under Bot, you can do two actions : redirect bot traffic to the page you just created or block the traffic coming from bots.
Redirection will look like this :

Under actions, if you prefer, you can simply block that traffic.
Please note that traffic from bots from recognized source like Google, GPT, Bing, won't be blocked.
Once you have done that the traffic from bots will be handled.
Do the same for Scraping.
In addition, you can also protect your website from VPN traffic/visitors faking their location by selecting VPN protection in the Security tab and following the same process.
If you have some coding experience, you can go further by using our API.

Eric Tremblay
Jan 8, 2025
Latest posts
Discover other pieces of writing in our blog