Referral spam is like an uninvited guest that disrupts your website’s analytics party. It skews your data, makes it difficult to track genuine traffic, and worst of all, can affect your decision-making if not handled promptly. Fortunately, there are effective ways to deal with this pesky issue. In this guide, we’ll dive into what referral spam is, why it’s harmful, and most importantly, how to get rid of it to keep your analytics clean and trustworthy.
What Is Referral Spam?
Referral spam happens when bots or fake users visit your website, creating false traffic data in your Google Analytics or other tracking tools. These visits aren’t from real users—they’re from spammy websites attempting to trick you into visiting their domain or advertising their service.
Referral spam can appear as a sudden influx of traffic from suspicious sources. When you check your referral list, you’ll notice URLs that seem out of place—websites you’ve never heard of, some offering dubious services or products. While these visits don’t usually harm your website directly, they disrupt your understanding of genuine user behavior.
Why Is Referral Spam a Problem?
Skewed Data: Referral spam increases your traffic numbers with fake visits, which makes it hard to get accurate insights into how well your website is performing.
Misleading Metrics: It affects key metrics like bounce rate and session duration. Since bots don’t behave like real users, your analytics data becomes unreliable, making it tough to assess what content works.
Wasted Resources: You might end up focusing on traffic from sources that don’t bring any value, wasting time on non-existent users.
Potential SEO Impact: In some cases, search engines may see spammy referral traffic as a sign of poor-quality engagement, which could impact your rankings.
How to Identify Referral Spam
Before tackling referral spam, it’s important to confirm its presence. You can identify referral spam by looking at your analytics for any suspicious traffic spikes. Common signs include:
A very high bounce rate (100%)
Average session duration of 0 seconds
Referrals from strange, unrelated websites (like “free-share-buttons” or “cheap-online-courses”)
To spot this, head to the “Acquisition” section of Google Analytics and check the “Referrals” report under “All Traffic.”
How to Remove Referral Spam
Using Google Analytics Filters One of the most effective ways to remove referral spam is by creating filters in Google Analytics. Here’s how:
- Go to Admin > View Settings
- Click on “Filters”
- Create a new filter
- Set Filter Type to “Custom”
- Select “Exclude” and choose “Campaign Source”
- Enter the spammy domains (like “buttons-for-website” or “semalt”)
- Save your filter
Blocking Referral Spam with Hostname Filters Most legitimate traffic will come through your actual domain, so you can filter out traffic that doesn’t use your hostname:
Go to Admin > Filters
Add a filter with the name “Valid Hostname”
Set the Filter Type to “Custom”
Select “Include” and choose “Hostname”
Enter your domain and any subdomains (for example, yourwebsite.com|sub.yourwebsite.com
)
Save your filter
Use the Referral Exclusion List Google Analytics allows you to block referral traffic from specific domains:
Go to Admin > Tracking Info > Referral Exclusion List
Add the referral spam domains here (e.g., darodar.com)
Save your settings
Server-Side Solutions: Blocking Spam via .htaccess If you have access to your website’s backend, you can block spam at the server level using your .htaccess
file:
Access your website’s root directory
Open or create a .htaccess
file
Add the following code:
RewriteEngine On
# Block referral spam
RewriteCond %{HTTP_REFERER} buttons-for-website.com [NC,OR]
RewriteCond %{HTTP_REFERER} darodar.com [NC]
RewriteRule .* - [F]
This will block spam traffic from ever reaching your site.
Third-Party Tools If managing filters and server settings seems too technical, several third-party tools, like Sucuri or Cloudflare, offer built-in solutions to automatically block referral spam.
Monitoring and Maintaining Clean Data
After implementing these strategies, it’s important to monitor your analytics to ensure the referral spam doesn’t creep back in. Set reminders to review your referral traffic weekly or monthly, depending on your website’s activity. Also, keep your filters and exclusion lists updated with any new suspicious sources.
Conclusion
Referral spam may be frustrating, but it’s not undefeatable. By setting up filters, using hostnames, and even blocking spam at the server level, you can maintain the accuracy of your website’s data. Clean analytics empower you to make better decisions, helping your business grow based on genuine insights—not skewed metrics. So next time you spot an unwelcome guest in your traffic reports, you’ll know exactly how to kick them out!