The Referer (often misspelled as “Referrer”) HTTP header tells a server which page the visitor came from. For example, if someone clicks a link to your site from another site, their browser typically includes that site’s URL as the Referer.
Why the Referer Header Matters
The Referer header is an important signal in web analytics, security, and access control. It lets website owners:
- Track where traffic originates
- Analyze user journeys
- Prevent unwanted access to private content
However, because the header is easy to manipulate or fake, it’s also a common vector for abuse.
Types of Dangerous Referer Scenarios
1. Empty Referer
Some bots and suspicious scripts send no Referer header at all. While legitimate cases exist (bookmarks, direct navigation, privacy tools), a completely empty Referer – combined with other anomalies – is a risk factor for unwanted automation.
2. Fake or Spoofed Referer
Attackers often set Referer to values they control (malware domains, phishing pages, or even your own site’s URLs) to bypass security checks or inject spam into analytics and logs.
3. Malformed or Invalid Referer
Requests with syntactically invalid or garbage Referer values (http://
, random strings, IPs with typos, or odd characters) signal automation or attempts to break scripts.
4. Known Dangerous Domains
If Referer matches domains from known malicious sources, spam farms, or previously blacklisted addresses, it’s a clear sign of a threat.
How BotBlocker Filters and Uses Referer
BotBlocker’s Referer analysis includes:
- Blocking requests with empty Referer when combined with other suspicious factors (like empty User-Agent, PTR mismatch or language anomalies)
- Detecting and blocking requests with malformed or nonsensical Referer values
- Identifying traffic with Referer from blacklisted or suspicious domains
- Optionally, challenging requests with referers not matching your whitelist (useful for admin panels
XML‑RPC or API endpoints)
Benefits and Cautions
Filtering on Referer is highly effective against many scraping, brute-force, and spam bots, but:
- Some real users and privacy tools strip Referer for privacy
- Legitimate traffic may have empty Referer for direct visits or bookmarks
- Too strict filtering can block real visitors, so combine this logic with other checks for accuracy
FAQ
Does Referer filtering block search engines or real users?
Not if you use default, balanced settings. False positives are rare when used alongside User-Agent, Accept-Language, and IP analysis.
Can attackers bypass Referer checks?
Skilled attackers can spoof Referer, but most bots either forget to set it or fill it with junk – easy to catch.
How do I enable Referer filtering?
It’s active by default in BotBlocker’s core logic. Advanced tuning is available for stricter use cases.