Country-based access policy
You can restrict access to content distributed via CDN for users from specified countries using a country-based access policy. You can configure such an access policy when creating or editing a CDN resource using the management console or API.
A country-based access policy is determined by the policy type and country list.
Warning
When you use country-based access policies, the system tracks client locations by running their IP addresses through GeoIP databases. Occasionally, this data may be inaccurate or out-of-date, e.g., due to IP address reallocation among providers, change of address range ownership, or delayed updates of public sources.
Policy type
You can set one of these policy types for a CDN resource:
Block specified countries: Restricts access to the resource from the listed countries and allows access from all other countries.Allow specified countries only: Allows access to the resource only from the countries on the list and denies access from other countries.
List of countries
Countries and territories are specified by uppercase two-letter codes as per the ISO 3166-1 alpha-2RU, KZ.
Country and region codes
|
Country or region |
Code |
Country or region |
Code |
|
Andorra |
|
United Arab Emirates |
|
|
Afghanistan |
|
Antigua and Barbuda |
|
|
Anguilla |
|
Albania |
|
|
Armenia |
|
Angola |
|
|
Antarctica |
|
Argentina |
|
|
American Samoa |
|
Austria |
|
|
Australia |
|
Aruba |
|
|
Åland Islands |
|
Azerbaijan |
|
|
Bosnia and Herzegovina |
|
Barbados |
|
|
Bangladesh |
|
Belgium |
|
|
Burkina Faso |
|
Bulgaria |
|
|
Bahrain |
|
Burundi |
|
|
Benin |
|
Saint Barthélemy |
|
|
Bermuda |
|
Brunei |
|
|
Bolivia |
|
Bonaire, St. Eustatius and Saba |
|
|
Brazil |
|
Bahamas |
|
|
Butane |
|
Bouvet Island |
|
|
Botswana |
|
Belarus |
|
|
Belize |
|
Canada |
|
|
Cocos Islands |
|
Congo (Kinshasa) |
|
|
Central African Republic |
|
Congo (Brazzaville) |
|
|
Switzerland |
|
Côte d'Ivoire |
|
|
Cook Islands |
|
Chile |
|
|
Cameroon |
|
China |
|
|
Colombia |
|
Costa Rica |
|
|
Cuba |
|
Cabo Verde |
|
|
Curacao |
|
Christmas Island |
|
|
Cyprus |
|
Czech Republic |
|
|
Germany |
|
Djibouti |
|
|
Denmark |
|
Dominica |
|
|
Dominican Republic |
|
Algeria |
|
|
Ecuador |
|
Estonia |
|
|
Egypt |
|
Western Sahara |
|
|
Eritrea |
|
Spain |
|
|
Ethiopia |
|
Finland |
|
|
Fiji |
|
Falkland Islands |
|
|
Federated States of Micronesia |
|
Faroe Islands |
|
|
France |
|
Gabon |
|
|
Great Britain |
|
Grenada |
|
|
Georgia |
|
French Guiana |
|
|
Guernsey |
|
Ghana |
|
|
Gibraltar |
|
Greenland |
|
|
Gambia |
|
Guinea |
|
|
Guadeloupe |
|
Equatorial Guinea |
|
|
Greece |
|
South Georgia and the South Sandwich Islands |
|
|
Guatemala |
|
Guam |
|
|
Guinea-Bissau |
|
Guyana |
|
|
Hong Kong |
|
Heard and McDonald Islands |
|
|
Honduras |
|
Croatia |
|
|
Haiti |
|
Hungary |
|
|
Indonesia |
|
Ireland |
|
|
Israel |
|
Isle of Man |
|
|
India |
|
British Indian Ocean Territory |
|
|
Iraq |
|
Iran |
|
|
Iceland |
|
Italy |
|
|
Jersey |
|
Jamaica |
|
|
Jordan |
|
Japan |
|
|
Kenya |
|
Kyrgyzstan |
|
|
Cambodia |
|
Kiribati |
|
|
Comoros |
|
Saint Kitts and Nevis |
|
|
DPRK |
|
South Korea |
|
|
Kuwait |
|
Cayman Islands |
|
|
Kazakhstan |
|
Laos |
|
|
Lebanon |
|
Saint Lucia |
|
|
Liechtenstein |
|
Sri Lanka |
|
|
Liberia |
|
Lesotho |
|
|
Lithuania |
|
Luxembourg |
|
|
Latvia |
|
Libya |
|
|
Morocco |
|
Monaco |
|
|
Moldova |
|
Montenegro |
|
|
Saint Martin |
|
Madagascar |
|
|
Marshall Islands |
|
North Macedonia |
|
|
Mali |
|
Myanmar (Burma) |
|
|
Mongolia |
|
Macau |
|
|
Northern Mariana Islands |
|
Martinique |
|
|
Mauritania |
|
Montserrat |
|
|
Malta |
|
Mauritius |
|
|
Maldives |
|
Malawi |
|
|
Mexico |
|
Malaysia |
|
|
Mozambique |
|
Namibia |
|
|
New Caledonia |
|
Niger |
|
|
Norfolk Island |
|
Nigeria |
|
|
Nicaragua |
|
Netherlands |
|
|
Norway |
|
Nepal |
|
|
Nauru |
|
Niue |
|
|
New Zealand |
|
Oman |
|
|
Panama |
|
Peru |
|
|
French Polynesia |
|
Papua New Guinea |
|
|
Philippines |
|
Pakistan |
|
|
Poland |
|
Saint Pierre and Miquelon |
|
|
Pitcairn Islands |
|
Puerto Rico |
|
|
Palestinian territories |
|
Portugal |
|
|
Palau |
|
Paraguay |
|
|
Qatar |
|
Reunion |
|
|
Romania |
|
Serbia |
|
|
Russia |
|
Rwanda |
|
|
Saudi Arabia |
|
Solomon Islands |
|
|
Seychelles |
|
Sudan |
|
|
Sweden |
|
Singapore |
|
|
Saint Helena Island |
|
Slovenia |
|
|
Svalbard and Jan Mayen |
|
Slovakia |
|
|
Sierra Leone |
|
San Marino |
|
|
Senegal |
|
Somalia |
|
|
Suriname |
|
South Sudan |
|
|
Sao Tome and Principe |
|
Salvador |
|
|
Sint Maarten |
|
Syria |
|
|
Eswatini |
|
Turks and Caicos |
|
|
Chad |
|
French Southern Territories |
|
|
Togo |
|
Thailand |
|
|
Tajikistan |
|
Tokelau |
|
|
East Timor |
|
Turkmenistan |
|
|
Tunisia |
|
Tonga |
|
|
Turkey |
|
Trinidad and Tobago |
|
|
Tuvalu |
|
Taiwan |
|
|
Tanzania |
|
Ukraine |
|
|
Uganda |
|
United States Minor Outlying Islands |
|
|
United States |
|
Uruguay |
|
|
Uzbekistan |
|
Vatican |
|
|
Saint Vincent and the Grenadines |
|
Venezuela |
|
|
Virgin Islands (UK) |
|
Virgin Islands (USA) |
|
|
Vietnam |
|
Vanuatu |
|
|
Wallis and Futuna |
|
Samoa |
|
|
Yemen |
|
Mayotte |
|
|
Republic of South Africa |
|
Zambia |
|
|
Zimbabwe |
|