Country Code in the Domain Name System

Last Edited

by

in

What is the Country Code?

The Country Code is a two-letter code identifying top-level domains for countries in the Domain Name System (DNS). Country codes are a way of geographically identifying a domain name as belonging to a particular country.

Coutry Code (ISO 3166)

They are an alternative to the more commonly used organizational codes such as .com, .org, .net, and so on. This table lists the various country codes for the DNS system.

DNS Country Code List

CodeCountryCodeCountry
ADAndorraBSBahamas
AEUnited Arab EmiratesBTBhutan
AFAfghanistanBVBouvet Island
AGAntigua and BarbudaBWBotswana
AIAnguillaBYBelarus
ALAlbaniaBZBelize
AMArmeniaCACanada
ANNetherlands AntillesCCCocos (Keeling Islands)
AOAngolaCFCentral African Republic
AQAntarcticaCGCongo
ARArgentinaCHSwitzerland
ASAmerican SamoaCICote D’Ivoire (Ivory Coast)
ATAustriaCKCook Islands
AUAustraliaCLChile
AWArubaCMCameroon
AZAzerbaijanCNChina
BABosnia and HerzegovinaCOColombia
BBBarbadosCRCosta Rica
BDBangladeshCUCuba
BEBelgiumCVCape Verde
BFBurkina FasoCXChristmas Island
BGBulgariaCYCyprus
BHBahrainCZCzech Republic
BIBurundiDEGermany
BJBeninDJDjibouti
BMBermudaDKDenmark
BNBrunei DarussalamDMDominica
BOBoliviaDODominican Republic
BRBrazilDZAlgeria
ECEcuadorGYGuyana
EEEstoniaHKHong Kong
EGEgyptHMHeard and McDonald Islands
EHWestern SaharaHNHonduras
EREritreaHRCroatia (Hrvatska)
ESSpainHTHaiti
ETEthiopiaHUHungary
FIFinlandIDIndonesia
FJFijiIEIreland
FKFalkland Islands (Malvinas)ILIsrael
FMMicronesiaINIndia
FOFaroe IslandsIOBritish Indian Ocean Territory
FRFranceIQIraq
FXFrance (Metropolitan)IRIran
GAGabonISIceland
GDGrenadaITItaly
GEGeorgiaJMJamaica
GFFrench GuianaJOJordan
GHGhanaJPJapan
GIGibraltarKEKenya
GLGreenlandKGKyrgyzstan
GMGambiaKHCambodia
GNGuineaKIKiribati
GPGuadeloupeKMComoros
GQEquatorial GuineaKNSaint Kitts and Nevis
GRGreeceKPKorea (North)
GSSouth Georgia and South Sandwich IslandsKRKorea (South)
GTGuatemalaKWKuwait
GUGuamKYCayman Islands
GWGuinea-BissauKZKazakhstan
LALaosMZMozambique
LBLebanonNANamibia
LCSaint LuciaNCNew Caledonia
LILiechtensteinNENiger
LKSri LankaNFNorfolk Island
LRLiberiaNGNigeria
LSLesothoNINicaragua
LTLithuaniaNLNetherlands
LULuxembourgNONorway
LVLatviaNPNepal
LYLibyaNRNauru
MAMoroccoNUNiue
MCMonacoNZNew Zealand
MDMoldovaOMOman
MGMadagascarPAPanama
MHMarshall IslandsPEPeru
MKMacedoniaPFFrench Polynesia
MLMaliPGPapua New Guinea
MMMyanmarPHPhilippines
MNMongoliaPKPakistan
MOMacauPLPoland
MPNorthern Mariana IslandsPMSt. Pierre and Miquelon
MQMartiniquePNPitcairn
MRMauritaniaPRPuerto Rico
MSMontserratPTPortugal
MTMaltaPWPalau
MUMauritiusPYParaguay
MVMaldivesQAQatar
MWMalawiREReunion
MXMexicoRORomania
MYMalaysiaRURussian Federation
RWRwandaTPEast Timor
SASaudi ArabiaTRTurkey
SBSolomon IslandsTTTrinidad and Tobago
SCSeychellesTVTuvalu
SDSudanTWTaiwan
SESwedenTZTanzania
SGSingaporeUAUkraine
SHSt. HelenaUGUganda
SISloveniaUKUnited Kingdom
SJSvalbard and Jan Mayen IslandsUMUS Minor Outlying Islands
SKSlovak RepublicUSUnited States
SLSierra LeoneUYUruguay
SMSan MarinoUZUzbekistan
SNSenegalVAVatican City State
SOSomaliaVCSaint Vincent and The Grenadines
SRSurinameVEVenezuela
STSao Tome and PrincipeVGVirgin Islands (British)
SVEl SalvadorVIVirgin Islands (US)
SYSyriaVNViet Nam
SZSwazilandVUVanuatu
TCTurks and Caicos IslandsWFWallis and Futuna Islands
TDChadWSSamoa
TFFrench Southern TerritoriesYEYemen
TGTogoYTMayotte
THThailandYUYugoslavia
TJTajikistanZASouth Africa
TKTokelauZMZambia
TMTurkmenistanZRZaire
TNTunisiaZWZimbabwe

Country Code in HTML File

In HTML, country codes can be used as an addition to the language code in the lang attribute. The first two characters of a language code define the language of the Web page. The last two characters define the country. This is also called ISO Country Code.

The following example specifies English as language and United States as country:

<html lang="en-US">
...
</html>

External References

Search