How to block empty referrers along with Domain Lock and protect your Live Streams?

5centsCDN allow you to restrict HTTP referrers in order to prevent others from embedding your Live stream on other websites. By blocking empty referrers, will save you bandwidth by prohibiting other sites from displaying your contents. In order to understand the concept of Referrers please go through the below scenario.

When you request a CDN content from site, you request it with a referrer, which basically tells you where the file is used on. For example if the playback link is used on a site dom1.com, then the CDN server will get the request with referer "dom1.com" and you can use this mechanism to prevent other sites from using your links. You can use domain lock along with Block empty referrers to achieve this. Once you have enabled this feature, and list your domain, the CDN link wont open on any other site but it won't open in a new tab/window, either, because if you just open a link in a new tab/browser, or curl it, you are requesting it with a blank referrer, as it is not used in any domain. For such requests the CDN will return 403 (blocked) status.

To enable this feature under Domain Lock follow the below procedure.

  • Go to Live Streams > Streams
  • Click on the View button available right next to your desired stream name.
  • In the re-directed page Select Domain Lock.
  • By default Domain Lock will be disabled.
  • If you want to deliver your content only in a particular domain then toggle the slider to Enable mode and add the required domain name in Allowed Domains.
  • If you want to exclude a particular IP from these restrictions, add those in Allowed IPs by setting the Toggle in Whitelist. For example, if you have added an IP here, you can able to playback the stream inspite of the domain of the player.
  • If you want to Block the content delivery for a specific IP regardless of the Domain, you can slide the toggle to Blacklist and specify the IP in the allowed IPs.
  • Check the box near to feature saying Block Requests with Empty Referrer and Save it. It is illustrated below.

PS: We do not recommend the block empty referrer in case if the user is embeding the player code on their apps and other user agents as it will be interrupt the delivery on those platforms.