How to protect your WordPress website from bots, scraping and other fraud
Protect your WordPress website from bots/scraping in a few clicks
Why Protect Your WordPress Website from Bots?
Bots can have significant negative impacts on your WordPress website, including:
Content Theft & Data Scraping – Competitors and malicious actors can extract your content, pricing data, and intellectual property.
Account Takeovers & Fraud Prevention – Bots can attempt to take over user accounts by brute-forcing login credentials.
Fake Registrations & Spam – Bots can flood your site with fake accounts, spam comments, and form submissions.
Ad Fraud & Payment Fraud – Automated bots can interact with your ads or payment processes, leading to fraudulent transactions.
Increased Server Load & Performance Issues – A surge in bot traffic can slow down or crash your website.
To combat these threats, implementing Fingerprinting API allows you to uniquely identify visitors, differentiate real users from bots, and prevent fraudulent behavior in real-time.
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 WordPress 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.

To add a tag (or tracking pixel) to all pages of your WordPress website at the end of the <body>
section, you have a few options:
Option 1: Using a Plugin (Easiest & Recommended)
Many plugins allow you to insert scripts into the <head>
, <body>
, or <footer>
sections. The best options are:
Install and activate the Insert Headers and Footers by WPCode plugin.
Go to WPCode → Header & Footer in your WordPress admin panel.
Find the "Body" section.
Paste your tracking pixel or script.
Click Save Changes.
Option 2: Google Tag Manager
If you're using multiple tracking codes (Google Ads, Meta Pixel, etc.), it's best to use Google Tag Manager, however, we recommend implementing it directly on the website.
Install Google Tag Manager for WordPress plugin.
Go to Settings → Google Tag Manager.
Add your GTM ID.
Insert your custom script inside GTM.
Option 3 : Editing the Theme's footer.php
(Manual Method)
If you prefer a manual method:
In your WordPress dashboard, go to Appearance → Theme Editor.
Locate and open the
footer.php
file.Before the closing
</body>
tag, add your tracking pixel or script.
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
Nov 14, 2024
Latest posts
Discover other pieces of writing in our blog