- Block selected countries - the countries on your list are rejected. Every other country can stream.
- Allow selected countries - only the countries on your list can stream. Every other country is blocked.
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,
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.
3
Turn on geo-blocking
Switch on the Enable Geo-blocking toggle.
4
Choose a mode
Select either Block selected countries or Allow selected countries. The mode decides what happens to the countries you add in the next step. You can switch modes at any time. See Switching modes.
5
Add countries
Build your country list in either or both of these ways:
- Select countries - open the dropdown and pick individual countries.
- Append Preset - add a whole group of countries in one click, such as a continent, a data protection zone, or a common business region. See Presets.
6
Save your settings
Click Save Settings to apply the rule. The button stays inactive until you’ve added at least one country.
Geo-blocking has no effect until at least one country is on the list. With the toggle on but the list empty, viewers in every country can still stream.
Presets
Presets let you add a group of countries without selecting each one individually. Click Append Preset above the country list and choose a group. The badge next to each preset shows how many countries it contains, and all of them are added to your list.
You can combine several presets and mix them with individually selected countries. A preset only adds countries to your list, so after adding one you can remove any country you don’t want by clicking the × on its name. For example, to stream only within the EEA and the UK, select Allow selected countries and add the EEA and UK (GDPR and UK GDPR) preset.
What each preset includes
Each preset adds the countries and territories listed below.Continents
Countries that span two continents are placed where they’re usually grouped: Russia in Europe, Turkey and the Caucasus in Asia, and Egypt in Africa. Overseas territories are grouped with the continent they lie on, so French Guiana is in South America and Greenland is in North America.Africa
Africa
Algeria, Angola, Benin, Botswana, British Indian Ocean Territory, Burkina Faso, Burundi, Cameroon, Cape Verde, Central African Republic, Chad, Comoros, Congo, Congo (DRC), Côte d’Ivoire, Djibouti, Egypt, Equatorial Guinea, Eritrea, Eswatini, Ethiopia, French Southern Territories, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Lesotho, Liberia, Libya, Madagascar, Malawi, Mali, Mauritania, Mauritius, Mayotte, Morocco, Mozambique, Namibia, Niger, Nigeria, Réunion, Rwanda, Saint Helena (incl. Ascension and Tristan da Cunha), Sao Tome and Principe, Senegal, Seychelles, Sierra Leone, Somalia, South Africa, South Sudan, Sudan, Tanzania, Togo, Tunisia, Uganda, Western Sahara, Zambia, and Zimbabwe.
Asia
Asia
Afghanistan, Armenia, Azerbaijan, Bahrain, Bangladesh, Bhutan, Brunei, Cambodia, China, Georgia, Hong Kong, India, Indonesia, Iran, Iraq, Israel, Japan, Jordan, Kazakhstan, Kuwait, Kyrgyzstan, Laos, Lebanon, Macao, Malaysia, Maldives, Mongolia, Myanmar, Nepal, North Korea, Oman, Pakistan, Palestine, Philippines, Qatar, Saudi Arabia, Singapore, South Korea, Sri Lanka, Syria, Taiwan, Tajikistan, Thailand, Timor-Leste, Turkey, Turkmenistan, United Arab Emirates, Uzbekistan, Vietnam, and Yemen.
Europe
Europe
Åland Islands, Albania, Andorra, Austria, Belarus, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Faroe Islands, Finland, France, Germany, Gibraltar, Greece, Guernsey, Hungary, Iceland, Ireland, Isle of Man, Italy, Jersey, Kosovo, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Moldova, Monaco, Montenegro, Netherlands, North Macedonia, Norway, Poland, Portugal, Romania, Russia, San Marino, Serbia, Slovakia, Slovenia, Spain, Svalbard and Jan Mayen, Sweden, Switzerland, Ukraine, United Kingdom, and Vatican City.
North America
North America
Anguilla, Antigua and Barbuda, Aruba, Bahamas, Barbados, Belize, Bermuda, British Virgin Islands, Canada, Caribbean Netherlands, Cayman Islands, Costa Rica, Cuba, Curaçao, Dominica, Dominican Republic, El Salvador, Greenland, Grenada, Guadeloupe, Guatemala, Haiti, Honduras, Jamaica, Martinique, Mexico, Montserrat, Nicaragua, Panama, Puerto Rico, Saint Barthélemy, Saint Kitts and Nevis, Saint Lucia, Saint Martin (French part), Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Sint Maarten (Dutch part), Trinidad and Tobago, Turks and Caicos Islands, United States, and US Virgin Islands.
Oceania
Oceania
American Samoa, Australia, Christmas Island, Cocos (Keeling) Islands, Cook Islands, Fiji, French Polynesia, Guam, Heard Island and McDonald Islands, Kiribati, Marshall Islands, Micronesia, Nauru, New Caledonia, New Zealand, Niue, Norfolk Island, Northern Mariana Islands, Palau, Papua New Guinea, Pitcairn Islands, Samoa, Solomon Islands, Tokelau, Tonga, Tuvalu, US Minor Outlying Islands, Vanuatu, and Wallis and Futuna.
South America
South America
Argentina, Bolivia, Bouvet Island, Brazil, Chile, Colombia, Ecuador, Falkland Islands, French Guiana, Guyana, Paraguay, Peru, South Georgia and the South Sandwich Islands, Suriname, Uruguay, and Venezuela.
Data protection
European Union (EU)
European Union (EU)
Austria, Belgium, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, and Sweden.
EEA (GDPR)
EEA (GDPR)
All countries in the European Union (EU) preset, plus Iceland, Liechtenstein, and Norway.
EEA and UK (GDPR and UK GDPR)
EEA and UK (GDPR and UK GDPR)
All countries in the EEA (GDPR) preset, plus the United Kingdom.
Regions
Asia-Pacific (APAC)
Asia-Pacific (APAC)
All countries and territories in the Oceania preset, plus Bangladesh, Bhutan, Brunei, Cambodia, China, Hong Kong, India, Indonesia, Japan, Laos, Macao, Malaysia, Maldives, Mongolia, Myanmar, Nepal, North Korea, Pakistan, Philippines, Singapore, South Korea, Sri Lanka, Taiwan, Thailand, Timor-Leste, and Vietnam.
Australia and New Zealand
Australia and New Zealand
Australia and New Zealand.
Benelux
Benelux
Belgium, Luxembourg, and Netherlands.
DACH
DACH
Austria, Germany, and Switzerland.
Latin America (LATAM)
Latin America (LATAM)
Argentina, Bolivia, Brazil, Chile, Colombia, Costa Rica, Cuba, Dominican Republic, Ecuador, El Salvador, Guatemala, Haiti, Honduras, Mexico, Nicaragua, Panama, Paraguay, Peru, Puerto Rico, Uruguay, and Venezuela.
Middle East and North Africa (MENA)
Middle East and North Africa (MENA)
Algeria, Bahrain, Djibouti, Egypt, Iran, Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Morocco, Oman, Palestine, Qatar, Saudi Arabia, Syria, Tunisia, United Arab Emirates, and Yemen.
Nordics
Nordics
Åland Islands, Denmark, Faroe Islands, Finland, Greenland, Iceland, Norway, and Sweden.
UK and Ireland
UK and Ireland
Guernsey, Ireland, Isle of Man, Jersey, and United Kingdom.
US and Canada
US and Canada
American Samoa, Canada, Guam, Northern Mariana Islands, Puerto Rico, United States, and US Virgin Islands.
Some territories are listed separately from the country they belong to. For example, Spain appears as Spain (excl. Canary Islands), and the Åland Islands, Faroe Islands, and Greenland have their own entries. Some presets include territories like these, such as Nordics, which adds all three. Others don’t. If your rule needs to cover a territory, check the map and add it individually.
Supported countries and codes
Geo-blocking supports the countries and territories below, each identified by its two-letter ISO 3166-1 alpha-2 code. The Continent preset column shows which continent preset adds each one.The United Kingdom uses the ISO code
GB, not UK. Kosovo uses XK, a widely adopted user-assigned code, because it has no official ISO 3166-1 code.View all country and territory codes
View all country and territory codes
Switching modes
If you switch modes while countries are on the list, the list is kept and its meaning flips. Your blocked countries become your allowed countries, and vice versa.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 Block selected countries mode, the request is rejected if the viewer’s country is on the list. All other countries can stream.
- In Allow selected countries mode, the request is allowed only if the viewer’s country is on the list. All other countries are rejected.
Choosing a mode
Use Allow selected countries 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, or a single preset such as UK and Ireland, is quicker and safer than trying to block every country you don’t serve. Use Block selected countries 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.