Exempt partners from Hotlink Protection

Last updated Apr 16, 2026 When enabled, Cloudflare Hotlink Protection blocks all HTTP referrers that are not part of your domain or zone. That presents a problem if you allow partners to use inline links to your assets.

Allow requests from partners using custom rules

You can use custom rules to protect against hotlinking while allowing inline links from your partners. In this case, you will need to disable Hotlink Protection so that partner referrals are not blocked by that feature.

This example custom rule uses the http.referer field to target HTTP referrals from partner sites.

The not operator matches HTTP referrals that are not from partner sites, and the action blocks them:

  • When incoming requests match:

Use the expression editor:
not (http.referer contains "example.com" or http.referer eq "www.example.net" or http.referer eq "www.cloudflare.com") - Then take action: Block

Allow requests from partners using Configuration Rules

Alternatively, you can create a configuration rule to exclude HTTP referrals from partner sites from Hotlink Protection. In this case, you would keep the Hotlink Protection feature enabled.

Was this helpful?

YesNo

On this page

Exempt partners from Hotlink Protection - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/custom-rules/use-cases/exempt-partners-hotlink-protection/#page","headline":"Exempt partners from Hotlink Protection","description":"Exempt partners from Hotlink Protection using custom rules.","url":"https://developers.cloudflare.com/waf/custom-rules/use-cases/exempt-partners-hotlink-protection/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/custom-rules/use-cases/exempt-partners-hotlink-protection/og.png?v=5bf9638b7fb82b74","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Require a specific cookie value in incoming requests. title: Require a specific cookie image: https://developers.cloudflare.com/waf/custom-rules/use-cases/require-specific-cookie/og.png?v=80c5132473ed8dcd


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.