Referrer Blocker
The Referrer Blocker lets you block visitors based on the website they came from (the HTTP referrer). This is available on Pro plans only.
What Is a Referrer?
When someone clicks a link to your store from another website, the browser sends the referring website’s URL along with the request. This is called the referrer (or referer). For example, if someone clicks a link on spam-site.com that leads to your store, the referrer is spam-site.com.
Blocking a referrer prevents visitors who arrive from that specific website from accessing your store.
Adding a Referrer Block
- Go to Referrer Blocker from your dashboard.
- Click Add Referrer Block.
- Fill in the modal:
- Domain — The domain to block (e.g.,
spam-site.com). Do not includehttp://,https://, orwww.— these are removed automatically. Required. - Match Type — How the domain should be matched (see below). Default: “Contains.”
- Redirect page — Optional URL to redirect blocked visitors.
- Domain — The domain to block (e.g.,
- Click Save.
Match Types
Contains (Partial Match)
Blocks any referrer that matches the domain or its subdomains.
Example: Blocking example.com with “Contains” will block visitors from:
example.comsub.example.commail.example.com
Exact Match
Blocks only the exact domain specified. Subdomains are not blocked.
Example: Blocking example.com with “Exact” will block visitors from:
example.com
But will not block visitors from:
sub.example.comwww.example.com
Block Empty/Direct Referrers
A separate setting is available above the block list table in the Referrer Settings card:
- Label: “Block empty/direct referrers”
- Help text: “Block visitors who access your site directly (no referrer). This may block legitimate direct visitors.”
When enabled, visitors who access your store without any referrer (e.g., by typing your URL directly, using a bookmark, or from apps that strip referrer data) are blocked.
Warning: Enabling this may block legitimate customers who access your store directly. Use with caution.
This setting is independent of your individual referrer block entries and is saved separately.
Managing Referrer Blocks
Referrer blocks are displayed in a table with the following columns:
| Column | Description |
|---|---|
| Domain | The blocked domain |
| Match Type | Shows “Exact” or “Contains” |
| Status | Toggle switch to enable or disable the block |
| Actions | Edit button to modify the block |
Each block can be individually enabled or disabled. Disabled blocks remain saved but are not enforced on the storefront.
Duplicate Prevention
You cannot add the same domain with the same match type twice. If you try, an error message appears: “This domain is already blocked.”
How It Works on the Storefront
- When a visitor loads your store, Kedra Shield reads the
document.referrervalue from the browser. - Same-origin check: If the referrer is from your own store (internal navigation), it is always allowed. Blocking never applies to visitors navigating within your store.
- Empty referrer check: If the referrer is empty and “Block empty/direct referrers” is enabled, the visitor is blocked.
- Referrer matching: The referrer domain is compared against each enabled entry:
- Contains: Blocks if the referrer domain matches exactly or is a subdomain.
- Exact: Blocks only if the referrer domain matches exactly (case-insensitive).
- If blocked, the visitor sees the block page or is redirected to the configured URL.
- If any error occurs during checking, the visitor is allowed through (fail-open design).
When to Use Referrer Blocking
- Spam referral traffic: Block domains that send fake traffic to your store to inflate your analytics.
- Competitor blocking: Prevent traffic from specific competitor referral links.
- Unwanted affiliate traffic: Block referrals from unauthorized or low-quality affiliate sources.
Pro Plan Requirement
The Referrer Blocker is available exclusively on Pro plans. Free plan users see a warning banner:
“Referrer blocking is available on Basic plan and above. Upgrade to block traffic from specific websites and referrers.”
The Add Referrer Block button is disabled on the Free plan.
Next Steps
- ASN Blocker — Block entire network providers.
- Location Blocker — Block access by country and city.
- How Blocking Works — Understand the overall blocking flow and analytics behavior.