9 min read
How to Restrict Videos Using Bunny CDN and Presto Player: A Step-by-Step Guide
If you run a membership site, online course platform, or any WordPress site that hosts premium video content, securing that content from unauthorized access is essential. Allowing anyone to view videos you have invested time and money in creating undermines your business model and devalues the membership or purchase that legitimate customers pay for. Bunny CDN and Presto Player, when combined with a membership plugin like Paid Memberships Pro, provide a powerful and reliable solution for hosting, delivering, and restricting access to video content on WordPress.
Bunny CDN is a globally distributed content delivery network known for its speed, reliability, and cost-effectiveness. Presto Player is a WordPress video player plugin that offers advanced features including custom branding, playback controls, and deep integration with learning management systems and membership plugins. Together, they create a system where your videos load quickly for authorized members while remaining completely inaccessible to everyone else. In this guide, we walk through the complete setup process step by step, covering Bunny CDN configuration, Presto Player integration, membership-based access control, and token authentication for maximum security.
Why Use Bunny CDN and Presto Player for Video Hosting?
Before diving into the technical setup, it is important to understand why this particular combination stands out for secure WordPress video hosting.
Performance and Reliability
Bunny CDN operates a global network of edge servers that deliver video content from the location closest to each viewer. This means smooth, buffer-free playback regardless of where your members are located. Unlike self-hosting videos on your WordPress server, which can slow down your site and create bandwidth problems during high-traffic periods, Bunny CDN handles delivery independently, keeping your site fast and responsive.
Customizable Player Experience
Presto Player goes far beyond a basic video embed. It offers custom branding options, adjustable playback speeds, chapter markers, email capture gates, and integration with popular WordPress plugins. You can match the player appearance to your site’s design, add calls to action at specific timestamps, and track viewer engagement. For sites built on the BuddyX theme or similar community-focused WordPress themes, Presto Player’s customization options help maintain visual consistency across the entire member experience.
Layered Security
The combination of Bunny CDN’s hotlink protection and token authentication with Presto Player’s WordPress integration and Paid Memberships Pro’s access control creates multiple layers of security. Even if someone discovers a video URL, they cannot access the content without proper authentication. This layered approach is significantly more secure than simply embedding videos from YouTube or Vimeo with unlisted links.
Prerequisites for Setting Up Video Restrictions
Before starting the setup process, ensure you have the following in place:
- A Bunny CDN account: Sign up at Bunny.net and create a video library. Bunny CDN offers a generous trial and competitive pay-as-you-go pricing that makes it accessible for sites of all sizes.
- Presto Player: Install and activate the Presto Player plugin on your WordPress site. Both free and premium versions are available, though the premium version offers deeper integration features.
- Paid Memberships Pro: Install and configure this membership plugin with your desired membership levels. Alternatives like Restrict Content Pro or MemberPress also work, but this guide focuses on Paid Memberships Pro.
- WordPress admin access: You need full admin access to install plugins, configure settings, and manage content restrictions.
Step 1: Setting Up Bunny CDN Video Library
Create Your Video Library
After logging into your Bunny CDN dashboard, navigate to the Video Library section and click “Add Library” to create a new video library. During setup, you will configure several important options:
- Storage Location: Choose a storage region closest to your primary audience for optimal upload speed. Bunny CDN replicates content across its global edge network automatically, so your choice here primarily affects upload speed rather than delivery speed.
- Pull Zone Configuration: The video library automatically creates a pull zone that handles content delivery. Note the pull zone URL, as you will need it for Presto Player configuration.
- Encoding Settings: Configure the encoding resolutions you want to support. For most use cases, supporting 360p through 1080p provides a good balance between quality and storage costs.
Upload Your Videos
Use the Bunny CDN dashboard to upload your video files. The platform automatically transcodes uploaded videos into multiple resolutions and formats optimized for adaptive streaming. This means viewers automatically receive the best quality their connection can support without buffering. For large video libraries, Bunny CDN also supports FTP and API-based uploads for bulk content management.
Enable Hotlink Protection
Hotlink protection is your first layer of security. Navigate to the Security Settings of your video library and enable hotlink protection. Add your WordPress site’s domain to the allowed referrer list. This ensures that only requests originating from your website can load video content from your Bunny CDN library. Anyone who copies a video URL and tries to embed it on another site or access it directly will be blocked.
Step 2: Configuring Presto Player
Install and Connect to Bunny CDN
After installing Presto Player from the WordPress plugin repository, navigate to Presto Player Settings in your WordPress dashboard. Add a new Bunny CDN integration by entering your API key, library ID, and pull zone URL from your Bunny CDN account. Save your settings and verify the connection is working by checking that your uploaded videos appear in the Presto Player media browser.
Add Videos to Presto Player
Navigate to the Media section in Presto Player, click “Add New Video,” and select Bunny CDN as your video source. Select the video from your library or enter the video URL. Configure playback settings including thumbnail images, available playback speeds, autoplay behavior, and player branding. Presto Player generates a shortcode or Gutenberg block for each video that you can embed anywhere in your WordPress content.
Customize the Player Experience
Presto Player allows extensive customization of the viewing experience. You can add chapter markers for long videos, configure email capture forms that pause playback until the viewer subscribes, set up calls to action at specific timestamps, and apply custom CSS to match the player to your site’s design language. For membership sites, consider adding a watermark or branded overlay to discourage unauthorized screen recording. These customization options work well with WordPress themes designed for community engagement.
Step 3: Restricting Access with Paid Memberships Pro
Configure Membership Levels
Install Paid Memberships Pro and set up your membership levels based on your content strategy. For example, you might create Free, Premium, and VIP tiers with different levels of video access. Configure pricing, billing cycles, and member permissions for each level.
Restrict Video Pages
Create a new page or post in WordPress and embed your Presto Player video using the shortcode or Gutenberg block. Then use Paid Memberships Pro’s content restriction settings to limit access to that page based on membership level. You can restrict entire pages, individual sections within a page, or specific Gutenberg blocks. Non-members who try to access restricted content will see a customizable message prompting them to sign up or upgrade their membership.
Test Access Restrictions
Thoroughly test your setup by logging out of your admin account and attempting to access restricted video pages as different user types: a non-logged-in visitor, a free member, and a premium member. Verify that each user type sees the correct content or restriction message. Also test that video URLs cannot be accessed directly by copying them from the page source while logged in and attempting to load them while logged out. If you manage multiple mobile-optimized WordPress sites, test the restriction behavior on mobile devices as well.
Step 4: Enhancing Security with Token Authentication
For maximum protection, enable token authentication in Bunny CDN. This generates time-limited, signed URLs for each video request, meaning that even if someone captures a video URL, it expires after a short period and cannot be reused.
- Navigate to the Video Library Settings in your Bunny CDN dashboard and enable Token Authentication.
- Generate a signing key and copy it securely.
- Update the Presto Player settings in WordPress with the token authentication key.
- Configure the token expiration time based on your needs. Shorter expiration times are more secure but must allow enough time for legitimate video playback.
With token authentication enabled, every video request from your WordPress site includes a cryptographically signed token that Bunny CDN validates before serving content. This prevents URL sharing, hotlinking from unauthorized sources, and most forms of video piracy.
Benefits of This Setup
- Fast and Reliable Playback: Bunny CDN’s global edge network ensures smooth video delivery with minimal latency and zero buffering for viewers worldwide.
- Customizable Video Experience: Presto Player gives you full control over the player appearance, behavior, and interaction features to match your brand and content strategy.
- Multi-Layered Security: Hotlink protection, token authentication, and membership-based access control work together to prevent unauthorized video access from multiple angles.
- Scalability: As your audience and video library grow, Bunny CDN handles increased traffic seamlessly without impacting your WordPress server performance.
- Cost-Effectiveness: Bunny CDN’s pay-as-you-go pricing keeps costs proportional to actual usage, making it accessible for sites of all sizes from small course creators to large membership platforms.
Troubleshooting Common Issues
If videos do not play after setup, verify that your domain is correctly added to the Bunny CDN hotlink protection allowed list. Check that the API key and library ID in Presto Player settings match your Bunny CDN account. For token authentication issues, ensure the signing key matches between Bunny CDN and Presto Player, and verify that your WordPress server’s clock is synchronized, as expired tokens can cause playback failures.
If restriction messages are not appearing correctly, clear any WordPress caching plugins and verify that Paid Memberships Pro’s restriction rules are correctly configured for the specific page or post. Some caching plugins may serve cached versions of restricted pages to unauthorized users, so configure your caching plugin to exclude membership-restricted pages. Understanding the differences between caching plugins helps you choose one that works well with membership restrictions.
FAQs
- What is Bunny CDN Token Authentication?
Token Authentication generates cryptographically signed, time-limited URLs for video content. Each URL includes a token that Bunny CDN validates before serving the video, preventing unauthorized access through URL sharing or hotlinking. - Can I use Presto Player without Bunny CDN?
Yes, Presto Player supports multiple video sources including self-hosted files, YouTube, and Vimeo. However, using Bunny CDN provides significantly better performance, lower server load, and stronger security features. - Does this setup work with other membership plugins?
Yes. While this guide uses Paid Memberships Pro, Presto Player integrates with Restrict Content Pro, MemberPress, LearnDash, and other popular membership and LMS plugins. The Bunny CDN configuration remains the same regardless of which membership plugin you use. - How much does Bunny CDN cost for video hosting?
Bunny CDN uses pay-as-you-go pricing for video hosting, typically charging per GB of storage and per GB of bandwidth used. For most small to medium membership sites, monthly costs are significantly lower than alternatives like Vimeo Pro or Wistia.
Deliver and Protect Your Premium Video Content
Combining Bunny CDN, Presto Player, and Paid Memberships Pro creates a robust, scalable system for hosting and securing premium video content on WordPress. Bunny CDN handles fast, reliable global delivery. Presto Player provides a customizable, professional viewing experience. And Paid Memberships Pro ensures that only paying members can access the content they have subscribed to. Together, these tools give you the infrastructure to build a sustainable video-based business on WordPress, whether you are running an online course platform, a membership community, or a premium content library. Set up your system today and start delivering secure, high-quality video experiences to your members.
WordPress Plugins that Will Make Your Website Mobile Friendly
WP-Optimize vs WP Rocket: Which Plugin is Best?
Best WordPress Plugins To Help You Optimize For Google Core Web Vitals
Related reading