Prevent unauthorized websites from embedding your content.
Hotlinking occurs when other websites embed your images, videos, or files directly, using your bandwidth without permission. Hotlink protection blocks these requests based on the referrer header.
When a browser requests a resource, it sends a Referer header indicating where the request came from:
Referer: https://other-site.com/their-page
Hotlink protection checks this header:
Allowed Domains: Domains that CAN embed your content:
yourdomain.com
www.yourdomain.com
subdomain.yourdomain.com
partner-site.com
Block Empty Referrer:
{warning} Blocking empty referrers can break direct links and some browser features.
example.com # Only example.com
www.example.com # Only www.example.com
*.example.com # All subdomains of example.com
Add each domain on a separate line:
yourdomain.com
www.yourdomain.com
partner-site.com
cdn.yourdomain.com
Optionally restrict hotlink protection to specific file types:
jpg, jpeg, png, gif, webp, svg
mp4, webm, mp3, ogg
pdf, doc, docx, xls, xlsx
Leave empty to protect all file types.
Allow your site and search engines to display images:
Allowed domains:
yourdomain.com
*.yourdomain.com
images.google.com
www.google.com
www.bing.com
File types:
jpg, jpeg, png, gif, webp
Only allow your exact domains:
Allowed domains:
www.yourdomain.com
yourdomain.com
Block empty referrer: Enabled
File types: All
Allow specific partners to embed your content:
Allowed domains:
yourdomain.com
partner1.com
partner2.com
affiliates.partner3.com
Simulate a request from another domain:
# Should be blocked
curl -H "Referer: https://bad-site.com/" \
https://your-zone.cdn.nordiccdn.com/image.jpg
# Should be allowed
curl -H "Referer: https://yourdomain.com/" \
https://your-zone.cdn.nordiccdn.com/image.jpg
Determined attackers can fake the referrer header. Hotlink protection stops casual hotlinking, not determined scraping.
These requests have no referrer:
If you enable CORS (Access-Control-Allow-Origin: *), browsers may strip referrers. Ensure your CORS and hotlink settings are compatible.
If your own site is blocked:
Add social media domains if you want previews to work:
facebook.com
www.facebook.com
twitter.com
linkedin.com
pinterest.com
Add search engine domains:
images.google.com
www.google.com
www.bing.com
www.yahoo.com
Begin with a broader allow list and tighten as needed.
Add all variations:
Unless you have a specific reason, allow empty referrers to avoid breaking legitimate use cases.
Check your logs for blocked requests to identify false positives.