    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.validator.routines;
    018
    019import java.io.Serializable;
    020import java.net.IDN;
    021import java.util.Arrays;
    022import java.util.List;
    023import java.util.Locale;
    024
    025/**
    026 * <p><b>Domain name</b> validation routines.</p>
    027 *
    028 * <p>
    029 * This validator provides methods for validating Internet domain names
    030 * and top-level domains.
    031 * </p>
    032 *
    033 * <p>Domain names are evaluated according
    034 * to the standards <a href="http://www.ietf.org/rfc/rfc1034.txt">RFC1034</a>,
    035 * section 3, and <a href="http://www.ietf.org/rfc/rfc1123.txt">RFC1123</a>,
    036 * section 2.1. No accommodation is provided for the specialized needs of
    037 * other applications; if the domain name has been URL-encoded, for example,
    038 * validation will fail even though the equivalent plaintext version of the
    039 * same name would have passed.
    040 * </p>
    041 *
    042 * <p>
    043 * Validation is also provided for top-level domains (TLDs) as defined and
    044 * maintained by the Internet Assigned Numbers Authority (IANA):
    045 * </p>
    046 *
    047 *   <ul>
    048 *     <li>{@link #isValidInfrastructureTld} - validates infrastructure TLDs
    049 *         (<code>.arpa</code>, etc.)</li>
    050 *     <li>{@link #isValidGenericTld} - validates generic TLDs
    051 *         (<code>.com, .org</code>, etc.)</li>
    052 *     <li>{@link #isValidCountryCodeTld} - validates country code TLDs
    053 *         (<code>.us, .uk, .cn</code>, etc.)</li>
    054 *   </ul>
    055 *
    056 * <p>
    057 * (<b>NOTE</b>: This class does not provide IP address lookup for domain names or
    058 * methods to ensure that a given domain name matches a specific IP; see
    059 * {@link java.net.InetAddress} for that functionality.)
    060 * </p>
    061 *
    062 * @since 1.4
    063 */
    064public class DomainValidator implements Serializable {
    065
    066    /**
    067     * enum used by {@link DomainValidator#updateTLDOverride(ArrayType, String[])}
    068     * to determine which override array to update / fetch
    069     * @since 1.5.0
    070     * @since 1.5.1 made public and added read-only array references
    071     */
    072    public enum ArrayType {
    073        /** Update (or get a copy of) the GENERIC_TLDS_PLUS table containing additonal generic TLDs */
    074        GENERIC_PLUS,
    075        /** Update (or get a copy of) the GENERIC_TLDS_MINUS table containing deleted generic TLDs */
    076        GENERIC_MINUS,
    077        /** Update (or get a copy of) the COUNTRY_CODE_TLDS_PLUS table containing additonal country code TLDs */
    078        COUNTRY_CODE_PLUS,
    079        /** Update (or get a copy of) the COUNTRY_CODE_TLDS_MINUS table containing deleted country code TLDs */
    080        COUNTRY_CODE_MINUS,
    081        /** Gets a copy of the generic TLDS table */
    082        GENERIC_RO,
    083        /** Gets a copy of the country code table */
    084        COUNTRY_CODE_RO,
    085        /** Gets a copy of the infrastructure table */
    086        INFRASTRUCTURE_RO,
    087        /** Gets a copy of the local table */
    088        LOCAL_RO,
    089        /**
    090         * Update (or get a copy of) the LOCAL_TLDS_PLUS table containing additional local TLDs
    091         * @since 1.7
    092         */
    093        LOCAL_PLUS,
    094        /**
    095         * Update (or get a copy of) the LOCAL_TLDS_MINUS table containing deleted local TLDs
    096         * @since 1.7
    097         */
    098        LOCAL_MINUS
    099        ;
    100    }
    101
    102    private static class IDNBUGHOLDER {
    103        private static final boolean IDN_TOASCII_PRESERVES_TRAILING_DOTS = keepsTrailingDot();
    104        private static boolean keepsTrailingDot() {
    105            final String input = "a."; // must be a valid name
    106            return input.equals(IDN.toASCII(input));
    107        }
    108    }
    109
    110    /**
    111     * Used to specify overrides when creating a new class.
    112     * @since 1.7
    113     */
    114    public static class Item {
    115        final ArrayType type;
    116        final String[] values;
    117
    118        /**
    119         * Constructs a new instance.
    120         * @param type ArrayType, e.g. GENERIC_PLUS, LOCAL_PLUS
    121         * @param values array of TLDs. Will be lower-cased and sorted
    122         */
    123        public Item(final ArrayType type, final String... values) {
    124            this.type = type;
    125            this.values = values; // no need to copy here
    126        }
    127    }
    128
    129    // Regular expression strings for hostnames (derived from RFC2396 and RFC 1123)
    130
    131    private static class LazyHolder { // IODH
    132
    133        /**
    134         * Singleton instance of this validator, which
    135         *  doesn't consider local addresses as valid.
    136         */
    137        private static final DomainValidator DOMAIN_VALIDATOR = new DomainValidator(false);
    138
    139        /**
    140         * Singleton instance of this validator, which does
    141         *  consider local addresses valid.
    142         */
    143        private static final DomainValidator DOMAIN_VALIDATOR_WITH_LOCAL = new DomainValidator(true);
    144
    145    }
    146
    147    /** Maximum allowable length ({@value}) of a domain name */
    148    private static final int MAX_DOMAIN_LENGTH = 253;
    149
    150    private static final String[] EMPTY_STRING_ARRAY = {};
    151
    152    private static final long serialVersionUID = -4407125112880174009L;
    153
    154    // RFC2396: domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
    155    // Max 63 characters
    156    private static final String DOMAIN_LABEL_REGEX = "\\p{Alnum}(?>[\\p{Alnum}-]{0,61}\\p{Alnum})?";
    157
    158    // RFC2396 toplabel = alpha | alpha *( alphanum | "-" ) alphanum
    159    // Max 63 characters
    160    private static final String TOP_LABEL_REGEX = "\\p{Alpha}(?>[\\p{Alnum}-]{0,61}\\p{Alnum})?";
    161
    162    /**
    163     * The above instances must only be returned via the getInstance() methods.
    164     * This is to ensure that the override data arrays are properly protected.
    165     */
    166
    167    // RFC2396 hostname = *( domainlabel "." ) toplabel [ "." ]
    168    // Note that the regex currently requires both a domain label and a top level label, whereas
    169    // the RFC does not. This is because the regex is used to detect if a TLD is present.
    170    // If the match fails, input is checked against DOMAIN_LABEL_REGEX (hostnameRegex)
    171    // RFC1123 sec 2.1 allows hostnames to start with a digit
    172    private static final String DOMAIN_NAME_REGEX =
    173            "^(?:" + DOMAIN_LABEL_REGEX + "\\.)+" + "(" + TOP_LABEL_REGEX + ")\\.?$";
    174    private static final String UNEXPECTED_ENUM_VALUE = "Unexpected enum value: ";
    175
    176    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    177    private static final String[] INFRASTRUCTURE_TLDS = {
    178        "arpa",               // internet infrastructure
    179    };
    180
    181    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    182    private static final String[] GENERIC_TLDS = {
    183        // Taken from Version 2024040200, Last Updated Tue Apr  2 07:07:02 2024 UTC
    184        "aaa", // aaa American Automobile Association, Inc.
    185        "aarp", // aarp AARP
    186        // "abarth", // abarth Fiat Chrysler Automobiles N.V.
    187        "abb", // abb ABB Ltd
    188        "abbott", // abbott Abbott Laboratories, Inc.
    189        "abbvie", // abbvie AbbVie Inc.
    190        "abc", // abc Disney Enterprises, Inc.
    191        "able", // able Able Inc.
    192        "abogado", // abogado Top Level Domain Holdings Limited
    193        "abudhabi", // abudhabi Abu Dhabi Systems and Information Centre
    194        "academy", // academy Half Oaks, LLC
    195        "accenture", // accenture Accenture plc
    196        "accountant", // accountant dot Accountant Limited
    197        "accountants", // accountants Knob Town, LLC
    198        "aco", // aco ACO Severin Ahlmann GmbH &amp; Co. KG
    199//        "active", // active The Active Network, Inc
    200        "actor", // actor United TLD Holdco Ltd.
    201//        "adac", // adac Allgemeiner Deutscher Automobil-Club e.V. (ADAC)
    202        "ads", // ads Charleston Road Registry Inc.
    203        "adult", // adult ICM Registry AD LLC
    204        "aeg", // aeg Aktiebolaget Electrolux
    205        "aero", // aero Societe Internationale de Telecommunications Aeronautique (SITA INC USA)
    206        "aetna", // aetna Aetna Life Insurance Company
    207//        "afamilycompany", // afamilycompany Johnson Shareholdings, Inc.
    208        "afl", // afl Australian Football League
    209        "africa", // africa ZA Central Registry NPC trading as Registry.Africa
    210        "agakhan", // agakhan Fondation Aga Khan (Aga Khan Foundation)
    211        "agency", // agency Steel Falls, LLC
    212        "aig", // aig American International Group, Inc.
    213//        "aigo", // aigo aigo Digital Technology Co,Ltd. [Not assigned as of Jul 25]
    214        "airbus", // airbus Airbus S.A.S.
    215        "airforce", // airforce United TLD Holdco Ltd.
    216        "airtel", // airtel Bharti Airtel Limited
    217        "akdn", // akdn Fondation Aga Khan (Aga Khan Foundation)
    218        // "alfaromeo", // alfaromeo Fiat Chrysler Automobiles N.V.
    219        "alibaba", // alibaba Alibaba Group Holding Limited
    220        "alipay", // alipay Alibaba Group Holding Limited
    221        "allfinanz", // allfinanz Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
    222        "allstate", // allstate Allstate Fire and Casualty Insurance Company
    223        "ally", // ally Ally Financial Inc.
    224        "alsace", // alsace REGION D ALSACE
    225        "alstom", // alstom ALSTOM
    226        "amazon", // amazon Amazon Registry Services, Inc.
    227        "americanexpress", // americanexpress American Express Travel Related Services Company, Inc.
    228        "americanfamily", // americanfamily AmFam, Inc.
    229        "amex", // amex American Express Travel Related Services Company, Inc.
    230        "amfam", // amfam AmFam, Inc.
    231        "amica", // amica Amica Mutual Insurance Company
    232        "amsterdam", // amsterdam Gemeente Amsterdam
    233        "analytics", // analytics Campus IP LLC
    234        "android", // android Charleston Road Registry Inc.
    235        "anquan", // anquan QIHOO 360 TECHNOLOGY CO. LTD.
    236        "anz", // anz Australia and New Zealand Banking Group Limited
    237        "aol", // aol AOL Inc.
    238        "apartments", // apartments June Maple, LLC
    239        "app", // app Charleston Road Registry Inc.
    240        "apple", // apple Apple Inc.
    241        "aquarelle", // aquarelle Aquarelle.com
    242        "arab", // arab League of Arab States
    243        "aramco", // aramco Aramco Services Company
    244        "archi", // archi STARTING DOT LIMITED
    245        "army", // army United TLD Holdco Ltd.
    246        "art", // art UK Creative Ideas Limited
    247        "arte", // arte Association Relative à la Télévision Européenne G.E.I.E.
    248        "asda", // asda Wal-Mart Stores, Inc.
    249        "asia", // asia DotAsia Organisation Ltd.
    250        "associates", // associates Baxter Hill, LLC
    251        "athleta", // athleta The Gap, Inc.
    252        "attorney", // attorney United TLD Holdco, Ltd
    253        "auction", // auction United TLD HoldCo, Ltd.
    254        "audi", // audi AUDI Aktiengesellschaft
    255        "audible", // audible Amazon Registry Services, Inc.
    256        "audio", // audio Uniregistry, Corp.
    257        "auspost", // auspost Australian Postal Corporation
    258        "author", // author Amazon Registry Services, Inc.
    259        "auto", // auto Uniregistry, Corp.
    260        "autos", // autos DERAutos, LLC
    261        // "avianca", // avianca Aerovias del Continente Americano S.A. Avianca
    262        "aws", // aws Amazon Registry Services, Inc.
    263        "axa", // axa AXA SA
    264        "azure", // azure Microsoft Corporation
    265        "baby", // baby Johnson &amp; Johnson Services, Inc.
    266        "baidu", // baidu Baidu, Inc.
    267        "banamex", // banamex Citigroup Inc.
    268        // "bananarepublic", // bananarepublic The Gap, Inc.
    269        "band", // band United TLD Holdco, Ltd
    270        "bank", // bank fTLD Registry Services, LLC
    271        "bar", // bar Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
    272        "barcelona", // barcelona Municipi de Barcelona
    273        "barclaycard", // barclaycard Barclays Bank PLC
    274        "barclays", // barclays Barclays Bank PLC
    275        "barefoot", // barefoot Gallo Vineyards, Inc.
    276        "bargains", // bargains Half Hallow, LLC
    277        "baseball", // baseball MLB Advanced Media DH, LLC
    278        "basketball", // basketball Fédération Internationale de Basketball (FIBA)
    279        "bauhaus", // bauhaus Werkhaus GmbH
    280        "bayern", // bayern Bayern Connect GmbH
    281        "bbc", // bbc British Broadcasting Corporation
    282        "bbt", // bbt BB&amp;T Corporation
    283        "bbva", // bbva BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
    284        "bcg", // bcg The Boston Consulting Group, Inc.
    285        "bcn", // bcn Municipi de Barcelona
    286        "beats", // beats Beats Electronics, LLC
    287        "beauty", // beauty L&#39;Oréal
    288        "beer", // beer Top Level Domain Holdings Limited
    289        "bentley", // bentley Bentley Motors Limited
    290        "berlin", // berlin dotBERLIN GmbH &amp; Co. KG
    291        "best", // best BestTLD Pty Ltd
    292        "bestbuy", // bestbuy BBY Solutions, Inc.
    293        "bet", // bet Afilias plc
    294        "bharti", // bharti Bharti Enterprises (Holding) Private Limited
    295        "bible", // bible American Bible Society
    296        "bid", // bid dot Bid Limited
    297        "bike", // bike Grand Hollow, LLC
    298        "bing", // bing Microsoft Corporation
    299        "bingo", // bingo Sand Cedar, LLC
    300        "bio", // bio STARTING DOT LIMITED
    301        "biz", // biz Neustar, Inc.
    302        "black", // black Afilias Limited
    303        "blackfriday", // blackfriday Uniregistry, Corp.
    304//        "blanco", // blanco BLANCO GmbH + Co KG
    305        "blockbuster", // blockbuster Dish DBS Corporation
    306        "blog", // blog Knock Knock WHOIS There, LLC
    307        "bloomberg", // bloomberg Bloomberg IP Holdings LLC
    308        "blue", // blue Afilias Limited
    309        "bms", // bms Bristol-Myers Squibb Company
    310        "bmw", // bmw Bayerische Motoren Werke Aktiengesellschaft
    311//        "bnl", // bnl Banca Nazionale del Lavoro
    312        "bnpparibas", // bnpparibas BNP Paribas
    313        "boats", // boats DERBoats, LLC
    314        "boehringer", // boehringer Boehringer Ingelheim International GmbH
    315        "bofa", // bofa NMS Services, Inc.
    316        "bom", // bom Núcleo de Informação e Coordenação do Ponto BR - NIC.br
    317        "bond", // bond Bond University Limited
    318        "boo", // boo Charleston Road Registry Inc.
    319        "book", // book Amazon Registry Services, Inc.
    320        "booking", // booking Booking.com B.V.
    321//        "boots", // boots THE BOOTS COMPANY PLC
    322        "bosch", // bosch Robert Bosch GMBH
    323        "bostik", // bostik Bostik SA
    324        "boston", // boston Boston TLD Management, LLC
    325        "bot", // bot Amazon Registry Services, Inc.
    326        "boutique", // boutique Over Galley, LLC
    327        "box", // box NS1 Limited
    328        "bradesco", // bradesco Banco Bradesco S.A.
    329        "bridgestone", // bridgestone Bridgestone Corporation
    330        "broadway", // broadway Celebrate Broadway, Inc.
    331        "broker", // broker DOTBROKER REGISTRY LTD
    332        "brother", // brother Brother Industries, Ltd.
    333        "brussels", // brussels DNS.be vzw
    334//        "budapest", // budapest Top Level Domain Holdings Limited
    335//        "bugatti", // bugatti Bugatti International SA
    336        "build", // build Plan Bee LLC
    337        "builders", // builders Atomic Madison, LLC
    338        "business", // business Spring Cross, LLC
    339        "buy", // buy Amazon Registry Services, INC
    340        "buzz", // buzz DOTSTRATEGY CO.
    341        "bzh", // bzh Association www.bzh
    342        "cab", // cab Half Sunset, LLC
    343        "cafe", // cafe Pioneer Canyon, LLC
    344        "cal", // cal Charleston Road Registry Inc.
    345        "call", // call Amazon Registry Services, Inc.
    346        "calvinklein", // calvinklein PVH gTLD Holdings LLC
    347        "cam", // cam AC Webconnecting Holding B.V.
    348        "camera", // camera Atomic Maple, LLC
    349        "camp", // camp Delta Dynamite, LLC
    350//        "cancerresearch", // cancerresearch Australian Cancer Research Foundation
    351        "canon", // canon Canon Inc.
    352        "capetown", // capetown ZA Central Registry NPC trading as ZA Central Registry
    353        "capital", // capital Delta Mill, LLC
    354        "capitalone", // capitalone Capital One Financial Corporation
    355        "car", // car Cars Registry Limited
    356        "caravan", // caravan Caravan International, Inc.
    357        "cards", // cards Foggy Hollow, LLC
    358        "care", // care Goose Cross, LLC
    359        "career", // career dotCareer LLC
    360        "careers", // careers Wild Corner, LLC
    361        "cars", // cars Uniregistry, Corp.
    362//        "cartier", // cartier Richemont DNS Inc.
    363        "casa", // casa Top Level Domain Holdings Limited
    364        "case", // case CNH Industrial N.V.
    365//        "caseih", // caseih CNH Industrial N.V.
    366        "cash", // cash Delta Lake, LLC
    367        "casino", // casino Binky Sky, LLC
    368        "cat", // cat Fundacio puntCAT
    369        "catering", // catering New Falls. LLC
    370        "catholic", // catholic Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
    371        "cba", // cba COMMONWEALTH BANK OF AUSTRALIA
    372        "cbn", // cbn The Christian Broadcasting Network, Inc.
    373        "cbre", // cbre CBRE, Inc.
    374        // "cbs", // cbs CBS Domains Inc.
    375//        "ceb", // ceb The Corporate Executive Board Company
    376        "center", // center Tin Mill, LLC
    377        "ceo", // ceo CEOTLD Pty Ltd
    378        "cern", // cern European Organization for Nuclear Research (&quot;CERN&quot;)
    379        "cfa", // cfa CFA Institute
    380        "cfd", // cfd DOTCFD REGISTRY LTD
    381        "chanel", // chanel Chanel International B.V.
    382        "channel", // channel Charleston Road Registry Inc.
    383        "charity", // charity Corn Lake, LLC
    384        "chase", // chase JPMorgan Chase &amp; Co.
    385        "chat", // chat Sand Fields, LLC
    386        "cheap", // cheap Sand Cover, LLC
    387        "chintai", // chintai CHINTAI Corporation
    388//        "chloe", // chloe Richemont DNS Inc. (Not assigned)
    389        "christmas", // christmas Uniregistry, Corp.
    390        "chrome", // chrome Charleston Road Registry Inc.
    391//        "chrysler", // chrysler FCA US LLC.
    392        "church", // church Holly Fileds, LLC
    393        "cipriani", // cipriani Hotel Cipriani Srl
    394        "circle", // circle Amazon Registry Services, Inc.
    395        "cisco", // cisco Cisco Technology, Inc.
    396        "citadel", // citadel Citadel Domain LLC
    397        "citi", // citi Citigroup Inc.
    398        "citic", // citic CITIC Group Corporation
    399        "city", // city Snow Sky, LLC
    400        // "cityeats", // cityeats Lifestyle Domain Holdings, Inc.
    401        "claims", // claims Black Corner, LLC
    402        "cleaning", // cleaning Fox Shadow, LLC
    403        "click", // click Uniregistry, Corp.
    404        "clinic", // clinic Goose Park, LLC
    405        "clinique", // clinique The Estée Lauder Companies Inc.
    406        "clothing", // clothing Steel Lake, LLC
    407        "cloud", // cloud ARUBA S.p.A.
    408        "club", // club .CLUB DOMAINS, LLC
    409        "clubmed", // clubmed Club Méditerranée S.A.
    410        "coach", // coach Koko Island, LLC
    411        "codes", // codes Puff Willow, LLC
    412        "coffee", // coffee Trixy Cover, LLC
    413        "college", // college XYZ.COM LLC
    414        "cologne", // cologne NetCologne Gesellschaft für Telekommunikation mbH
    415        "com", // com VeriSign Global Registry Services
    416        // "comcast", // comcast Comcast IP Holdings I, LLC
    417        "commbank", // commbank COMMONWEALTH BANK OF AUSTRALIA
    418        "community", // community Fox Orchard, LLC
    419        "company", // company Silver Avenue, LLC
    420        "compare", // compare iSelect Ltd
    421        "computer", // computer Pine Mill, LLC
    422        "comsec", // comsec VeriSign, Inc.
    423        "condos", // condos Pine House, LLC
    424        "construction", // construction Fox Dynamite, LLC
    425        "consulting", // consulting United TLD Holdco, LTD.
    426        "contact", // contact Top Level Spectrum, Inc.
    427        "contractors", // contractors Magic Woods, LLC
    428        "cooking", // cooking Top Level Domain Holdings Limited
    429        // "cookingchannel", // cookingchannel Lifestyle Domain Holdings, Inc.
    430        "cool", // cool Koko Lake, LLC
    431        "coop", // coop DotCooperation LLC
    432        "corsica", // corsica Collectivité Territoriale de Corse
    433        "country", // country Top Level Domain Holdings Limited
    434        "coupon", // coupon Amazon Registry Services, Inc.
    435        "coupons", // coupons Black Island, LLC
    436        "courses", // courses OPEN UNIVERSITIES AUSTRALIA PTY LTD
    437        "cpa", // cpa American Institute of Certified Public Accountants
    438        "credit", // credit Snow Shadow, LLC
    439        "creditcard", // creditcard Binky Frostbite, LLC
    440        "creditunion", // creditunion CUNA Performance Resources, LLC
    441        "cricket", // cricket dot Cricket Limited
    442        "crown", // crown Crown Equipment Corporation
    443        "crs", // crs Federated Co-operatives Limited
    444        "cruise", // cruise Viking River Cruises (Bermuda) Ltd.
    445        "cruises", // cruises Spring Way, LLC
    446//        "csc", // csc Alliance-One Services, Inc.
    447        "cuisinella", // cuisinella SALM S.A.S.
    448        "cymru", // cymru Nominet UK
    449        "cyou", // cyou Beijing Gamease Age Digital Technology Co., Ltd.
    450        "dabur", // dabur Dabur India Limited
    451        "dad", // dad Charleston Road Registry Inc.
    452        "dance", // dance United TLD Holdco Ltd.
    453        "data", // data Dish DBS Corporation
    454        "date", // date dot Date Limited
    455        "dating", // dating Pine Fest, LLC
    456        "datsun", // datsun NISSAN MOTOR CO., LTD.
    457        "day", // day Charleston Road Registry Inc.
    458        "dclk", // dclk Charleston Road Registry Inc.
    459        "dds", // dds Minds + Machines Group Limited
    460        "deal", // deal Amazon Registry Services, Inc.
    461        "dealer", // dealer Dealer Dot Com, Inc.
    462        "deals", // deals Sand Sunset, LLC
    463        "degree", // degree United TLD Holdco, Ltd
    464        "delivery", // delivery Steel Station, LLC
    465        "dell", // dell Dell Inc.
    466        "deloitte", // deloitte Deloitte Touche Tohmatsu
    467        "delta", // delta Delta Air Lines, Inc.
    468        "democrat", // democrat United TLD Holdco Ltd.
    469        "dental", // dental Tin Birch, LLC
    470        "dentist", // dentist United TLD Holdco, Ltd
    471        "desi", // desi Desi Networks LLC
    472        "design", // design Top Level Design, LLC
    473        "dev", // dev Charleston Road Registry Inc.
    474        "dhl", // dhl Deutsche Post AG
    475        "diamonds", // diamonds John Edge, LLC
    476        "diet", // diet Uniregistry, Corp.
    477        "digital", // digital Dash Park, LLC
    478        "direct", // direct Half Trail, LLC
    479        "directory", // directory Extra Madison, LLC
    480        "discount", // discount Holly Hill, LLC
    481        "discover", // discover Discover Financial Services
    482        "dish", // dish Dish DBS Corporation
    483        "diy", // diy Lifestyle Domain Holdings, Inc.
    484        "dnp", // dnp Dai Nippon Printing Co., Ltd.
    485        "docs", // docs Charleston Road Registry Inc.
    486        "doctor", // doctor Brice Trail, LLC
    487//        "dodge", // dodge FCA US LLC.
    488        "dog", // dog Koko Mill, LLC
    489//        "doha", // doha Communications Regulatory Authority (CRA)
    490        "domains", // domains Sugar Cross, LLC
    491//            "doosan", // doosan Doosan Corporation (retired)
    492        "dot", // dot Dish DBS Corporation
    493        "download", // download dot Support Limited
    494        "drive", // drive Charleston Road Registry Inc.
    495        "dtv", // dtv Dish DBS Corporation
    496        "dubai", // dubai Dubai Smart Government Department
    497//        "duck", // duck Johnson Shareholdings, Inc.
    498        "dunlop", // dunlop The Goodyear Tire &amp; Rubber Company
    499//        "duns", // duns The Dun &amp; Bradstreet Corporation
    500        "dupont", // dupont E. I. du Pont de Nemours and Company
    501        "durban", // durban ZA Central Registry NPC trading as ZA Central Registry
    502        "dvag", // dvag Deutsche Vermögensberatung Aktiengesellschaft DVAG
    503        "dvr", // dvr Hughes Satellite Systems Corporation
    504        "earth", // earth Interlink Co., Ltd.
    505        "eat", // eat Charleston Road Registry Inc.
    506        "eco", // eco Big Room Inc.
    507        "edeka", // edeka EDEKA Verband kaufmännischer Genossenschaften e.V.
    508        "edu", // edu EDUCAUSE
    509        "education", // education Brice Way, LLC
    510        "email", // email Spring Madison, LLC
    511        "emerck", // emerck Merck KGaA
    512        "energy", // energy Binky Birch, LLC
    513        "engineer", // engineer United TLD Holdco Ltd.
    514        "engineering", // engineering Romeo Canyon
    515        "enterprises", // enterprises Snow Oaks, LLC
    516//        "epost", // epost Deutsche Post AG
    517        "epson", // epson Seiko Epson Corporation
    518        "equipment", // equipment Corn Station, LLC
    519        "ericsson", // ericsson Telefonaktiebolaget L M Ericsson
    520        "erni", // erni ERNI Group Holding AG
    521        "esq", // esq Charleston Road Registry Inc.
    522        "estate", // estate Trixy Park, LLC
    523        // "esurance", // esurance Esurance Insurance Company (not assigned as at Version 2020062100)
    524        // "etisalat", // etisalat Emirates Telecommunic
    525        "eurovision", // eurovision European Broadcasting Union (EBU)
    526        "eus", // eus Puntueus Fundazioa
    527        "events", // events Pioneer Maple, LLC
    528//        "everbank", // everbank EverBank
    529        "exchange", // exchange Spring Falls, LLC
    530        "expert", // expert Magic Pass, LLC
    531        "exposed", // exposed Victor Beach, LLC
    532        "express", // express Sea Sunset, LLC
    533        "extraspace", // extraspace Extra Space Storage LLC
    534        "fage", // fage Fage International S.A.
    535        "fail", // fail Atomic Pipe, LLC
    536        "fairwinds", // fairwinds FairWinds Partners, LLC
    537        "faith", // faith dot Faith Limited
    538        "family", // family United TLD Holdco Ltd.
    539        "fan", // fan Asiamix Digital Ltd
    540        "fans", // fans Asiamix Digital Limited
    541        "farm", // farm Just Maple, LLC
    542        "farmers", // farmers Farmers Insurance Exchange
    543        "fashion", // fashion Top Level Domain Holdings Limited
    544        "fast", // fast Amazon Registry Services, Inc.
    545        "fedex", // fedex Federal Express Corporation
    546        "feedback", // feedback Top Level Spectrum, Inc.
    547        "ferrari", // ferrari Fiat Chrysler Automobiles N.V.
    548        "ferrero", // ferrero Ferrero Trading Lux S.A.
    549        // "fiat", // fiat Fiat Chrysler Automobiles N.V.
    550        "fidelity", // fidelity Fidelity Brokerage Services LLC
    551        "fido", // fido Rogers Communications Canada Inc.
    552        "film", // film Motion Picture Domain Registry Pty Ltd
    553        "final", // final Núcleo de Informação e Coordenação do Ponto BR - NIC.br
    554        "finance", // finance Cotton Cypress, LLC
    555        "financial", // financial Just Cover, LLC
    556        "fire", // fire Amazon Registry Services, Inc.
    557        "firestone", // firestone Bridgestone Corporation
    558        "firmdale", // firmdale Firmdale Holdings Limited
    559        "fish", // fish Fox Woods, LLC
    560        "fishing", // fishing Top Level Domain Holdings Limited
    561        "fit", // fit Minds + Machines Group Limited
    562        "fitness", // fitness Brice Orchard, LLC
    563        "flickr", // flickr Yahoo! Domain Services Inc.
    564        "flights", // flights Fox Station, LLC
    565        "flir", // flir FLIR Systems, Inc.
    566        "florist", // florist Half Cypress, LLC
    567        "flowers", // flowers Uniregistry, Corp.
    568//        "flsmidth", // flsmidth FLSmidth A/S retired 2016-07-22
    569        "fly", // fly Charleston Road Registry Inc.
    570        "foo", // foo Charleston Road Registry Inc.
    571        "food", // food Lifestyle Domain Holdings, Inc.
    572        // "foodnetwork", // foodnetwork Lifestyle Domain Holdings, Inc.
    573        "football", // football Foggy Farms, LLC
    574        "ford", // ford Ford Motor Company
    575        "forex", // forex DOTFOREX REGISTRY LTD
    576        "forsale", // forsale United TLD Holdco, LLC
    577        "forum", // forum Fegistry, LLC
    578        "foundation", // foundation John Dale, LLC
    579        "fox", // fox FOX Registry, LLC
    580        "free", // free Amazon Registry Services, Inc.
    581        "fresenius", // fresenius Fresenius Immobilien-Verwaltungs-GmbH
    582        "frl", // frl FRLregistry B.V.
    583        "frogans", // frogans OP3FT
    584        // "frontdoor", // frontdoor Lifestyle Domain Holdings, Inc.
    585        "frontier", // frontier Frontier Communications Corporation
    586        "ftr", // ftr Frontier Communications Corporation
    587        "fujitsu", // fujitsu Fujitsu Limited
    588//        "fujixerox", // fujixerox Xerox DNHC LLC
    589        "fun", // fun DotSpace, Inc.
    590        "fund", // fund John Castle, LLC
    591        "furniture", // furniture Lone Fields, LLC
    592        "futbol", // futbol United TLD Holdco, Ltd.
    593        "fyi", // fyi Silver Tigers, LLC
    594        "gal", // gal Asociación puntoGAL
    595        "gallery", // gallery Sugar House, LLC
    596        "gallo", // gallo Gallo Vineyards, Inc.
    597        "gallup", // gallup Gallup, Inc.
    598        "game", // game Uniregistry, Corp.
    599        "games", // games United TLD Holdco Ltd.
    600        "gap", // gap The Gap, Inc.
    601        "garden", // garden Top Level Domain Holdings Limited
    602        "gay", // gay Top Level Design, LLC
    603        "gbiz", // gbiz Charleston Road Registry Inc.
    604        "gdn", // gdn Joint Stock Company "Navigation-information systems"
    605        "gea", // gea GEA Group Aktiengesellschaft
    606        "gent", // gent COMBELL GROUP NV/SA
    607        "genting", // genting Resorts World Inc. Pte. Ltd.
    608        "george", // george Wal-Mart Stores, Inc.
    609        "ggee", // ggee GMO Internet, Inc.
    610        "gift", // gift Uniregistry, Corp.
    611        "gifts", // gifts Goose Sky, LLC
    612        "gives", // gives United TLD Holdco Ltd.
    613        "giving", // giving Giving Limited
    614//        "glade", // glade Johnson Shareholdings, Inc.
    615        "glass", // glass Black Cover, LLC
    616        "gle", // gle Charleston Road Registry Inc.
    617        "global", // global Dot Global Domain Registry Limited
    618        "globo", // globo Globo Comunicação e Participações S.A
    619        "gmail", // gmail Charleston Road Registry Inc.
    620        "gmbh", // gmbh Extra Dynamite, LLC
    621        "gmo", // gmo GMO Internet, Inc.
    622        "gmx", // gmx 1&amp;1 Mail &amp; Media GmbH
    623        "godaddy", // godaddy Go Daddy East, LLC
    624        "gold", // gold June Edge, LLC
    625        "goldpoint", // goldpoint YODOBASHI CAMERA CO.,LTD.
    626        "golf", // golf Lone Falls, LLC
    627        "goo", // goo NTT Resonant Inc.
    628//        "goodhands", // goodhands Allstate Fire and Casualty Insurance Company
    629        "goodyear", // goodyear The Goodyear Tire &amp; Rubber Company
    630        "goog", // goog Charleston Road Registry Inc.
    631        "google", // google Charleston Road Registry Inc.
    632        "gop", // gop Republican State Leadership Committee, Inc.
    633        "got", // got Amazon Registry Services, Inc.
    634        "gov", // gov General Services Administration Attn: QTDC, 2E08 (.gov Domain Registration)
    635        "grainger", // grainger Grainger Registry Services, LLC
    636        "graphics", // graphics Over Madison, LLC
    637        "gratis", // gratis Pioneer Tigers, LLC
    638        "green", // green Afilias Limited
    639        "gripe", // gripe Corn Sunset, LLC
    640        "grocery", // grocery Wal-Mart Stores, Inc.
    641        "group", // group Romeo Town, LLC
    642        // "guardian", // guardian The Guardian Life Insurance Company of America
    643        "gucci", // gucci Guccio Gucci S.p.a.
    644        "guge", // guge Charleston Road Registry Inc.
    645        "guide", // guide Snow Moon, LLC
    646        "guitars", // guitars Uniregistry, Corp.
    647        "guru", // guru Pioneer Cypress, LLC
    648        "hair", // hair L&#39;Oreal
    649        "hamburg", // hamburg Hamburg Top-Level-Domain GmbH
    650        "hangout", // hangout Charleston Road Registry Inc.
    651        "haus", // haus United TLD Holdco, LTD.
    652        "hbo", // hbo HBO Registry Services, Inc.
    653        "hdfc", // hdfc HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
    654        "hdfcbank", // hdfcbank HDFC Bank Limited
    655        "health", // health DotHealth, LLC
    656        "healthcare", // healthcare Silver Glen, LLC
    657        "help", // help Uniregistry, Corp.
    658        "helsinki", // helsinki City of Helsinki
    659        "here", // here Charleston Road Registry Inc.
    660        "hermes", // hermes Hermes International
    661        // "hgtv", // hgtv Lifestyle Domain Holdings, Inc.
    662        "hiphop", // hiphop Uniregistry, Corp.
    663        "hisamitsu", // hisamitsu Hisamitsu Pharmaceutical Co.,Inc.
    664        "hitachi", // hitachi Hitachi, Ltd.
    665        "hiv", // hiv dotHIV gemeinnuetziger e.V.
    666        "hkt", // hkt PCCW-HKT DataCom Services Limited
    667        "hockey", // hockey Half Willow, LLC
    668        "holdings", // holdings John Madison, LLC
    669        "holiday", // holiday Goose Woods, LLC
    670        "homedepot", // homedepot Homer TLC, Inc.
    671        "homegoods", // homegoods The TJX Companies, Inc.
    672        "homes", // homes DERHomes, LLC
    673        "homesense", // homesense The TJX Companies, Inc.
    674        "honda", // honda Honda Motor Co., Ltd.
    675//        "honeywell", // honeywell Honeywell GTLD LLC
    676        "horse", // horse Top Level Domain Holdings Limited
    677        "hospital", // hospital Ruby Pike, LLC
    678        "host", // host DotHost Inc.
    679        "hosting", // hosting Uniregistry, Corp.
    680        "hot", // hot Amazon Registry Services, Inc.
    681        // "hoteles", // hoteles Travel Reservations SRL
    682        "hotels", // hotels Booking.com B.V.
    683        "hotmail", // hotmail Microsoft Corporation
    684        "house", // house Sugar Park, LLC
    685        "how", // how Charleston Road Registry Inc.
    686        "hsbc", // hsbc HSBC Holdings PLC
    687//        "htc", // htc HTC corporation (Not assigned)
    688        "hughes", // hughes Hughes Satellite Systems Corporation
    689        "hyatt", // hyatt Hyatt GTLD, L.L.C.
    690        "hyundai", // hyundai Hyundai Motor Company
    691        "ibm", // ibm International Business Machines Corporation
    692        "icbc", // icbc Industrial and Commercial Bank of China Limited
    693        "ice", // ice IntercontinentalExchange, Inc.
    694        "icu", // icu One.com A/S
    695        "ieee", // ieee IEEE Global LLC
    696        "ifm", // ifm ifm electronic gmbh
    697//        "iinet", // iinet Connect West Pty. Ltd. (Retired)
    698        "ikano", // ikano Ikano S.A.
    699        "imamat", // imamat Fondation Aga Khan (Aga Khan Foundation)
    700        "imdb", // imdb Amazon Registry Services, Inc.
    701        "immo", // immo Auburn Bloom, LLC
    702        "immobilien", // immobilien United TLD Holdco Ltd.
    703        "inc", // inc Intercap Holdings Inc.
    704        "industries", // industries Outer House, LLC
    705        "infiniti", // infiniti NISSAN MOTOR CO., LTD.
    706        "info", // info Afilias Limited
    707        "ing", // ing Charleston Road Registry Inc.
    708        "ink", // ink Top Level Design, LLC
    709        "institute", // institute Outer Maple, LLC
    710        "insurance", // insurance fTLD Registry Services LLC
    711        "insure", // insure Pioneer Willow, LLC
    712        "int", // int Internet Assigned Numbers Authority
    713//        "intel", // intel Intel Corporation
    714        "international", // international Wild Way, LLC
    715        "intuit", // intuit Intuit Administrative Services, Inc.
    716        "investments", // investments Holly Glen, LLC
    717        "ipiranga", // ipiranga Ipiranga Produtos de Petroleo S.A.
    718        "irish", // irish Dot-Irish LLC
    719//        "iselect", // iselect iSelect Ltd
    720        "ismaili", // ismaili Fondation Aga Khan (Aga Khan Foundation)
    721        "ist", // ist Istanbul Metropolitan Municipality
    722        "istanbul", // istanbul Istanbul Metropolitan Municipality / Medya A.S.
    723        "itau", // itau Itau Unibanco Holding S.A.
    724        "itv", // itv ITV Services Limited
    725//        "iveco", // iveco CNH Industrial N.V.
    726//        "iwc", // iwc Richemont DNS Inc.
    727        "jaguar", // jaguar Jaguar Land Rover Ltd
    728        "java", // java Oracle Corporation
    729        "jcb", // jcb JCB Co., Ltd.
    730//        "jcp", // jcp JCP Media, Inc.
    731        "jeep", // jeep FCA US LLC.
    732        "jetzt", // jetzt New TLD Company AB
    733        "jewelry", // jewelry Wild Bloom, LLC
    734        "jio", // jio Affinity Names, Inc.
    735//        "jlc", // jlc Richemont DNS Inc.
    736        "jll", // jll Jones Lang LaSalle Incorporated
    737        "jmp", // jmp Matrix IP LLC
    738        "jnj", // jnj Johnson &amp; Johnson Services, Inc.
    739        "jobs", // jobs Employ Media LLC
    740        "joburg", // joburg ZA Central Registry NPC trading as ZA Central Registry
    741        "jot", // jot Amazon Registry Services, Inc.
    742        "joy", // joy Amazon Registry Services, Inc.
    743        "jpmorgan", // jpmorgan JPMorgan Chase &amp; Co.
    744        "jprs", // jprs Japan Registry Services Co., Ltd.
    745        "juegos", // juegos Uniregistry, Corp.
    746        "juniper", // juniper JUNIPER NETWORKS, INC.
    747        "kaufen", // kaufen United TLD Holdco Ltd.
    748        "kddi", // kddi KDDI CORPORATION
    749        "kerryhotels", // kerryhotels Kerry Trading Co. Limited
    750        "kerrylogistics", // kerrylogistics Kerry Trading Co. Limited
    751        "kerryproperties", // kerryproperties Kerry Trading Co. Limited
    752        "kfh", // kfh Kuwait Finance House
    753        "kia", // kia KIA MOTORS CORPORATION
    754        "kids", // kids DotKids Foundation Limited
    755        "kim", // kim Afilias Limited
    756        // "kinder", // kinder Ferrero Trading Lux S.A.
    757        "kindle", // kindle Amazon Registry Services, Inc.
    758        "kitchen", // kitchen Just Goodbye, LLC
    759        "kiwi", // kiwi DOT KIWI LIMITED
    760        "koeln", // koeln NetCologne Gesellschaft für Telekommunikation mbH
    761        "komatsu", // komatsu Komatsu Ltd.
    762        "kosher", // kosher Kosher Marketing Assets LLC
    763        "kpmg", // kpmg KPMG International Cooperative (KPMG International Genossenschaft)
    764        "kpn", // kpn Koninklijke KPN N.V.
    765        "krd", // krd KRG Department of Information Technology
    766        "kred", // kred KredTLD Pty Ltd
    767        "kuokgroup", // kuokgroup Kerry Trading Co. Limited
    768        "kyoto", // kyoto Academic Institution: Kyoto Jyoho Gakuen
    769        "lacaixa", // lacaixa CAIXA D&#39;ESTALVIS I PENSIONS DE BARCELONA
    770//        "ladbrokes", // ladbrokes LADBROKES INTERNATIONAL PLC
    771        "lamborghini", // lamborghini Automobili Lamborghini S.p.A.
    772        "lamer", // lamer The Estée Lauder Companies Inc.
    773        "lancaster", // lancaster LANCASTER
    774        // "lancia", // lancia Fiat Chrysler Automobiles N.V.
    775//        "lancome", // lancome L&#39;Oréal
    776        "land", // land Pine Moon, LLC
    777        "landrover", // landrover Jaguar Land Rover Ltd
    778        "lanxess", // lanxess LANXESS Corporation
    779        "lasalle", // lasalle Jones Lang LaSalle Incorporated
    780        "lat", // lat ECOM-LAC Federación de Latinoamérica y el Caribe para Internet y el Comercio Electrónico
    781        "latino", // latino Dish DBS Corporation
    782        "latrobe", // latrobe La Trobe University
    783        "law", // law Minds + Machines Group Limited
    784        "lawyer", // lawyer United TLD Holdco, Ltd
    785        "lds", // lds IRI Domain Management, LLC
    786        "lease", // lease Victor Trail, LLC
    787        "leclerc", // leclerc A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
    788        "lefrak", // lefrak LeFrak Organization, Inc.
    789        "legal", // legal Blue Falls, LLC
    790        "lego", // lego LEGO Juris A/S
    791        "lexus", // lexus TOYOTA MOTOR CORPORATION
    792        "lgbt", // lgbt Afilias Limited
    793//        "liaison", // liaison Liaison Technologies, Incorporated
    794        "lidl", // lidl Schwarz Domains und Services GmbH &amp; Co. KG
    795        "life", // life Trixy Oaks, LLC
    796        "lifeinsurance", // lifeinsurance American Council of Life Insurers
    797        "lifestyle", // lifestyle Lifestyle Domain Holdings, Inc.
    798        "lighting", // lighting John McCook, LLC
    799        "like", // like Amazon Registry Services, Inc.
    800        "lilly", // lilly Eli Lilly and Company
    801        "limited", // limited Big Fest, LLC
    802        "limo", // limo Hidden Frostbite, LLC
    803        "lincoln", // lincoln Ford Motor Company
    804        // "linde", // linde Linde Aktiengesellschaft
    805        "link", // link Uniregistry, Corp.
    806        "lipsy", // lipsy Lipsy Ltd
    807        "live", // live United TLD Holdco Ltd.
    808        "living", // living Lifestyle Domain Holdings, Inc.
    809//        "lixil", // lixil LIXIL Group Corporation
    810        "llc", // llc Afilias plc
    811        "llp", // llp Dot Registry LLC
    812        "loan", // loan dot Loan Limited
    813        "loans", // loans June Woods, LLC
    814        "locker", // locker Dish DBS Corporation
    815        "locus", // locus Locus Analytics LLC
    816//        "loft", // loft Annco, Inc.
    817        "lol", // lol Uniregistry, Corp.
    818        "london", // london Dot London Domains Limited
    819        "lotte", // lotte Lotte Holdings Co., Ltd.
    820        "lotto", // lotto Afilias Limited
    821        "love", // love Merchant Law Group LLP
    822        "lpl", // lpl LPL Holdings, Inc.
    823        "lplfinancial", // lplfinancial LPL Holdings, Inc.
    824        "ltd", // ltd Over Corner, LLC
    825        "ltda", // ltda InterNetX Corp.
    826        "lundbeck", // lundbeck H. Lundbeck A/S
    827//        "lupin", // lupin LUPIN LIMITED
    828        "luxe", // luxe Top Level Domain Holdings Limited
    829        "luxury", // luxury Luxury Partners LLC
    830        // "macys", // macys Macys, Inc.
    831        "madrid", // madrid Comunidad de Madrid
    832        "maif", // maif Mutuelle Assurance Instituteur France (MAIF)
    833        "maison", // maison Victor Frostbite, LLC
    834        "makeup", // makeup L&#39;Oréal
    835        "man", // man MAN SE
    836        "management", // management John Goodbye, LLC
    837        "mango", // mango PUNTO FA S.L.
    838        "map", // map Charleston Road Registry Inc.
    839        "market", // market Unitied TLD Holdco, Ltd
    840        "marketing", // marketing Fern Pass, LLC
    841        "markets", // markets DOTMARKETS REGISTRY LTD
    842        "marriott", // marriott Marriott Worldwide Corporation
    843        "marshalls", // marshalls The TJX Companies, Inc.
    844        // "maserati", // maserati Fiat Chrysler Automobiles N.V.
    845        "mattel", // mattel Mattel Sites, Inc.
    846        "mba", // mba Lone Hollow, LLC
    847//        "mcd", // mcd McDonald’s Corporation (Not assigned)
    848//        "mcdonalds", // mcdonalds McDonald’s Corporation (Not assigned)
    849        "mckinsey", // mckinsey McKinsey Holdings, Inc.
    850        "med", // med Medistry LLC
    851        "media", // media Grand Glen, LLC
    852        "meet", // meet Afilias Limited
    853        "melbourne", // melbourne The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
    854        "meme", // meme Charleston Road Registry Inc.
    855        "memorial", // memorial Dog Beach, LLC
    856        "men", // men Exclusive Registry Limited
    857        "menu", // menu Wedding TLD2, LLC
    858//        "meo", // meo PT Comunicacoes S.A.
    859        "merckmsd", // merckmsd MSD Registry Holdings, Inc.
    860//        "metlife", // metlife MetLife Services and Solutions, LLC
    861        "miami", // miami Top Level Domain Holdings Limited
    862        "microsoft", // microsoft Microsoft Corporation
    863        "mil", // mil DoD Network Information Center
    864        "mini", // mini Bayerische Motoren Werke Aktiengesellschaft
    865        "mint", // mint Intuit Administrative Services, Inc.
    866        "mit", // mit Massachusetts Institute of Technology
    867        "mitsubishi", // mitsubishi Mitsubishi Corporation
    868        "mlb", // mlb MLB Advanced Media DH, LLC
    869        "mls", // mls The Canadian Real Estate Association
    870        "mma", // mma MMA IARD
    871        "mobi", // mobi Afilias Technologies Limited dba dotMobi
    872        "mobile", // mobile Dish DBS Corporation
    873//        "mobily", // mobily GreenTech Consultancy Company W.L.L.
    874        "moda", // moda United TLD Holdco Ltd.
    875        "moe", // moe Interlink Co., Ltd.
    876        "moi", // moi Amazon Registry Services, Inc.
    877        "mom", // mom Uniregistry, Corp.
    878        "monash", // monash Monash University
    879        "money", // money Outer McCook, LLC
    880        "monster", // monster Monster Worldwide, Inc.
    881//        "montblanc", // montblanc Richemont DNS Inc. (Not assigned)
    882//        "mopar", // mopar FCA US LLC.
    883        "mormon", // mormon IRI Domain Management, LLC (&quot;Applicant&quot;)
    884        "mortgage", // mortgage United TLD Holdco, Ltd
    885        "moscow", // moscow Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
    886        "moto", // moto Motorola Trademark Holdings, LLC
    887        "motorcycles", // motorcycles DERMotorcycles, LLC
    888        "mov", // mov Charleston Road Registry Inc.
    889        "movie", // movie New Frostbite, LLC
    890//        "movistar", // movistar Telefónica S.A.
    891        "msd", // msd MSD Registry Holdings, Inc.
    892        "mtn", // mtn MTN Dubai Limited
    893//        "mtpc", // mtpc Mitsubishi Tanabe Pharma Corporation (Retired)
    894        "mtr", // mtr MTR Corporation Limited
    895        "museum", // museum Museum Domain Management Association
    896        "music", // music DotMusic Limited
    897        // "mutual", // mutual Northwestern Mutual MU TLD Registry, LLC
    898//        "mutuelle", // mutuelle Fédération Nationale de la Mutualité Française (Retired)
    899        "nab", // nab National Australia Bank Limited
    900//        "nadex", // nadex Nadex Domains, Inc
    901        "nagoya", // nagoya GMO Registry, Inc.
    902        "name", // name VeriSign Information Services, Inc.
    903//        "nationwide", // nationwide Nationwide Mutual Insurance Company
    904        "natura", // natura NATURA COSMÉTICOS S.A.
    905        "navy", // navy United TLD Holdco Ltd.
    906        "nba", // nba NBA REGISTRY, LLC
    907        "nec", // nec NEC Corporation
    908        "net", // net VeriSign Global Registry Services
    909        "netbank", // netbank COMMONWEALTH BANK OF AUSTRALIA
    910        "netflix", // netflix Netflix, Inc.
    911        "network", // network Trixy Manor, LLC
    912        "neustar", // neustar NeuStar, Inc.
    913        "new", // new Charleston Road Registry Inc.
    914//        "newholland", // newholland CNH Industrial N.V.
    915        "news", // news United TLD Holdco Ltd.
    916        "next", // next Next plc
    917        "nextdirect", // nextdirect Next plc
    918        "nexus", // nexus Charleston Road Registry Inc.
    919        "nfl", // nfl NFL Reg Ops LLC
    920        "ngo", // ngo Public Interest Registry
    921        "nhk", // nhk Japan Broadcasting Corporation (NHK)
    922        "nico", // nico DWANGO Co., Ltd.
    923        "nike", // nike NIKE, Inc.
    924        "nikon", // nikon NIKON CORPORATION
    925        "ninja", // ninja United TLD Holdco Ltd.
    926        "nissan", // nissan NISSAN MOTOR CO., LTD.
    927        "nissay", // nissay Nippon Life Insurance Company
    928        "nokia", // nokia Nokia Corporation
    929        // "northwesternmutual", // northwesternmutual Northwestern Mutual Registry, LLC
    930        "norton", // norton Symantec Corporation
    931        "now", // now Amazon Registry Services, Inc.
    932        "nowruz", // nowruz Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
    933        "nowtv", // nowtv Starbucks (HK) Limited
    934        "nra", // nra NRA Holdings Company, INC.
    935        "nrw", // nrw Minds + Machines GmbH
    936        "ntt", // ntt NIPPON TELEGRAPH AND TELEPHONE CORPORATION
    937        "nyc", // nyc The City of New York by and through the New York City Department of Information Technology &amp; Telecommunications
    938        "obi", // obi OBI Group Holding SE &amp; Co. KGaA
    939        "observer", // observer Top Level Spectrum, Inc.
    940//        "off", // off Johnson Shareholdings, Inc.
    941        "office", // office Microsoft Corporation
    942        "okinawa", // okinawa BusinessRalliart inc.
    943        "olayan", // olayan Crescent Holding GmbH
    944        "olayangroup", // olayangroup Crescent Holding GmbH
    945        // "oldnavy", // oldnavy The Gap, Inc.
    946        "ollo", // ollo Dish DBS Corporation
    947        "omega", // omega The Swatch Group Ltd
    948        "one", // one One.com A/S
    949        "ong", // ong Public Interest Registry
    950        "onl", // onl I-REGISTRY Ltd., Niederlassung Deutschland
    951        "online", // online DotOnline Inc.
    952//        "onyourside", // onyourside Nationwide Mutual Insurance Company
    953        "ooo", // ooo INFIBEAM INCORPORATION LIMITED
    954        "open", // open American Express Travel Related Services Company, Inc.
    955        "oracle", // oracle Oracle Corporation
    956        "orange", // orange Orange Brand Services Limited
    957        "org", // org Public Interest Registry (PIR)
    958        "organic", // organic Afilias Limited
    959//        "orientexpress", // orientexpress Orient Express (retired 2017-04-11)
    960        "origins", // origins The Estée Lauder Companies Inc.
    961        "osaka", // osaka Interlink Co., Ltd.
    962        "otsuka", // otsuka Otsuka Holdings Co., Ltd.
    963        "ott", // ott Dish DBS Corporation
    964        "ovh", // ovh OVH SAS
    965        "page", // page Charleston Road Registry Inc.
    966//        "pamperedchef", // pamperedchef The Pampered Chef, Ltd. (Not assigned)
    967        "panasonic", // panasonic Panasonic Corporation
    968//        "panerai", // panerai Richemont DNS Inc.
    969        "paris", // paris City of Paris
    970        "pars", // pars Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
    971        "partners", // partners Magic Glen, LLC
    972        "parts", // parts Sea Goodbye, LLC
    973        "party", // party Blue Sky Registry Limited
    974        // "passagens", // passagens Travel Reservations SRL
    975        "pay", // pay Amazon Registry Services, Inc.
    976        "pccw", // pccw PCCW Enterprises Limited
    977        "pet", // pet Afilias plc
    978        "pfizer", // pfizer Pfizer Inc.
    979        "pharmacy", // pharmacy National Association of Boards of Pharmacy
    980        "phd", // phd Charleston Road Registry Inc.
    981        "philips", // philips Koninklijke Philips N.V.
    982        "phone", // phone Dish DBS Corporation
    983        "photo", // photo Uniregistry, Corp.
    984        "photography", // photography Sugar Glen, LLC
    985        "photos", // photos Sea Corner, LLC
    986        "physio", // physio PhysBiz Pty Ltd
    987//        "piaget", // piaget Richemont DNS Inc.
    988        "pics", // pics Uniregistry, Corp.
    989        "pictet", // pictet Pictet Europe S.A.
    990        "pictures", // pictures Foggy Sky, LLC
    991        "pid", // pid Top Level Spectrum, Inc.
    992        "pin", // pin Amazon Registry Services, Inc.
    993        "ping", // ping Ping Registry Provider, Inc.
    994        "pink", // pink Afilias Limited
    995        "pioneer", // pioneer Pioneer Corporation
    996        "pizza", // pizza Foggy Moon, LLC
    997        "place", // place Snow Galley, LLC
    998        "play", // play Charleston Road Registry Inc.
    999        "playstation", // playstation Sony Computer Entertainment Inc.
    1000        "plumbing", // plumbing Spring Tigers, LLC
    1001        "plus", // plus Sugar Mill, LLC
    1002        "pnc", // pnc PNC Domain Co., LLC
    1003        "pohl", // pohl Deutsche Vermögensberatung Aktiengesellschaft DVAG
    1004        "poker", // poker Afilias Domains No. 5 Limited
    1005        "politie", // politie Politie Nederland
    1006        "porn", // porn ICM Registry PN LLC
    1007        "post", // post Universal Postal Union
    1008        "pramerica", // pramerica Prudential Financial, Inc.
    1009        "praxi", // praxi Praxi S.p.A.
    1010        "press", // press DotPress Inc.
    1011        "prime", // prime Amazon Registry Services, Inc.
    1012        "pro", // pro Registry Services Corporation dba RegistryPro
    1013        "prod", // prod Charleston Road Registry Inc.
    1014        "productions", // productions Magic Birch, LLC
    1015        "prof", // prof Charleston Road Registry Inc.
    1016        "progressive", // progressive Progressive Casualty Insurance Company
    1017        "promo", // promo Afilias plc
    1018        "properties", // properties Big Pass, LLC
    1019        "property", // property Uniregistry, Corp.
    1020        "protection", // protection XYZ.COM LLC
    1021        "pru", // pru Prudential Financial, Inc.
    1022        "prudential", // prudential Prudential Financial, Inc.
    1023        "pub", // pub United TLD Holdco Ltd.
    1024        "pwc", // pwc PricewaterhouseCoopers LLP
    1025        "qpon", // qpon dotCOOL, Inc.
    1026        "quebec", // quebec PointQuébec Inc
    1027        "quest", // quest Quest ION Limited
    1028//        "qvc", // qvc QVC, Inc.
    1029        "racing", // racing Premier Registry Limited
    1030        "radio", // radio European Broadcasting Union (EBU)
    1031//        "raid", // raid Johnson Shareholdings, Inc.
    1032        "read", // read Amazon Registry Services, Inc.
    1033        "realestate", // realestate dotRealEstate LLC
    1034        "realtor", // realtor Real Estate Domains LLC
    1035        "realty", // realty Fegistry, LLC
    1036        "recipes", // recipes Grand Island, LLC
    1037        "red", // red Afilias Limited
    1038        "redstone", // redstone Redstone Haute Couture Co., Ltd.
    1039        "redumbrella", // redumbrella Travelers TLD, LLC
    1040        "rehab", // rehab United TLD Holdco Ltd.
    1041        "reise", // reise Foggy Way, LLC
    1042        "reisen", // reisen New Cypress, LLC
    1043        "reit", // reit National Association of Real Estate Investment Trusts, Inc.
    1044        "reliance", // reliance Reliance Industries Limited
    1045        "ren", // ren Beijing Qianxiang Wangjing Technology Development Co., Ltd.
    1046        "rent", // rent XYZ.COM LLC
    1047        "rentals", // rentals Big Hollow,LLC
    1048        "repair", // repair Lone Sunset, LLC
    1049        "report", // report Binky Glen, LLC
    1050        "republican", // republican United TLD Holdco Ltd.
    1051        "rest", // rest Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
    1052        "restaurant", // restaurant Snow Avenue, LLC
    1053        "review", // review dot Review Limited
    1054        "reviews", // reviews United TLD Holdco, Ltd.
    1055        "rexroth", // rexroth Robert Bosch GMBH
    1056        "rich", // rich I-REGISTRY Ltd., Niederlassung Deutschland
    1057        "richardli", // richardli Pacific Century Asset Management (HK) Limited
    1058        "ricoh", // ricoh Ricoh Company, Ltd.
    1059        // "rightathome", // rightathome Johnson Shareholdings, Inc. (retired 2020-07-31)
    1060        "ril", // ril Reliance Industries Limited
    1061        "rio", // rio Empresa Municipal de Informática SA - IPLANRIO
    1062        "rip", // rip United TLD Holdco Ltd.
    1063//        "rmit", // rmit Royal Melbourne Institute of Technology
    1064        // "rocher", // rocher Ferrero Trading Lux S.A.
    1065        "rocks", // rocks United TLD Holdco, LTD.
    1066        "rodeo", // rodeo Top Level Domain Holdings Limited
    1067        "rogers", // rogers Rogers Communications Canada Inc.
    1068        "room", // room Amazon Registry Services, Inc.
    1069        "rsvp", // rsvp Charleston Road Registry Inc.
    1070        "rugby", // rugby World Rugby Strategic Developments Limited
    1071        "ruhr", // ruhr regiodot GmbH &amp; Co. KG
    1072        "run", // run Snow Park, LLC
    1073        "rwe", // rwe RWE AG
    1074        "ryukyu", // ryukyu BusinessRalliart inc.
    1075        "saarland", // saarland dotSaarland GmbH
    1076        "safe", // safe Amazon Registry Services, Inc.
    1077        "safety", // safety Safety Registry Services, LLC.
    1078        "sakura", // sakura SAKURA Internet Inc.
    1079        "sale", // sale United TLD Holdco, Ltd
    1080        "salon", // salon Outer Orchard, LLC
    1081        "samsclub", // samsclub Wal-Mart Stores, Inc.
    1082        "samsung", // samsung SAMSUNG SDS CO., LTD
    1083        "sandvik", // sandvik Sandvik AB
    1084        "sandvikcoromant", // sandvikcoromant Sandvik AB
    1085        "sanofi", // sanofi Sanofi
    1086        "sap", // sap SAP AG
    1087//        "sapo", // sapo PT Comunicacoes S.A.
    1088        "sarl", // sarl Delta Orchard, LLC
    1089        "sas", // sas Research IP LLC
    1090        "save", // save Amazon Registry Services, Inc.
    1091        "saxo", // saxo Saxo Bank A/S
    1092        "sbi", // sbi STATE BANK OF INDIA
    1093        "sbs", // sbs SPECIAL BROADCASTING SERVICE CORPORATION
    1094        // "sca", // sca SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
    1095        "scb", // scb The Siam Commercial Bank Public Company Limited (&quot;SCB&quot;)
    1096        "schaeffler", // schaeffler Schaeffler Technologies AG &amp; Co. KG
    1097        "schmidt", // schmidt SALM S.A.S.
    1098        "scholarships", // scholarships Scholarships.com, LLC
    1099        "school", // school Little Galley, LLC
    1100        "schule", // schule Outer Moon, LLC
    1101        "schwarz", // schwarz Schwarz Domains und Services GmbH &amp; Co. KG
    1102        "science", // science dot Science Limited
    1103//        "scjohnson", // scjohnson Johnson Shareholdings, Inc.
    1104        // "scor", // scor SCOR SE (not assigned as at Version 2020062100)
    1105        "scot", // scot Dot Scot Registry Limited
    1106        "search", // search Charleston Road Registry Inc.
    1107        "seat", // seat SEAT, S.A. (Sociedad Unipersonal)
    1108        "secure", // secure Amazon Registry Services, Inc.
    1109        "security", // security XYZ.COM LLC
    1110        "seek", // seek Seek Limited
    1111        "select", // select iSelect Ltd
    1112        "sener", // sener Sener Ingeniería y Sistemas, S.A.
    1113        "services", // services Fox Castle, LLC
    1114//        "ses", // ses SES
    1115        "seven", // seven Seven West Media Ltd
    1116        "sew", // sew SEW-EURODRIVE GmbH &amp; Co KG
    1117        "sex", // sex ICM Registry SX LLC
    1118        "sexy", // sexy Uniregistry, Corp.
    1119        "sfr", // sfr Societe Francaise du Radiotelephone - SFR
    1120        "shangrila", // shangrila Shangri‐La International Hotel Management Limited
    1121        "sharp", // sharp Sharp Corporation
    1122        "shaw", // shaw Shaw Cablesystems G.P.
    1123        "shell", // shell Shell Information Technology International Inc
    1124        "shia", // shia Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
    1125        "shiksha", // shiksha Afilias Limited
    1126        "shoes", // shoes Binky Galley, LLC
    1127        "shop", // shop GMO Registry, Inc.
    1128        "shopping", // shopping Over Keep, LLC
    1129        "shouji", // shouji QIHOO 360 TECHNOLOGY CO. LTD.
    1130        "show", // show Snow Beach, LLC
    1131        // "showtime", // showtime CBS Domains Inc.
    1132//        "shriram", // shriram Shriram Capital Ltd.
    1133        "silk", // silk Amazon Registry Services, Inc.
    1134        "sina", // sina Sina Corporation
    1135        "singles", // singles Fern Madison, LLC
    1136        "site", // site DotSite Inc.
    1137        "ski", // ski STARTING DOT LIMITED
    1138        "skin", // skin L&#39;Oréal
    1139        "sky", // sky Sky International AG
    1140        "skype", // skype Microsoft Corporation
    1141        "sling", // sling Hughes Satellite Systems Corporation
    1142        "smart", // smart Smart Communications, Inc. (SMART)
    1143        "smile", // smile Amazon Registry Services, Inc.
    1144        "sncf", // sncf SNCF (Société Nationale des Chemins de fer Francais)
    1145        "soccer", // soccer Foggy Shadow, LLC
    1146        "social", // social United TLD Holdco Ltd.
    1147        "softbank", // softbank SoftBank Group Corp.
    1148        "software", // software United TLD Holdco, Ltd
    1149        "sohu", // sohu Sohu.com Limited
    1150        "solar", // solar Ruby Town, LLC
    1151        "solutions", // solutions Silver Cover, LLC
    1152        "song", // song Amazon Registry Services, Inc.
    1153        "sony", // sony Sony Corporation
    1154        "soy", // soy Charleston Road Registry Inc.
    1155        "spa", // spa Asia Spa and Wellness Promotion Council Limited
    1156        "space", // space DotSpace Inc.
    1157//        "spiegel", // spiegel SPIEGEL-Verlag Rudolf Augstein GmbH &amp; Co. KG
    1158        "sport", // sport Global Association of International Sports Federations (GAISF)
    1159        "spot", // spot Amazon Registry Services, Inc.
    1160//        "spreadbetting", // spreadbetting DOTSPREADBETTING REGISTRY LTD
    1161        "srl", // srl InterNetX Corp.
    1162//        "srt", // srt FCA US LLC.
    1163        "stada", // stada STADA Arzneimittel AG
    1164        "staples", // staples Staples, Inc.
    1165        "star", // star Star India Private Limited
    1166//        "starhub", // starhub StarHub Limited
    1167        "statebank", // statebank STATE BANK OF INDIA
    1168        "statefarm", // statefarm State Farm Mutual Automobile Insurance Company
    1169//        "statoil", // statoil Statoil ASA
    1170        "stc", // stc Saudi Telecom Company
    1171        "stcgroup", // stcgroup Saudi Telecom Company
    1172        "stockholm", // stockholm Stockholms kommun
    1173        "storage", // storage Self Storage Company LLC
    1174        "store", // store DotStore Inc.
    1175        "stream", // stream dot Stream Limited
    1176        "studio", // studio United TLD Holdco Ltd.
    1177        "study", // study OPEN UNIVERSITIES AUSTRALIA PTY LTD
    1178        "style", // style Binky Moon, LLC
    1179        "sucks", // sucks Vox Populi Registry Ltd.
    1180        "supplies", // supplies Atomic Fields, LLC
    1181        "supply", // supply Half Falls, LLC
    1182        "support", // support Grand Orchard, LLC
    1183        "surf", // surf Top Level Domain Holdings Limited
    1184        "surgery", // surgery Tin Avenue, LLC
    1185        "suzuki", // suzuki SUZUKI MOTOR CORPORATION
    1186        "swatch", // swatch The Swatch Group Ltd
    1187//        "swiftcover", // swiftcover Swiftcover Insurance Services Limited
    1188        "swiss", // swiss Swiss Confederation
    1189        "sydney", // sydney State of New South Wales, Department of Premier and Cabinet
    1190//        "symantec", // symantec Symantec Corporation [Not assigned as of Jul 25]
    1191        "systems", // systems Dash Cypress, LLC
    1192        "tab", // tab Tabcorp Holdings Limited
    1193        "taipei", // taipei Taipei City Government
    1194        "talk", // talk Amazon Registry Services, Inc.
    1195        "taobao", // taobao Alibaba Group Holding Limited
    1196        "target", // target Target Domain Holdings, LLC
    1197        "tatamotors", // tatamotors Tata Motors Ltd
    1198        "tatar", // tatar LLC "Coordination Center of Regional Domain of Tatarstan Republic"
    1199        "tattoo", // tattoo Uniregistry, Corp.
    1200        "tax", // tax Storm Orchard, LLC
    1201        "taxi", // taxi Pine Falls, LLC
    1202        "tci", // tci Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
    1203        "tdk", // tdk TDK Corporation
    1204        "team", // team Atomic Lake, LLC
    1205        "tech", // tech Dot Tech LLC
    1206        "technology", // technology Auburn Falls, LLC
    1207        "tel", // tel Telnic Ltd.
    1208//        "telecity", // telecity TelecityGroup International Limited
    1209//        "telefonica", // telefonica Telefónica S.A.
    1210        "temasek", // temasek Temasek Holdings (Private) Limited
    1211        "tennis", // tennis Cotton Bloom, LLC
    1212        "teva", // teva Teva Pharmaceutical Industries Limited
    1213        "thd", // thd Homer TLC, Inc.
    1214        "theater", // theater Blue Tigers, LLC
    1215        "theatre", // theatre XYZ.COM LLC
    1216        "tiaa", // tiaa Teachers Insurance and Annuity Association of America
    1217        "tickets", // tickets Accent Media Limited
    1218        "tienda", // tienda Victor Manor, LLC
    1219        // "tiffany", // tiffany Tiffany and Company
    1220        "tips", // tips Corn Willow, LLC
    1221        "tires", // tires Dog Edge, LLC
    1222        "tirol", // tirol punkt Tirol GmbH
    1223        "tjmaxx", // tjmaxx The TJX Companies, Inc.
    1224        "tjx", // tjx The TJX Companies, Inc.
    1225        "tkmaxx", // tkmaxx The TJX Companies, Inc.
    1226        "tmall", // tmall Alibaba Group Holding Limited
    1227        "today", // today Pearl Woods, LLC
    1228        "tokyo", // tokyo GMO Registry, Inc.
    1229        "tools", // tools Pioneer North, LLC
    1230        "top", // top Jiangsu Bangning Science &amp; Technology Co.,Ltd.
    1231        "toray", // toray Toray Industries, Inc.
    1232        "toshiba", // toshiba TOSHIBA Corporation
    1233        "total", // total Total SA
    1234        "tours", // tours Sugar Station, LLC
    1235        "town", // town Koko Moon, LLC
    1236        "toyota", // toyota TOYOTA MOTOR CORPORATION
    1237        "toys", // toys Pioneer Orchard, LLC
    1238        "trade", // trade Elite Registry Limited
    1239        "trading", // trading DOTTRADING REGISTRY LTD
    1240        "training", // training Wild Willow, LLC
    1241        "travel", // travel Tralliance Registry Management Company, LLC.
    1242        // "travelchannel", // travelchannel Lifestyle Domain Holdings, Inc.
    1243        "travelers", // travelers Travelers TLD, LLC
    1244        "travelersinsurance", // travelersinsurance Travelers TLD, LLC
    1245        "trust", // trust Artemis Internet Inc
    1246        "trv", // trv Travelers TLD, LLC
    1247        "tube", // tube Latin American Telecom LLC
    1248        "tui", // tui TUI AG
    1249        "tunes", // tunes Amazon Registry Services, Inc.
    1250        "tushu", // tushu Amazon Registry Services, Inc.
    1251        "tvs", // tvs T V SUNDRAM IYENGAR  &amp; SONS PRIVATE LIMITED
    1252        "ubank", // ubank National Australia Bank Limited
    1253        "ubs", // ubs UBS AG
    1254//        "uconnect", // uconnect FCA US LLC.
    1255        "unicom", // unicom China United Network Communications Corporation Limited
    1256        "university", // university Little Station, LLC
    1257        "uno", // uno Dot Latin LLC
    1258        "uol", // uol UBN INTERNET LTDA.
    1259        "ups", // ups UPS Market Driver, Inc.
    1260        "vacations", // vacations Atomic Tigers, LLC
    1261        "vana", // vana Lifestyle Domain Holdings, Inc.
    1262        "vanguard", // vanguard The Vanguard Group, Inc.
    1263        "vegas", // vegas Dot Vegas, Inc.
    1264        "ventures", // ventures Binky Lake, LLC
    1265        "verisign", // verisign VeriSign, Inc.
    1266        "versicherung", // versicherung dotversicherung-registry GmbH
    1267        "vet", // vet United TLD Holdco, Ltd
    1268        "viajes", // viajes Black Madison, LLC
    1269        "video", // video United TLD Holdco, Ltd
    1270        "vig", // vig VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
    1271        "viking", // viking Viking River Cruises (Bermuda) Ltd.
    1272        "villas", // villas New Sky, LLC
    1273        "vin", // vin Holly Shadow, LLC
    1274        "vip", // vip Minds + Machines Group Limited
    1275        "virgin", // virgin Virgin Enterprises Limited
    1276        "visa", // visa Visa Worldwide Pte. Limited
    1277        "vision", // vision Koko Station, LLC
    1278//        "vista", // vista Vistaprint Limited
    1279//        "vistaprint", // vistaprint Vistaprint Limited
    1280        "viva", // viva Saudi Telecom Company
    1281        "vivo", // vivo Telefonica Brasil S.A.
    1282        "vlaanderen", // vlaanderen DNS.be vzw
    1283        "vodka", // vodka Top Level Domain Holdings Limited
    1284        // "volkswagen", // volkswagen Volkswagen Group of America Inc.
    1285        "volvo", // volvo Volvo Holding Sverige Aktiebolag
    1286        "vote", // vote Monolith Registry LLC
    1287        "voting", // voting Valuetainment Corp.
    1288        "voto", // voto Monolith Registry LLC
    1289        "voyage", // voyage Ruby House, LLC
    1290        // "vuelos", // vuelos Travel Reservations SRL
    1291        "wales", // wales Nominet UK
    1292        "walmart", // walmart Wal-Mart Stores, Inc.
    1293        "walter", // walter Sandvik AB
    1294        "wang", // wang Zodiac Registry Limited
    1295        "wanggou", // wanggou Amazon Registry Services, Inc.
    1296//        "warman", // warman Weir Group IP Limited
    1297        "watch", // watch Sand Shadow, LLC
    1298        "watches", // watches Richemont DNS Inc.
    1299        "weather", // weather The Weather Channel, LLC
    1300        "weatherchannel", // weatherchannel The Weather Channel, LLC
    1301        "webcam", // webcam dot Webcam Limited
    1302        "weber", // weber Saint-Gobain Weber SA
    1303        "website", // website DotWebsite Inc.
    1304        "wed", // wed Atgron, Inc.
    1305        "wedding", // wedding Top Level Domain Holdings Limited
    1306        "weibo", // weibo Sina Corporation
    1307        "weir", // weir Weir Group IP Limited
    1308        "whoswho", // whoswho Who&#39;s Who Registry
    1309        "wien", // wien punkt.wien GmbH
    1310        "wiki", // wiki Top Level Design, LLC
    1311        "williamhill", // williamhill William Hill Organization Limited
    1312        "win", // win First Registry Limited
    1313        "windows", // windows Microsoft Corporation
    1314        "wine", // wine June Station, LLC
    1315        "winners", // winners The TJX Companies, Inc.
    1316        "wme", // wme William Morris Endeavor Entertainment, LLC
    1317        "wolterskluwer", // wolterskluwer Wolters Kluwer N.V.
    1318        "woodside", // woodside Woodside Petroleum Limited
    1319        "work", // work Top Level Domain Holdings Limited
    1320        "works", // works Little Dynamite, LLC
    1321        "world", // world Bitter Fields, LLC
    1322        "wow", // wow Amazon Registry Services, Inc.
    1323        "wtc", // wtc World Trade Centers Association, Inc.
    1324        "wtf", // wtf Hidden Way, LLC
    1325        "xbox", // xbox Microsoft Corporation
    1326        "xerox", // xerox Xerox DNHC LLC
    1327        // "xfinity", // xfinity Comcast IP Holdings I, LLC
    1328        "xihuan", // xihuan QIHOO 360 TECHNOLOGY CO. LTD.
    1329        "xin", // xin Elegant Leader Limited
    1330        "xn--11b4c3d", // कॉम VeriSign Sarl
    1331        "xn--1ck2e1b", // セール Amazon Registry Services, Inc.
    1332        "xn--1qqw23a", // 佛山 Guangzhou YU Wei Information Technology Co., Ltd.
    1333        "xn--30rr7y", // 慈善 Excellent First Limited
    1334        "xn--3bst00m", // 集团 Eagle Horizon Limited
    1335        "xn--3ds443g", // 在线 TLD REGISTRY LIMITED
    1336//        "xn--3oq18vl8pn36a", // 大众汽车 Volkswagen (China) Investment Co., Ltd.
    1337        "xn--3pxu8k", // 点看 VeriSign Sarl
    1338        "xn--42c2d9a", // คอม VeriSign Sarl
    1339        "xn--45q11c", // 八卦 Zodiac Scorpio Limited
    1340        "xn--4gbrim", // موقع Suhub Electronic Establishment
    1341        "xn--55qw42g", // 公益 China Organizational Name Administration Center
    1342        "xn--55qx5d", // 公司 Computer Network Information Center of Chinese Academy of Sciences （China Internet Network Information Center）
    1343        "xn--5su34j936bgsg", // 香格里拉 Shangri‐La International Hotel Management Limited
    1344        "xn--5tzm5g", // 网站 Global Website TLD Asia Limited
    1345        "xn--6frz82g", // 移动 Afilias Limited
    1346        "xn--6qq986b3xl", // 我爱你 Tycoon Treasure Limited
    1347        "xn--80adxhks", // москва Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
    1348        "xn--80aqecdr1a", // католик Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
    1349        "xn--80asehdb", // онлайн CORE Association
    1350        "xn--80aswg", // сайт CORE Association
    1351        "xn--8y0a063a", // 联通 China United Network Communications Corporation Limited
    1352        "xn--90ae", // бг Imena.BG Plc (NAMES.BG Plc)
    1353        "xn--9dbq2a", // קום VeriSign Sarl
    1354        "xn--9et52u", // 时尚 RISE VICTORY LIMITED
    1355        "xn--9krt00a", // 微博 Sina Corporation
    1356        "xn--b4w605ferd", // 淡马锡 Temasek Holdings (Private) Limited
    1357        "xn--bck1b9a5dre4c", // ファッション Amazon Registry Services, Inc.
    1358        "xn--c1avg", // орг Public Interest Registry
    1359        "xn--c2br7g", // नेट VeriSign Sarl
    1360        "xn--cck2b3b", // ストア Amazon Registry Services, Inc.
    1361        "xn--cckwcxetd", // アマゾン Amazon Registry Services, Inc.
    1362        "xn--cg4bki", // 삼성 SAMSUNG SDS CO., LTD
    1363        "xn--czr694b", // 商标 HU YI GLOBAL INFORMATION RESOURCES(HOLDING) COMPANY.HONGKONG LIMITED
    1364        "xn--czrs0t", // 商店 Wild Island, LLC
    1365        "xn--czru2d", // 商城 Zodiac Aquarius Limited
    1366        "xn--d1acj3b", // дети The Foundation for Network Initiatives “The Smart Internet”
    1367        "xn--eckvdtc9d", // ポイント Amazon Registry Services, Inc.
    1368        "xn--efvy88h", // 新闻 Xinhua News Agency Guangdong Branch 新华通讯社广东分社
    1369//        "xn--estv75g", // 工行 Industrial and Commercial Bank of China Limited
    1370        "xn--fct429k", // 家電 Amazon Registry Services, Inc.
    1371        "xn--fhbei", // كوم VeriSign Sarl
    1372        "xn--fiq228c5hs", // 中文网 TLD REGISTRY LIMITED
    1373        "xn--fiq64b", // 中信 CITIC Group Corporation
    1374        "xn--fjq720a", // 娱乐 Will Bloom, LLC
    1375        "xn--flw351e", // 谷歌 Charleston Road Registry Inc.
    1376        "xn--fzys8d69uvgm", // 電訊盈科 PCCW Enterprises Limited
    1377        "xn--g2xx48c", // 购物 Minds + Machines Group Limited
    1378        "xn--gckr3f0f", // クラウド Amazon Registry Services, Inc.
    1379        "xn--gk3at1e", // 通販 Amazon Registry Services, Inc.
    1380        "xn--hxt814e", // 网店 Zodiac Libra Limited
    1381        "xn--i1b6b1a6a2e", // संगठन Public Interest Registry
    1382        "xn--imr513n", // 餐厅 HU YI GLOBAL INFORMATION RESOURCES (HOLDING) COMPANY. HONGKONG LIMITED
    1383        "xn--io0a7i", // 网络 Computer Network Information Center of Chinese Academy of Sciences （China Internet Network Information Center）
    1384        "xn--j1aef", // ком VeriSign Sarl
    1385        "xn--jlq480n2rg", // 亚马逊 Amazon Registry Services, Inc.
    1386//        "xn--jlq61u9w7b", // 诺基亚 Nokia Corporation
    1387        "xn--jvr189m", // 食品 Amazon Registry Services, Inc.
    1388        "xn--kcrx77d1x4a", // 飞利浦 Koninklijke Philips N.V.
    1389//        "xn--kpu716f", // 手表 Richemont DNS Inc. [Not assigned as of Jul 25]
    1390        "xn--kput3i", // 手机 Beijing RITT-Net Technology Development Co., Ltd
    1391        "xn--mgba3a3ejt", // ارامكو Aramco Services Company
    1392        "xn--mgba7c0bbn0a", // العليان Crescent Holding GmbH
    1393        // "xn--mgbaakc7dvf", // اتصالات Emirates Telecommunications Corporation (trading as Etisalat)
    1394        "xn--mgbab2bd", // بازار CORE Association
    1395//        "xn--mgbb9fbpob", // موبايلي GreenTech Consultancy Company W.L.L.
    1396        "xn--mgbca7dzdo", // ابوظبي Abu Dhabi Systems and Information Centre
    1397        "xn--mgbi4ecexp", // كاثوليك Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
    1398        "xn--mgbt3dhd", // همراه Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
    1399        "xn--mk1bu44c", // 닷컴 VeriSign Sarl
    1400        "xn--mxtq1m", // 政府 Net-Chinese Co., Ltd.
    1401        "xn--ngbc5azd", // شبكة International Domain Registry Pty. Ltd.
    1402        "xn--ngbe9e0a", // بيتك Kuwait Finance House
    1403        "xn--ngbrx", // عرب League of Arab States
    1404        "xn--nqv7f", // 机构 Public Interest Registry
    1405        "xn--nqv7fs00ema", // 组织机构 Public Interest Registry
    1406        "xn--nyqy26a", // 健康 Stable Tone Limited
    1407        "xn--otu796d", // 招聘 Dot Trademark TLD Holding Company Limited
    1408        "xn--p1acf", // рус Rusnames Limited
    1409//        "xn--pbt977c", // 珠宝 Richemont DNS Inc. [Not assigned as of Jul 25]
    1410        "xn--pssy2u", // 大拿 VeriSign Sarl
    1411        "xn--q9jyb4c", // みんな Charleston Road Registry Inc.
    1412        "xn--qcka1pmc", // グーグル Charleston Road Registry Inc.
    1413        "xn--rhqv96g", // 世界 Stable Tone Limited
    1414        "xn--rovu88b", // 書籍 Amazon EU S.à r.l.
    1415        "xn--ses554g", // 网址 KNET Co., Ltd
    1416        "xn--t60b56a", // 닷넷 VeriSign Sarl
    1417        "xn--tckwe", // コム VeriSign Sarl
    1418        "xn--tiq49xqyj", // 天主教 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
    1419        "xn--unup4y", // 游戏 Spring Fields, LLC
    1420        "xn--vermgensberater-ctb", // VERMöGENSBERATER Deutsche Vermögensberatung Aktiengesellschaft DVAG
    1421        "xn--vermgensberatung-pwb", // VERMöGENSBERATUNG Deutsche Vermögensberatung Aktiengesellschaft DVAG
    1422        "xn--vhquv", // 企业 Dash McCook, LLC
    1423        "xn--vuq861b", // 信息 Beijing Tele-info Network Technology Co., Ltd.
    1424        "xn--w4r85el8fhu5dnra", // 嘉里大酒店 Kerry Trading Co. Limited
    1425        "xn--w4rs40l", // 嘉里 Kerry Trading Co. Limited
    1426        "xn--xhq521b", // 广东 Guangzhou YU Wei Information Technology Co., Ltd.
    1427        "xn--zfr164b", // 政务 China Organizational Name Administration Center
    1428//        "xperia", // xperia Sony Mobile Communications AB
    1429        "xxx", // xxx ICM Registry LLC
    1430        "xyz", // xyz XYZ.COM LLC
    1431        "yachts", // yachts DERYachts, LLC
    1432        "yahoo", // yahoo Yahoo! Domain Services Inc.
    1433        "yamaxun", // yamaxun Amazon Registry Services, Inc.
    1434        "yandex", // yandex YANDEX, LLC
    1435        "yodobashi", // yodobashi YODOBASHI CAMERA CO.,LTD.
    1436        "yoga", // yoga Top Level Domain Holdings Limited
    1437        "yokohama", // yokohama GMO Registry, Inc.
    1438        "you", // you Amazon Registry Services, Inc.
    1439        "youtube", // youtube Charleston Road Registry Inc.
    1440        "yun", // yun QIHOO 360 TECHNOLOGY CO. LTD.
    1441        "zappos", // zappos Amazon Registry Services, Inc.
    1442        "zara", // zara Industria de Diseño Textil, S.A. (INDITEX, S.A.)
    1443        "zero", // zero Amazon Registry Services, Inc.
    1444        "zip", // zip Charleston Road Registry Inc.
    1445//        "zippo", // zippo Zadco Company
    1446        "zone", // zone Outer Falls, LLC
    1447        "zuerich", // zuerich Kanton Zürich (Canton of Zurich)
    1448};
    1449
    1450    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1451    private static final String[] COUNTRY_CODE_TLDS = {
    1452        // Taken from Version 2024040200, Last Updated Tue Apr  2 07:07:02 2024 UTC
    1453        "ac",                 // Ascension Island
    1454        "ad",                 // Andorra
    1455        "ae",                 // United Arab Emirates
    1456        "af",                 // Afghanistan
    1457        "ag",                 // Antigua and Barbuda
    1458        "ai",                 // Anguilla
    1459        "al",                 // Albania
    1460        "am",                 // Armenia
    1461//        "an",                 // Netherlands Antilles (retired)
    1462        "ao",                 // Angola
    1463        "aq",                 // Antarctica
    1464        "ar",                 // Argentina
    1465        "as",                 // American Samoa
    1466        "at",                 // Austria
    1467        "au",                 // Australia (includes Ashmore and Cartier Islands and Coral Sea Islands)
    1468        "aw",                 // Aruba
    1469        "ax",                 // Åland
    1470        "az",                 // Azerbaijan
    1471        "ba",                 // Bosnia and Herzegovina
    1472        "bb",                 // Barbados
    1473        "bd",                 // Bangladesh
    1474        "be",                 // Belgium
    1475        "bf",                 // Burkina Faso
    1476        "bg",                 // Bulgaria
    1477        "bh",                 // Bahrain
    1478        "bi",                 // Burundi
    1479        "bj",                 // Benin
    1480        "bm",                 // Bermuda
    1481        "bn",                 // Brunei Darussalam
    1482        "bo",                 // Bolivia
    1483        "br",                 // Brazil
    1484        "bs",                 // Bahamas
    1485        "bt",                 // Bhutan
    1486        "bv",                 // Bouvet Island
    1487        "bw",                 // Botswana
    1488        "by",                 // Belarus
    1489        "bz",                 // Belize
    1490        "ca",                 // Canada
    1491        "cc",                 // Cocos (Keeling) Islands
    1492        "cd",                 // Democratic Republic of the Congo (formerly Zaire)
    1493        "cf",                 // Central African Republic
    1494        "cg",                 // Republic of the Congo
    1495        "ch",                 // Switzerland
    1496        "ci",                 // Côte d'Ivoire
    1497        "ck",                 // Cook Islands
    1498        "cl",                 // Chile
    1499        "cm",                 // Cameroon
    1500        "cn",                 // China, mainland
    1501        "co",                 // Colombia
    1502        "cr",                 // Costa Rica
    1503        "cu",                 // Cuba
    1504        "cv",                 // Cape Verde
    1505        "cw",                 // Curaçao
    1506        "cx",                 // Christmas Island
    1507        "cy",                 // Cyprus
    1508        "cz",                 // Czech Republic
    1509        "de",                 // Germany
    1510        "dj",                 // Djibouti
    1511        "dk",                 // Denmark
    1512        "dm",                 // Dominica
    1513        "do",                 // Dominican Republic
    1514        "dz",                 // Algeria
    1515        "ec",                 // Ecuador
    1516        "ee",                 // Estonia
    1517        "eg",                 // Egypt
    1518        "er",                 // Eritrea
    1519        "es",                 // Spain
    1520        "et",                 // Ethiopia
    1521        "eu",                 // European Union
    1522        "fi",                 // Finland
    1523        "fj",                 // Fiji
    1524        "fk",                 // Falkland Islands
    1525        "fm",                 // Federated States of Micronesia
    1526        "fo",                 // Faroe Islands
    1527        "fr",                 // France
    1528        "ga",                 // Gabon
    1529        "gb",                 // Great Britain (United Kingdom)
    1530        "gd",                 // Grenada
    1531        "ge",                 // Georgia
    1532        "gf",                 // French Guiana
    1533        "gg",                 // Guernsey
    1534        "gh",                 // Ghana
    1535        "gi",                 // Gibraltar
    1536        "gl",                 // Greenland
    1537        "gm",                 // The Gambia
    1538        "gn",                 // Guinea
    1539        "gp",                 // Guadeloupe
    1540        "gq",                 // Equatorial Guinea
    1541        "gr",                 // Greece
    1542        "gs",                 // South Georgia and the South Sandwich Islands
    1543        "gt",                 // Guatemala
    1544        "gu",                 // Guam
    1545        "gw",                 // Guinea-Bissau
    1546        "gy",                 // Guyana
    1547        "hk",                 // Hong Kong
    1548        "hm",                 // Heard Island and McDonald Islands
    1549        "hn",                 // Honduras
    1550        "hr",                 // Croatia (Hrvatska)
    1551        "ht",                 // Haiti
    1552        "hu",                 // Hungary
    1553        "id",                 // Indonesia
    1554        "ie",                 // Ireland (Éire)
    1555        "il",                 // Israel
    1556        "im",                 // Isle of Man
    1557        "in",                 // India
    1558        "io",                 // British Indian Ocean Territory
    1559        "iq",                 // Iraq
    1560        "ir",                 // Iran
    1561        "is",                 // Iceland
    1562        "it",                 // Italy
    1563        "je",                 // Jersey
    1564        "jm",                 // Jamaica
    1565        "jo",                 // Jordan
    1566        "jp",                 // Japan
    1567        "ke",                 // Kenya
    1568        "kg",                 // Kyrgyzstan
    1569        "kh",                 // Cambodia (Khmer)
    1570        "ki",                 // Kiribati
    1571        "km",                 // Comoros
    1572        "kn",                 // Saint Kitts and Nevis
    1573        "kp",                 // North Korea
    1574        "kr",                 // South Korea
    1575        "kw",                 // Kuwait
    1576        "ky",                 // Cayman Islands
    1577        "kz",                 // Kazakhstan
    1578        "la",                 // Laos (currently being marketed as the official domain for Los Angeles)
    1579        "lb",                 // Lebanon
    1580        "lc",                 // Saint Lucia
    1581        "li",                 // Liechtenstein
    1582        "lk",                 // Sri Lanka
    1583        "lr",                 // Liberia
    1584        "ls",                 // Lesotho
    1585        "lt",                 // Lithuania
    1586        "lu",                 // Luxembourg
    1587        "lv",                 // Latvia
    1588        "ly",                 // Libya
    1589        "ma",                 // Morocco
    1590        "mc",                 // Monaco
    1591        "md",                 // Moldova
    1592        "me",                 // Montenegro
    1593        "mg",                 // Madagascar
    1594        "mh",                 // Marshall Islands
    1595        "mk",                 // Republic of Macedonia
    1596        "ml",                 // Mali
    1597        "mm",                 // Myanmar
    1598        "mn",                 // Mongolia
    1599        "mo",                 // Macau
    1600        "mp",                 // Northern Mariana Islands
    1601        "mq",                 // Martinique
    1602        "mr",                 // Mauritania
    1603        "ms",                 // Montserrat
    1604        "mt",                 // Malta
    1605        "mu",                 // Mauritius
    1606        "mv",                 // Maldives
    1607        "mw",                 // Malawi
    1608        "mx",                 // Mexico
    1609        "my",                 // Malaysia
    1610        "mz",                 // Mozambique
    1611        "na",                 // Namibia
    1612        "nc",                 // New Caledonia
    1613        "ne",                 // Niger
    1614        "nf",                 // Norfolk Island
    1615        "ng",                 // Nigeria
    1616        "ni",                 // Nicaragua
    1617        "nl",                 // Netherlands
    1618        "no",                 // Norway
    1619        "np",                 // Nepal
    1620        "nr",                 // Nauru
    1621        "nu",                 // Niue
    1622        "nz",                 // New Zealand
    1623        "om",                 // Oman
    1624        "pa",                 // Panama
    1625        "pe",                 // Peru
    1626        "pf",                 // French Polynesia With Clipperton Island
    1627        "pg",                 // Papua New Guinea
    1628        "ph",                 // Philippines
    1629        "pk",                 // Pakistan
    1630        "pl",                 // Poland
    1631        "pm",                 // Saint-Pierre and Miquelon
    1632        "pn",                 // Pitcairn Islands
    1633        "pr",                 // Puerto Rico
    1634        "ps",                 // Palestinian territories (PA-controlled West Bank and Gaza Strip)
    1635        "pt",                 // Portugal
    1636        "pw",                 // Palau
    1637        "py",                 // Paraguay
    1638        "qa",                 // Qatar
    1639        "re",                 // Réunion
    1640        "ro",                 // Romania
    1641        "rs",                 // Serbia
    1642        "ru",                 // Russia
    1643        "rw",                 // Rwanda
    1644        "sa",                 // Saudi Arabia
    1645        "sb",                 // Solomon Islands
    1646        "sc",                 // Seychelles
    1647        "sd",                 // Sudan
    1648        "se",                 // Sweden
    1649        "sg",                 // Singapore
    1650        "sh",                 // Saint Helena
    1651        "si",                 // Slovenia
    1652        "sj",                 // Svalbard and Jan Mayen Islands Not in use (Norwegian dependencies; see .no)
    1653        "sk",                 // Slovakia
    1654        "sl",                 // Sierra Leone
    1655        "sm",                 // San Marino
    1656        "sn",                 // Senegal
    1657        "so",                 // Somalia
    1658        "sr",                 // Suriname
    1659        "ss",                 // ss National Communication Authority (NCA)
    1660        "st",                 // São Tomé and Príncipe
    1661        "su",                 // Soviet Union (deprecated)
    1662        "sv",                 // El Salvador
    1663        "sx",                 // Sint Maarten
    1664        "sy",                 // Syria
    1665        "sz",                 // Swaziland
    1666        "tc",                 // Turks and Caicos Islands
    1667        "td",                 // Chad
    1668        "tf",                 // French Southern and Antarctic Lands
    1669        "tg",                 // Togo
    1670        "th",                 // Thailand
    1671        "tj",                 // Tajikistan
    1672        "tk",                 // Tokelau
    1673        "tl",                 // East Timor (deprecated old code)
    1674        "tm",                 // Turkmenistan
    1675        "tn",                 // Tunisia
    1676        "to",                 // Tonga
    1677//        "tp",                 // East Timor (Retired)
    1678        "tr",                 // Turkey
    1679        "tt",                 // Trinidad and Tobago
    1680        "tv",                 // Tuvalu
    1681        "tw",                 // Taiwan, Republic of China
    1682        "tz",                 // Tanzania
    1683        "ua",                 // Ukraine
    1684        "ug",                 // Uganda
    1685        "uk",                 // United Kingdom
    1686        "us",                 // United States of America
    1687        "uy",                 // Uruguay
    1688        "uz",                 // Uzbekistan
    1689        "va",                 // Vatican City State
    1690        "vc",                 // Saint Vincent and the Grenadines
    1691        "ve",                 // Venezuela
    1692        "vg",                 // British Virgin Islands
    1693        "vi",                 // U.S. Virgin Islands
    1694        "vn",                 // Vietnam
    1695        "vu",                 // Vanuatu
    1696        "wf",                 // Wallis and Futuna
    1697        "ws",                 // Samoa (formerly Western Samoa)
    1698        "xn--2scrj9c", // ಭಾರತ National Internet eXchange of India
    1699        "xn--3e0b707e", // 한국 KISA (Korea Internet &amp; Security Agency)
    1700        "xn--3hcrj9c", // ଭାରତ National Internet eXchange of India
    1701        "xn--45br5cyl", // ভাৰত National Internet eXchange of India
    1702        "xn--45brj9c", // ভারত National Internet Exchange of India
    1703        "xn--4dbrk0ce", // ישראל The Israel Internet Association (RA)
    1704        "xn--54b7fta0cc", // বাংলা Posts and Telecommunications Division
    1705        "xn--80ao21a", // қаз Association of IT Companies of Kazakhstan
    1706        "xn--90a3ac", // срб Serbian National Internet Domain Registry (RNIDS)
    1707        "xn--90ais", // ??? Reliable Software Inc.
    1708        "xn--clchc0ea0b2g2a9gcd", // சிங்கப்பூர் Singapore Network Information Centre (SGNIC) Pte Ltd
    1709        "xn--d1alf", // мкд Macedonian Academic Research Network Skopje
    1710        "xn--e1a4c", // ею EURid vzw/asbl
    1711        "xn--fiqs8s", // 中国 China Internet Network Information Center
    1712        "xn--fiqz9s", // 中國 China Internet Network Information Center
    1713        "xn--fpcrj9c3d", // భారత్ National Internet Exchange of India
    1714        "xn--fzc2c9e2c", // ලංකා LK Domain Registry
    1715        "xn--gecrj9c", // ભારત National Internet Exchange of India
    1716        "xn--h2breg3eve", // भारतम् National Internet eXchange of India
    1717        "xn--h2brj9c", // भारत National Internet Exchange of India
    1718        "xn--h2brj9c8c", // भारोत National Internet eXchange of India
    1719        "xn--j1amh", // укр Ukrainian Network Information Centre (UANIC), Inc.
    1720        "xn--j6w193g", // 香港 Hong Kong Internet Registration Corporation Ltd.
    1721        "xn--kprw13d", // 台湾 Taiwan Network Information Center (TWNIC)
    1722        "xn--kpry57d", // 台灣 Taiwan Network Information Center (TWNIC)
    1723        "xn--l1acc", // мон Datacom Co.,Ltd
    1724        "xn--lgbbat1ad8j", // الجزائر CERIST
    1725        "xn--mgb9awbf", // عمان Telecommunications Regulatory Authority (TRA)
    1726        "xn--mgba3a4f16a", // ایران Institute for Research in Fundamental Sciences (IPM)
    1727        "xn--mgbaam7a8h", // امارات Telecommunications Regulatory Authority (TRA)
    1728        "xn--mgbah1a3hjkrd", // موريتانيا Université de Nouakchott Al Aasriya
    1729        "xn--mgbai9azgqp6j", // پاکستان National Telecommunication Corporation
    1730        "xn--mgbayh7gpa", // الاردن National Information Technology Center (NITC)
    1731        "xn--mgbbh1a", // بارت National Internet eXchange of India
    1732        "xn--mgbbh1a71e", // بھارت National Internet Exchange of India
    1733        "xn--mgbc0a9azcg", // المغرب Agence Nationale de Réglementation des Télécommunications (ANRT)
    1734        "xn--mgbcpq6gpa1a", // البحرين Telecommunications Regulatory Authority (TRA)
    1735        "xn--mgberp4a5d4ar", // السعودية Communications and Information Technology Commission
    1736        "xn--mgbgu82a", // ڀارت National Internet eXchange of India
    1737        "xn--mgbpl2fh", // ????? Sudan Internet Society
    1738        "xn--mgbtx2b", // عراق Communications and Media Commission (CMC)
    1739        "xn--mgbx4cd0ab", // مليسيا MYNIC Berhad
    1740        "xn--mix891f", // 澳門 Bureau of Telecommunications Regulation (DSRT)
    1741        "xn--node", // გე Information Technologies Development Center (ITDC)
    1742        "xn--o3cw4h", // ไทย Thai Network Information Center Foundation
    1743        "xn--ogbpf8fl", // سورية National Agency for Network Services (NANS)
    1744        "xn--p1ai", // рф Coordination Center for TLD RU
    1745        "xn--pgbs0dh", // تونس Agence Tunisienne d&#39;Internet
    1746        "xn--q7ce6a", // ລາວ Lao National Internet Center (LANIC)
    1747        "xn--qxa6a", // ευ EURid vzw/asbl
    1748        "xn--qxam", // ελ ICS-FORTH GR
    1749        "xn--rvc1e0am3e", // ഭാരതം National Internet eXchange of India
    1750        "xn--s9brj9c", // ਭਾਰਤ National Internet Exchange of India
    1751        "xn--wgbh1c", // مصر National Telecommunication Regulatory Authority - NTRA
    1752        "xn--wgbl6a", // قطر Communications Regulatory Authority
    1753        "xn--xkc2al3hye2a", // இலங்கை LK Domain Registry
    1754        "xn--xkc2dl3a5ee0h", // இந்தியா National Internet Exchange of India
    1755        "xn--y9a3aq", // ??? Internet Society
    1756        "xn--yfro4i67o", // 新加坡 Singapore Network Information Centre (SGNIC) Pte Ltd
    1757        "xn--ygbi2ammx", // فلسطين Ministry of Telecom &amp; Information Technology (MTIT)
    1758        "ye",                 // Yemen
    1759        "yt",                 // Mayotte
    1760        "za",                 // South Africa
    1761        "zm",                 // Zambia
    1762        "zw",                 // Zimbabwe
    1763    };
    1764
    1765    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1766    private static final String[] LOCAL_TLDS = {
    1767       "localdomain",         // Also widely used as localhost.localdomain
    1768       "localhost",           // RFC2606 defined
    1769    };
    1770    /*
    1771     * This field is used to detect whether the getInstance has been called.
    1772     * After this, the method updateTLDOverride is not allowed to be called.
    1773     * This field does not need to be volatile since it is only accessed from
    1774     * synchronized methods.
    1775     */
    1776    private static boolean inUse;
    1777    /*
    1778     * These arrays are mutable.
    1779     * They can only be updated by the updateTLDOverride method, and readers must first get an instance
    1780     * using the getInstance methods which are all (now) synchronized.
    1781     * The only other access is via getTLDEntries which is now synchronized.
    1782     */
    1783    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1784    private static String[] countryCodeTLDsPlus = EMPTY_STRING_ARRAY;
    1785    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1786    private static String[] genericTLDsPlus = EMPTY_STRING_ARRAY;
    1787    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1788    private static String[] countryCodeTLDsMinus = EMPTY_STRING_ARRAY;
    1789    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1790    private static String[] genericTLDsMinus = EMPTY_STRING_ARRAY;
    1791
    1792    // N.B. The constructors are deliberately private to avoid possible problems with unsafe publication.
    1793    // It is vital that the static override arrays are not mutable once they have been used in an instance
    1794    // The arrays could be copied into the instance variables, however if the static array were changed it could
    1795    // result in different settings for the shared default instances
    1796
    1797    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1798    private static String[] localTLDsMinus = EMPTY_STRING_ARRAY;
    1799
    1800    // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
    1801    private static String[] localTLDsPlus = EMPTY_STRING_ARRAY;
    1802
    1803    /**
    1804     * Check if a sorted array contains the specified key
    1805     *
    1806     * @param sortedArray the array to search
    1807     * @param key the key to find
    1808     * @return {@code true} if the array contains the key
    1809     */
    1810    private static boolean arrayContains(final String[] sortedArray, final String key) {
    1811        return Arrays.binarySearch(sortedArray, key) >= 0;
    1812    }
    1813
    1814    /**
    1815     * Returns the singleton instance of this validator. It
    1816     *  will not consider local addresses as valid.
    1817     * @return the singleton instance of this validator
    1818     */
    1819    public static synchronized DomainValidator getInstance() {
    1820        inUse = true;
    1821        return LazyHolder.DOMAIN_VALIDATOR;
    1822    }
    1823
    1824    /**
    1825     * Returns the singleton instance of this validator,
    1826     *  with local validation as required.
    1827     * @param allowLocal Should local addresses be considered valid?
    1828     * @return the singleton instance of this validator
    1829     */
    1830    public static synchronized DomainValidator getInstance(final boolean allowLocal) {
    1831        inUse = true;
    1832        if (allowLocal) {
    1833            return LazyHolder.DOMAIN_VALIDATOR_WITH_LOCAL;
    1834        }
    1835        return LazyHolder.DOMAIN_VALIDATOR;
    1836    }
    1837
    1838    /**
    1839     * Returns a new instance of this validator.
    1840     * The user can provide a list of {@link Item} entries which can
    1841     * be used to override the generic and country code lists.
    1842     * Note that any such entries override values provided by the
    1843     * {@link #updateTLDOverride(ArrayType, String[])} method
    1844     * If an entry for a particular type is not provided, then
    1845     * the class override (if any) is retained.
    1846     *
    1847     * @param allowLocal Should local addresses be considered valid?
    1848     * @param items - array of {@link Item} entries
    1849     * @return an instance of this validator
    1850     * @since 1.7
    1851     */
    1852    public static synchronized DomainValidator getInstance(final boolean allowLocal, final List<Item> items) {
    1853        inUse = true;
    1854        return new DomainValidator(allowLocal, items);
    1855    }
    1856
    1857    /**
    1858     * Gets a copy of a class level internal array.
    1859     * @param table the array type (any of the enum values)
    1860     * @return a copy of the array
    1861     * @throws IllegalArgumentException if the table type is unexpected (should not happen)
    1862     * @since 1.5.1
    1863     */
    1864    public static synchronized String[] getTLDEntries(final ArrayType table) {
    1865        final String[] array;
    1866        switch (table) {
    1867        case COUNTRY_CODE_MINUS:
    1868            array = countryCodeTLDsMinus;
    1869            break;
    1870        case COUNTRY_CODE_PLUS:
    1871            array = countryCodeTLDsPlus;
    1872            break;
    1873        case GENERIC_MINUS:
    1874            array = genericTLDsMinus;
    1875            break;
    1876        case GENERIC_PLUS:
    1877            array = genericTLDsPlus;
    1878            break;
    1879        case LOCAL_MINUS:
    1880            array = localTLDsMinus;
    1881            break;
    1882        case LOCAL_PLUS:
    1883            array = localTLDsPlus;
    1884            break;
    1885        case GENERIC_RO:
    1886            array = GENERIC_TLDS;
    1887            break;
    1888        case COUNTRY_CODE_RO:
    1889            array = COUNTRY_CODE_TLDS;
    1890            break;
    1891        case INFRASTRUCTURE_RO:
    1892            array = INFRASTRUCTURE_TLDS;
    1893            break;
    1894        case LOCAL_RO:
    1895            array = LOCAL_TLDS;
    1896            break;
    1897        default:
    1898            throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
    1899        }
    1900        return Arrays.copyOf(array, array.length); // clone the array
    1901    }
    1902
    1903    /*
    1904     * Check if input contains only ASCII
    1905     * Treats null as all ASCII
    1906     */
    1907    private static boolean isOnlyASCII(final String input) {
    1908        if (input == null) {
    1909            return true;
    1910        }
    1911        for (int i = 0; i < input.length(); i++) {
    1912            if (input.charAt(i) > 0x7F) { // CHECKSTYLE IGNORE MagicNumber
    1913                return false;
    1914            }
    1915        }
    1916        return true;
    1917    }
    1918
    1919    /**
    1920     * Converts potentially Unicode input to punycode.
    1921     * If conversion fails, returns the original input.
    1922     *
    1923     * @param input the string to convert, not null
    1924     * @return converted input, or original input if conversion fails
    1925     */
    1926    // Needed by UrlValidator
    1927    static String unicodeToASCII(final String input) {
    1928        if (isOnlyASCII(input)) { // skip possibly expensive processing
    1929            return input;
    1930        }
    1931        try {
    1932            final String ascii = IDN.toASCII(input);
    1933            if (IDNBUGHOLDER.IDN_TOASCII_PRESERVES_TRAILING_DOTS) {
    1934                return ascii;
    1935            }
    1936            final int length = input.length();
    1937            if (length == 0) { // check there is a last character
    1938                return input;
    1939            }
    1940            // RFC3490 3.1. 1)
    1941            // Whenever dots are used as label separators, the following
    1942            // characters MUST be recognized as dots: U+002E (full stop), U+3002
    1943            // (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61
    1944            // (halfwidth ideographic full stop).
    1945            final char lastChar = input.charAt(length - 1); // fetch original last char
    1946            switch (lastChar) {
    1947            case '\u002E': // "." full stop
    1948            case '\u3002': // ideographic full stop
    1949            case '\uFF0E': // fullwidth full stop
    1950            case '\uFF61': // halfwidth ideographic full stop
    1951                return ascii + "."; // restore the missing stop
    1952            default:
    1953                return ascii;
    1954            }
    1955        } catch (final IllegalArgumentException e) { // input is not valid
    1956            return input;
    1957        }
    1958    }
    1959
    1960    /**
    1961     * Update one of the TLD override arrays.
    1962     * This must only be done at program startup, before any instances are accessed using getInstance.
    1963     * <p>
    1964     * For example:
    1965     * <p>
    1966     * {@code DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, "apache")}
    1967     * <p>
    1968     * To clear an override array, provide an empty array.
    1969     *
    1970     * @param table the table to update, see {@link DomainValidator.ArrayType}
    1971     * Must be one of the following
    1972     * <ul>
    1973     * <li>COUNTRY_CODE_MINUS</li>
    1974     * <li>COUNTRY_CODE_PLUS</li>
    1975     * <li>GENERIC_MINUS</li>
    1976     * <li>GENERIC_PLUS</li>
    1977     * <li>LOCAL_MINUS</li>
    1978     * <li>LOCAL_PLUS</li>
    1979     * </ul>
    1980     * @param tlds the array of TLDs, must not be null
    1981     * @throws IllegalStateException if the method is called after getInstance
    1982     * @throws IllegalArgumentException if one of the read-only tables is requested
    1983     * @since 1.5.0
    1984     */
    1985    public static synchronized void updateTLDOverride(final ArrayType table, final String... tlds) {
    1986        if (inUse) {
    1987            throw new IllegalStateException("Can only invoke this method before calling getInstance");
    1988        }
    1989        final String[] copy = new String[tlds.length];
    1990        // Comparisons are always done with lower-case entries
    1991        for (int i = 0; i < tlds.length; i++) {
    1992            copy[i] = tlds[i].toLowerCase(Locale.ENGLISH);
    1993        }
    1994        Arrays.sort(copy);
    1995        switch (table) {
    1996        case COUNTRY_CODE_MINUS:
    1997            countryCodeTLDsMinus = copy;
    1998            break;
    1999        case COUNTRY_CODE_PLUS:
    2000            countryCodeTLDsPlus = copy;
    2001            break;
    2002        case GENERIC_MINUS:
    2003            genericTLDsMinus = copy;
    2004            break;
    2005        case GENERIC_PLUS:
    2006            genericTLDsPlus = copy;
    2007            break;
    2008        case LOCAL_MINUS:
    2009            localTLDsMinus = copy;
    2010            break;
    2011        case LOCAL_PLUS:
    2012            localTLDsPlus = copy;
    2013            break;
    2014        case COUNTRY_CODE_RO:
    2015        case GENERIC_RO:
    2016        case INFRASTRUCTURE_RO:
    2017        case LOCAL_RO:
    2018            throw new IllegalArgumentException("Cannot update the table: " + table);
    2019        default:
    2020            throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
    2021        }
    2022    }
    2023
    2024    /** Whether to allow local overrides. */
    2025    private final boolean allowLocal;
    2026
    2027    // TLDs defined by IANA
    2028    // Authoritative and comprehensive list at:
    2029    // https://data.iana.org/TLD/tlds-alpha-by-domain.txt
    2030
    2031    // Note that the above list is in UPPER case.
    2032    // The code currently converts strings to lower case (as per the tables below)
    2033
    2034    // IANA also provide an HTML list at http://www.iana.org/domains/root/db
    2035    // Note that this contains several country code entries which are NOT in
    2036    // the text file. These all have the "Not assigned" in the "Sponsoring Organisation" column
    2037    // For example (as of 2015-01-02):
    2038    // .bl  country-code    Not assigned
    2039    // .um  country-code    Not assigned
    2040
    2041    /**
    2042     * RegexValidator for matching domains.
    2043     */
    2044    private final RegexValidator domainRegex =
    2045            new RegexValidator(DOMAIN_NAME_REGEX);
    2046
    2047    /**
    2048     * RegexValidator for matching a local hostname
    2049     */
    2050    // RFC1123 sec 2.1 allows hostnames to start with a digit
    2051    private final RegexValidator hostnameRegex =
    2052            new RegexValidator(DOMAIN_LABEL_REGEX);
    2053
    2054    /** Local override. */
    2055    final String[] myCountryCodeTLDsMinus;
    2056
    2057    /** Local override. */
    2058    final String[] myCountryCodeTLDsPlus;
    2059
    2060    // Additional arrays to supplement or override the built in ones.
    2061    // The PLUS arrays are valid keys, the MINUS arrays are invalid keys
    2062
    2063    /** Local override. */
    2064    final String[] myGenericTLDsPlus;
    2065
    2066    /** Local override. */
    2067    final String[] myGenericTLDsMinus;
    2068
    2069    /** Local override. */
    2070    final String[] myLocalTLDsPlus;
    2071
    2072    /** Local override. */
    2073    final String[] myLocalTLDsMinus;
    2074
    2075    /*
    2076     * It is vital that instances are immutable. This is because the default instances are shared.
    2077     */
    2078
    2079    /**
    2080     * Private constructor.
    2081     */
    2082    private DomainValidator(final boolean allowLocal) {
    2083        this.allowLocal = allowLocal;
    2084        // link to class overrides
    2085        myCountryCodeTLDsMinus = countryCodeTLDsMinus;
    2086        myCountryCodeTLDsPlus = countryCodeTLDsPlus;
    2087        myGenericTLDsPlus = genericTLDsPlus;
    2088        myGenericTLDsMinus = genericTLDsMinus;
    2089        myLocalTLDsPlus = localTLDsPlus;
    2090        myLocalTLDsMinus = localTLDsMinus;
    2091    }
    2092
    2093    /**
    2094     * Private constructor, allowing local overrides
    2095     * @since 1.7
    2096    */
    2097    private DomainValidator(final boolean allowLocal, final List<Item> items) {
    2098        this.allowLocal = allowLocal;
    2099
    2100        // default to class overrides
    2101        String[] ccMinus = countryCodeTLDsMinus;
    2102        String[] ccPlus = countryCodeTLDsPlus;
    2103        String[] genMinus = genericTLDsMinus;
    2104        String[] genPlus = genericTLDsPlus;
    2105        String[] localMinus = localTLDsMinus;
    2106        String[] localPlus = localTLDsPlus;
    2107
    2108        // apply the instance overrides
    2109        for (final Item item : items) {
    2110            final String[] copy = new String[item.values.length];
    2111            // Comparisons are always done with lower-case entries
    2112            for (int i = 0; i < item.values.length; i++) {
    2113                copy[i] = item.values[i].toLowerCase(Locale.ENGLISH);
    2114            }
    2115            Arrays.sort(copy);
    2116            switch (item.type) {
    2117            case COUNTRY_CODE_MINUS: {
    2118                ccMinus = copy;
    2119                break;
    2120            }
    2121            case COUNTRY_CODE_PLUS: {
    2122                ccPlus = copy;
    2123                break;
    2124            }
    2125            case GENERIC_MINUS: {
    2126                genMinus = copy;
    2127                break;
    2128            }
    2129            case GENERIC_PLUS: {
    2130                genPlus = copy;
    2131                break;
    2132            }
    2133            case LOCAL_MINUS: {
    2134                localMinus = copy;
    2135                break;
    2136            }
    2137            case LOCAL_PLUS: {
    2138                localPlus = copy;
    2139                break;
    2140            }
    2141            default:
    2142                break;
    2143            }
    2144        }
    2145
    2146        // init the instance overrides
    2147        myCountryCodeTLDsMinus = ccMinus;
    2148        myCountryCodeTLDsPlus = ccPlus;
    2149        myGenericTLDsMinus = genMinus;
    2150        myGenericTLDsPlus = genPlus;
    2151        myLocalTLDsMinus = localMinus;
    2152        myLocalTLDsPlus = localPlus;
    2153    }
    2154
    2155    private String chompLeadingDot(final String str) {
    2156        if (str.startsWith(".")) {
    2157            return str.substring(1);
    2158        }
    2159        return str;
    2160    }
    2161
    2162    /**
    2163     * Gets a copy of an instance level internal array.
    2164     * @param table the array type (any of the enum values)
    2165     * @return a copy of the array
    2166     * @throws IllegalArgumentException if the table type is unexpected, e.g. GENERIC_RO
    2167     * @since 1.7
    2168     */
    2169    public String[] getOverrides(final ArrayType table) {
    2170        final String[] array;
    2171        switch (table) {
    2172        case COUNTRY_CODE_MINUS:
    2173            array = myCountryCodeTLDsMinus;
    2174            break;
    2175        case COUNTRY_CODE_PLUS:
    2176            array = myCountryCodeTLDsPlus;
    2177            break;
    2178        case GENERIC_MINUS:
    2179            array = myGenericTLDsMinus;
    2180            break;
    2181        case GENERIC_PLUS:
    2182            array = myGenericTLDsPlus;
    2183            break;
    2184        case LOCAL_MINUS:
    2185            array = myLocalTLDsMinus;
    2186            break;
    2187        case LOCAL_PLUS:
    2188            array = myLocalTLDsPlus;
    2189            break;
    2190        default:
    2191            throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
    2192        }
    2193        return Arrays.copyOf(array, array.length); // clone the array
    2194    }
    2195
    2196    /**
    2197     * Does this instance allow local addresses?
    2198     *
    2199     * @return true if local addresses are allowed.
    2200     * @since 1.7
    2201     */
    2202    public boolean isAllowLocal() {
    2203        return this.allowLocal;
    2204    }
    2205
    2206    /**
    2207     * Returns true if the specified <code>String</code> parses
    2208     * as a valid domain name with a recognized top-level domain.
    2209     * The parsing is case-insensitive.
    2210     * @param domain the parameter to check for domain name syntax
    2211     * @return true if the parameter is a valid domain name
    2212     */
    2213    public boolean isValid(String domain) {
    2214        if (domain == null) {
    2215            return false;
    2216        }
    2217        domain = unicodeToASCII(domain);
    2218        // hosts must be equally reachable via punycode and Unicode
    2219        // Unicode is never shorter than punycode, so check punycode
    2220        // if domain did not convert, then it will be caught by ASCII
    2221        // checks in the regexes below
    2222        if (domain.length() > MAX_DOMAIN_LENGTH) {
    2223            return false;
    2224        }
    2225        final String[] groups = domainRegex.match(domain);
    2226        if (groups != null && groups.length > 0) {
    2227            return isValidTld(groups[0]);
    2228        }
    2229        return allowLocal && hostnameRegex.isValid(domain);
    2230    }
    2231
    2232    /**
    2233     * Returns true if the specified <code>String</code> matches any
    2234     * IANA-defined country code top-level domain. Leading dots are
    2235     * ignored if present. The search is case-insensitive.
    2236     * @param ccTld the parameter to check for country code TLD status, not null
    2237     * @return true if the parameter is a country code TLD
    2238     */
    2239    public boolean isValidCountryCodeTld(final String ccTld) {
    2240        final String key = chompLeadingDot(unicodeToASCII(ccTld).toLowerCase(Locale.ENGLISH));
    2241        return (arrayContains(COUNTRY_CODE_TLDS, key) || arrayContains(myCountryCodeTLDsPlus, key)) && !arrayContains(myCountryCodeTLDsMinus, key);
    2242    }
    2243
    2244    // package protected for unit test access
    2245    // must agree with isValid() above
    2246    final boolean isValidDomainSyntax(String domain) {
    2247        if (domain == null) {
    2248            return false;
    2249        }
    2250        domain = unicodeToASCII(domain);
    2251        // hosts must be equally reachable via punycode and Unicode
    2252        // Unicode is never shorter than punycode, so check punycode
    2253        // if domain did not convert, then it will be caught by ASCII
    2254        // checks in the regexes below
    2255        if (domain.length() > MAX_DOMAIN_LENGTH) {
    2256            return false;
    2257        }
    2258        final String[] groups = domainRegex.match(domain);
    2259        return groups != null && groups.length > 0 || hostnameRegex.isValid(domain);
    2260    }
    2261    /**
    2262     * Returns true if the specified <code>String</code> matches any
    2263     * IANA-defined generic top-level domain. Leading dots are ignored
    2264     * if present. The search is case-insensitive.
    2265     * @param gTld the parameter to check for generic TLD status, not null
    2266     * @return true if the parameter is a generic TLD
    2267     */
    2268    public boolean isValidGenericTld(final String gTld) {
    2269        final String key = chompLeadingDot(unicodeToASCII(gTld).toLowerCase(Locale.ENGLISH));
    2270        return (arrayContains(GENERIC_TLDS, key) || arrayContains(myGenericTLDsPlus, key)) && !arrayContains(myGenericTLDsMinus, key);
    2271    }
    2272
    2273    /**
    2274     * Returns true if the specified <code>String</code> matches any
    2275     * IANA-defined infrastructure top-level domain. Leading dots are
    2276     * ignored if present. The search is case-insensitive.
    2277     * @param iTld the parameter to check for infrastructure TLD status, not null
    2278     * @return true if the parameter is an infrastructure TLD
    2279     */
    2280    public boolean isValidInfrastructureTld(final String iTld) {
    2281        final String key = chompLeadingDot(unicodeToASCII(iTld).toLowerCase(Locale.ENGLISH));
    2282        return arrayContains(INFRASTRUCTURE_TLDS, key);
    2283    }
    2284
    2285    /**
    2286     * Returns true if the specified <code>String</code> matches any
    2287     * widely used "local" domains (localhost or localdomain). Leading dots are
    2288     * ignored if present. The search is case-insensitive.
    2289     * @param lTld the parameter to check for local TLD status, not null
    2290     * @return true if the parameter is an local TLD
    2291     */
    2292    public boolean isValidLocalTld(final String lTld) {
    2293        final String key = chompLeadingDot(unicodeToASCII(lTld).toLowerCase(Locale.ENGLISH));
    2294        return (arrayContains(LOCAL_TLDS, key) || arrayContains(myLocalTLDsPlus, key))
    2295                && !arrayContains(myLocalTLDsMinus, key);
    2296    }
    2297
    2298    /**
    2299     * Returns true if the specified <code>String</code> matches any
    2300     * IANA-defined top-level domain. Leading dots are ignored if present.
    2301     * The search is case-insensitive.
    2302     * <p>
    2303     * If allowLocal is true, the TLD is checked using {@link #isValidLocalTld(String)}.
    2304     * The TLD is then checked against {@link #isValidInfrastructureTld(String)},
    2305     * {@link #isValidGenericTld(String)} and {@link #isValidCountryCodeTld(String)}
    2306     * @param tld the parameter to check for TLD status, not null
    2307     * @return true if the parameter is a TLD
    2308     */
    2309    public boolean isValidTld(final String tld) {
    2310        if (allowLocal && isValidLocalTld(tld)) {
    2311            return true;
    2312        }
    2313        return isValidInfrastructureTld(tld)
    2314                || isValidGenericTld(tld)
    2315                || isValidCountryCodeTld(tld);
    2316    }
    2317}