Application Security

How to Protect AI Video Platforms from Bots and Scrapers

Hotlinking, catalogue scraping and fake engagement drain CDN budget and poison recommendation data. This guide covers signed URLs, player endpoints, bot fingerprinting and CDN cost governance.

Three structural differences from ordinary web traffic

Dimension Ordinary pages Video delivery
Requests per session Tens Hundreds to thousands of segment requests
Bandwidth sensitivity Low Very high; egress is the dominant cost line
Detectability Traffic spikes are obvious Fake plays blend into organic metrics

Because one session generates huge request volume, throttling purely by requests-per-IP immediately punishes real users: home NAT, mobile carrier NAT and office Wi-Fi all share egress IPs. Signed tokens move the decision from IP to credential, which is what makes per-session limits safe.

Five layers of control

1. Signed URLs and short-lived tokens. Issue an expiring token per playback session or per segment, bound to the user session or device, invalid after expiry. Cloudflare signing mechanisms (for example Stream signed tokens) turn “hold the URL, watch forever” into “hold the URL, watch for a few minutes”. This is the foundation of hotlink protection.

2. Session-level limits on player endpoints. Set separate quotas for playlists, segment requests and metadata (subtitles, thumbnails), keyed on the user or session ID inside the token rather than source IP. Cloudflare Rate Limiting rules can count by path plus headers or JWT claims.

3. Detect non-browser playback. Scripts typically request playlists directly via FFmpeg, curl or a headless shell, missing the navigation, fingerprint and pacing signals a real player emits. Cloudflare Bot Management scores requests on TLS fingerprints, request-sequence regularity and browser environment integrity. Serve managed challenges or JS checks to highly suspicious traffic instead of blanket IP bans.

4. Playback behaviour analytics. Watch three signals: segment request rate far exceeding real playback speed (for example ten minutes of content fetched in one second), metadata-only requests that never pull segments (catalogue harvesting), and many sessions with a play event but no heartbeat (engagement fraud).

5. CDN cost governance. Wire billing-level egress metrics by directory and token into alerting. Many platforms only discover abuse when the invoice spikes; the cost control point and the detection point must be the same place.

Threat-to-control reference

Threat Typical pattern Control
Catalogue harvesting Heavy metadata hits, no segments Metadata throttling plus bot challenges
Hotlinking and off-site embedding External Referer, no signed token Short-lived signed URLs; Referer only as a hint
Fake engagement Many sessions with play but no heartbeat Session integrity checks and deduplicated counting
Credential stuffing Spiking login failures from scattered sources Login throttling plus bot management and step-up auth
Runaway egress cost Invoice spikes while page views stay flat Bandwidth alerts keyed by token and directory

Caveats and where this does not apply

  • Open embedding for partner players will be broken by strict browser fingerprinting. Issue per-partner tokens instead and state quota and validity in the contract.
  • Download-oriented long-form video (for example bundled course downloads) legitimately produces sustained high throughput; do not judge it by segment rate alone. Correlate with purchase relationships.
  • DRM-protected premium content: bot management stops bulk automated pulling, not a licensed user recording their screen and redistributing. That requires DRM (Widevine / FairPlay / PlayReady) plus forensic watermarking — content protection, not network protection.
  • Device fingerprinting used for bot scoring must be disclosed in your privacy notice and comply with local regulations.

FAQ

Why is Referer-based hotlink protection unreliable? The client controls the Referer; a single curl command forges it. Use it as one scoring input, never as the sole gate.

Do signed URLs break CDN caching? If every user gets a different query-string token, edge cache granularity collapses. A common pattern is to protect only the authorisation or playlist entry point with the token and keep segments on cacheable paths, or use a path-prefixed token strategy that balances security and hit rate.

Should we block IPs or issue challenges? Mobile carriers and corporate egress share IPs, so blanket blocks cause heavy collateral damage. Prefer rate limiting plus challenges; reserve bans for sustained, clearly attributable abuse.

Will bot scoring hurt search-engine crawlers? Major crawlers have verifiable reverse DNS and published crawling declarations. Allowlist them first, then study the score distribution of the remaining traffic rather than treating all crawlers as hostile.

← Back to articles

Authorized Cloudflare Partner

Making an architecture decision for overseas markets?

Enterprise tier selection, architecture consulting, risk assessment — tell us the scenario and we will map a concrete path.

As a Cloudflare partner, we provide:

Book a consultation