All Products
Search
Document Center

Edge Security Acceleration:Introduction of the ISO 3166 standard

Last Updated:Mar 21, 2025

ISO 3166 is a global code standard developed by the International Organization for Standardization (ISO), providing unambiguous identification of countries and regions through alpha-2, alpha-3, and numeric code systems. ISO 3166 provides support for cross-border trade, data exchange, and network security applications. It aligns technically with China's national standard GB/T 2659.

What is the ISO 3166 standard

The ISO 3166 standard is developed by ISO and is mainly used to provide a unified coding system for countries and regions around the world. By combining the ISO 3166 standard and Edge Security Acceleration (ESA) rules, you can precisely identify and manage geographical locations, and improve network performance, security, and user satisfaction.

Structure of the ISO 3166 standard

The ISO 3166 standard mainly consists of three parts:

ISO 3166-1

ISO 3166-1 defines codes representing the names of current countries, dependent territories, and other areas of special geopolitical significance. It includes the following three code forms:

  • Alpha-2 code: a two-letter code that is the most widely used form of country code, commonly used in top-level domains of countries and regions. For example: .th represents the top-level domain of Thailand. The value of the ip.geoip.country field in ESA rules adopts the ISO 3166-1 alpha-2 code. For example: TH represents Thailand.

  • Alpha-3 code: a three-letter code that is more closely related to the English name of the country. For example, the Alpha-3 code of Singapore is SGP.

  • Numeric code: a three-digit code mainly used in language-independent scenarios.

ISO 3166-2

ISO 3166-2 defines subdivision codes that represent the names of principal subdivisions of countries (such as provinces, states, and autonomous regions). These codes are extensions based on the country codes in ISO 3166-1 (based on the two-letter code elements in ISO 3166-1, followed by a separator and up to three alphanumeric characters). Subdivision codes are used to more precisely identify administrative regions within a country. The value of the ip.geoip.country field in ESA rules adopts the ISO 3166-2 code. For example, ID-JC denotes the Central Java province of Indonesia.

ISO 3166-3

ISO 3166-3 is used to represent codes for country names that are no longer in use (such as Czechoslovakia), mainly for historical records and data tracing.

How to query the latest ISO 3166 code information

The maintenance of ISO 3166 is the responsibility of the ISO 3166 Maintenance Agency (ISO 3166/MA), which ensures the accuracy and timeliness of country codes. You can obtain the latest code information through the following links: