• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!
    • Docs
      • Installation
      • Changelog
    • FAQ
    • Support
      • Free Support
      • Pro Support
    • PRO

    How to Protect your HLS Streams with URL Tokens

    As a publisher, you will most probably meet people that will attempt to access content without having paid for it, or try to download the content. Signed URLs are one of the effective approaches to securing your content and countering such actions.

    These tokens are digitally signed, ensuring that the attributes of the token will not be tampered with. The tokens are valid only for a certain time and they are tied to the user ID. Therefore, requests beyond the expiration time will return an HTTP error code. So will request with an altered or missing token.

    In FV Player, this is handled by the Stream Loader feature. In order to use Stream Loader, you have to have the FV Player Pro version. It works with any CDN supported by FV Player Pro (CloudFront, Bunny CDN, KeyCDN, Cloudflare, StackPath) and AWS S3 or DigitalOcean Spaces.

    The basic building block of HLS stream is the m3u8 file. However, these files are static, thus they cannot use video segment URLs with time-sensitive tokens. Stream Loader inserts proper URL tokens on the fly, which allows it to get past these limitations.

    Note:If you are also encrypting your videos, this is an additional layer of protection.

    How to enable Stream Loader

    First, you need to enable the feature in the settings of FV Player Pro.

    Go to Settings -> FV Player Pro -> Setup tab -> Stream Loader and click Enable.

    If you have a large amount of viewers and the performance of your website could be negatively affected by this feature, you can also select the Speed-up option, which activates faster serving by bypassing WordPress.

    Secondly, you also need to enable URL tokens on your CDN.

    Enabling URL tokens on FV Player Coconut

    If you are using our free Coconut add-on to encode and encrypt your videos, you can skip the CDN setup and just enable the Stream Loader feature in FV Player Pro settings, as FV Player Coconut does this automatically.

    Note: Encryption and URL Tokens in FV Player Coconut are only available for FV Player Pro users.

    Enabling URL Tokens on CloudFront

    Since many of our users distribute their videos via CloudFront, we have prepared the steps for this CDN:

    1.You will need to restrict viewer access. In order to be able to do that, you first need to obtain and insert your Private Key. On how to do that, please follow this guide.

    2.Go to CloudFront Distributions page in your AWS console.

    3.Check the box of your distribution.

    4.Go to the Behaviours tab, select the default behaviour, and click Edit.

    1. Look for Restrict Viewer Access (Use Signed URLs or Signed Cookies) option and pick Yes. Enabling this opens up two new options. In Trusted Key Groups or Trusted Signer pick Trusted Signer. In the next option, pick Self as the Trusted Signer.
    1. Save by clicking Yes,Edit in the bottom right corner of the page.

    2. Go back to the General tab of your CloudFront distribution and copy the domain name.

    1. Now go to Settings -> FV Player Pro -> Hosting tab -> CloudFront (Pro) and enter the domain name of your distribution into the CloudFront domain field.

    Note: If you already have other domains in this field, just separate them with a comma.

    DEMO

    Try it out yourself. Try obtaining the HLS URL from the source code of this page or try to download the video.

    video
    play-sharp-fill

    Reader Interactions

    Primary Sidebar

    Video Protection Methods

    1. Why FV Player?
    2. FAQ
    3. Creating and Managing Playlists
    4. Advanced features
    5. Video Security
      1. Video Protection Methods
        1. Protect Videos From Downloading
        2. Protect HLS Streams with URL Tokens
        3. Protecting HLS Videos with Cookies
        4. Vimeo Security Add-on
      2. CDN Options
      3. DRM Watermarking
      4. Secure Video Encoding
    6. Troubleshooting
    7. Tools
    8. Analytics
    9. Audio Player
    10. Live Streaming
    11. Download | Buy
    12. Getting Started
    13. Licensing and Account
    14. Setting Screens
    15. Video Hosting
    16. Video Membership, Pay Per View and eLearning
    17. Video Advertising
    18. FV Player VAST/VPAID
    19. Casting Options
    20. For Developers
    21. FV Player Demos
    22. Additional Services
    23. Legal

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. ‭+421 2/5292 0086‬

    We are using cookies to give you the best experience on our website.

    You can find out more about which cookies we are using or switch them off in .

    Powered by  GDPR Cookie Compliance
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

    Necessary Cookies

    Strictly Necessary Cookie allow you to log in and download your software or post to forums.

    We use the WordPress login cookie and the session cookie.

    If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

    Support Cookies

    Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

    We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!

    3rd Party Cookies

    This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

    Keeping this cookie enabled helps us to improve our website.

    We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

    Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!