- Allowlist - only the countries you add can connect and stream. Every other country is blocked.
- Blocklist - the countries you add are rejected. Every other country can stream.
Geo-blocking is configured per video library. If you deliver content through several libraries, repeat the setup for each library you want to restrict.
Configure geo-blocking
1
Open your video library
In the bunny.net dashboard, go to Stream and select the video library you want to restrict. The library’s delivery hostname (for example,
https://your-library.b-cdn.net) is shown at the top of the page.2
Open the Geo-blocking screen
In the library menu, open Security > Geo-blocking. You’ll see a world map above two panels: Allowlisted countries and Blocked countries.
3
Choose your mode and add countries
Decide whether you want an allowlist or a blocklist, then add countries to that panel using its Select countries dropdown.
- To allow only specific countries, add them under Allowlisted countries. Everyone else is blocked.
- To block specific countries, add them under Blocked countries. Everyone else is allowed.
4
Save your settings
Click Save Settings to apply the rule. The button stays inactive until you’ve added at least one country. To change modes later, remove every country from the active panel to re-enable the other one.
How geo-blocking works
When a viewer requests a video, bunny.net determines their country from their IP address and checks it against your library’s rule:- In allowlist mode, the request is allowed only if the viewer’s country is on the list. All other countries are rejected and cannot stream.
- In blocklist mode, the request is rejected if the viewer’s country is on the list. All other countries are allowed to stream.
A country can belong to only one list at a time. Because the two modes are mutually exclusive, a country you add to one panel is automatically excluded from the other.
Choosing between allowlist and blocklist
Use an allowlist when your default should be deny — for example, when you’re licensed to distribute in only a handful of territories and want everywhere else closed off. Adding a small set of countries is quicker and safer than trying to block every country you don’t serve. Use a blocklist when your default should be allow — for example, when your content is available almost everywhere and you only need to exclude a few specific countries for legal or contractual reasons.Combine with token authentication for stricter control
Related
Stream Security
Review the full set of Bunny Stream security controls, including embed view and CDN token authentication.
Embedded view token authentication
Sign your embeds and restrict playback by expiry time, and more.