DomainValidator.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The ASF licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *      http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.apache.commons.validator.routines;

  18. import java.io.Serializable;
  19. import java.net.IDN;
  20. import java.util.Arrays;
  21. import java.util.List;
  22. import java.util.Locale;

  23. /**
  24.  * <p><b>Domain name</b> validation routines.</p>
  25.  *
  26.  * <p>
  27.  * This validator provides methods for validating Internet domain names
  28.  * and top-level domains.
  29.  * </p>
  30.  *
  31.  * <p>Domain names are evaluated according
  32.  * to the standards <a href="http://www.ietf.org/rfc/rfc1034.txt">RFC1034</a>,
  33.  * section 3, and <a href="http://www.ietf.org/rfc/rfc1123.txt">RFC1123</a>,
  34.  * section 2.1. No accommodation is provided for the specialized needs of
  35.  * other applications; if the domain name has been URL-encoded, for example,
  36.  * validation will fail even though the equivalent plaintext version of the
  37.  * same name would have passed.
  38.  * </p>
  39.  *
  40.  * <p>
  41.  * Validation is also provided for top-level domains (TLDs) as defined and
  42.  * maintained by the Internet Assigned Numbers Authority (IANA):
  43.  * </p>
  44.  *
  45.  *   <ul>
  46.  *     <li>{@link #isValidInfrastructureTld} - validates infrastructure TLDs
  47.  *         (<code>.arpa</code>, etc.)</li>
  48.  *     <li>{@link #isValidGenericTld} - validates generic TLDs
  49.  *         (<code>.com, .org</code>, etc.)</li>
  50.  *     <li>{@link #isValidCountryCodeTld} - validates country code TLDs
  51.  *         (<code>.us, .uk, .cn</code>, etc.)</li>
  52.  *   </ul>
  53.  *
  54.  * <p>
  55.  * (<b>NOTE</b>: This class does not provide IP address lookup for domain names or
  56.  * methods to ensure that a given domain name matches a specific IP; see
  57.  * {@link java.net.InetAddress} for that functionality.)
  58.  * </p>
  59.  *
  60.  * @since 1.4
  61.  */
  62. public class DomainValidator implements Serializable {

  63.     /**
  64.      * enum used by {@link DomainValidator#updateTLDOverride(ArrayType, String[])}
  65.      * to determine which override array to update / fetch
  66.      * @since 1.5.0
  67.      * @since 1.5.1 made public and added read-only array references
  68.      */
  69.     public enum ArrayType {
  70.         /** Update (or get a copy of) the GENERIC_TLDS_PLUS table containing additonal generic TLDs */
  71.         GENERIC_PLUS,
  72.         /** Update (or get a copy of) the GENERIC_TLDS_MINUS table containing deleted generic TLDs */
  73.         GENERIC_MINUS,
  74.         /** Update (or get a copy of) the COUNTRY_CODE_TLDS_PLUS table containing additonal country code TLDs */
  75.         COUNTRY_CODE_PLUS,
  76.         /** Update (or get a copy of) the COUNTRY_CODE_TLDS_MINUS table containing deleted country code TLDs */
  77.         COUNTRY_CODE_MINUS,
  78.         /** Gets a copy of the generic TLDS table */
  79.         GENERIC_RO,
  80.         /** Gets a copy of the country code table */
  81.         COUNTRY_CODE_RO,
  82.         /** Gets a copy of the infrastructure table */
  83.         INFRASTRUCTURE_RO,
  84.         /** Gets a copy of the local table */
  85.         LOCAL_RO,
  86.         /**
  87.          * Update (or get a copy of) the LOCAL_TLDS_PLUS table containing additional local TLDs
  88.          * @since 1.7
  89.          */
  90.         LOCAL_PLUS,
  91.         /**
  92.          * Update (or get a copy of) the LOCAL_TLDS_MINUS table containing deleted local TLDs
  93.          * @since 1.7
  94.          */
  95.         LOCAL_MINUS
  96.         ;
  97.     }

  98.     private static class IDNBUGHOLDER {
  99.         private static final boolean IDN_TOASCII_PRESERVES_TRAILING_DOTS = keepsTrailingDot();
  100.         private static boolean keepsTrailingDot() {
  101.             final String input = "a."; // must be a valid name
  102.             return input.equals(IDN.toASCII(input));
  103.         }
  104.     }

  105.     /**
  106.      * Used to specify overrides when creating a new class.
  107.      * @since 1.7
  108.      */
  109.     public static class Item {
  110.         final ArrayType type;
  111.         final String[] values;

  112.         /**
  113.          * Constructs a new instance.
  114.          * @param type ArrayType, e.g. GENERIC_PLUS, LOCAL_PLUS
  115.          * @param values array of TLDs. Will be lower-cased and sorted
  116.          */
  117.         public Item(final ArrayType type, final String... values) {
  118.             this.type = type;
  119.             this.values = values; // no need to copy here
  120.         }
  121.     }

  122.     // Regular expression strings for hostnames (derived from RFC2396 and RFC 1123)

  123.     private static class LazyHolder { // IODH

  124.         /**
  125.          * Singleton instance of this validator, which
  126.          *  doesn't consider local addresses as valid.
  127.          */
  128.         private static final DomainValidator DOMAIN_VALIDATOR = new DomainValidator(false);

  129.         /**
  130.          * Singleton instance of this validator, which does
  131.          *  consider local addresses valid.
  132.          */
  133.         private static final DomainValidator DOMAIN_VALIDATOR_WITH_LOCAL = new DomainValidator(true);

  134.     }

  135.     /** Maximum allowable length ({@value}) of a domain name */
  136.     private static final int MAX_DOMAIN_LENGTH = 253;

  137.     private static final String[] EMPTY_STRING_ARRAY = {};

  138.     private static final long serialVersionUID = -4407125112880174009L;

  139.     // RFC2396: domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
  140.     // Max 63 characters
  141.     private static final String DOMAIN_LABEL_REGEX = "\\p{Alnum}(?>[\\p{Alnum}-]{0,61}\\p{Alnum})?";

  142.     // RFC2396 toplabel = alpha | alpha *( alphanum | "-" ) alphanum
  143.     // Max 63 characters
  144.     private static final String TOP_LABEL_REGEX = "\\p{Alpha}(?>[\\p{Alnum}-]{0,61}\\p{Alnum})?";

  145.     /**
  146.      * The above instances must only be returned via the getInstance() methods.
  147.      * This is to ensure that the override data arrays are properly protected.
  148.      */

  149.     // RFC2396 hostname = *( domainlabel "." ) toplabel [ "." ]
  150.     // Note that the regex currently requires both a domain label and a top level label, whereas
  151.     // the RFC does not. This is because the regex is used to detect if a TLD is present.
  152.     // If the match fails, input is checked against DOMAIN_LABEL_REGEX (hostnameRegex)
  153.     // RFC1123 sec 2.1 allows hostnames to start with a digit
  154.     private static final String DOMAIN_NAME_REGEX =
  155.             "^(?:" + DOMAIN_LABEL_REGEX + "\\.)+" + "(" + TOP_LABEL_REGEX + ")\\.?$";
  156.     private static final String UNEXPECTED_ENUM_VALUE = "Unexpected enum value: ";

  157.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  158.     private static final String[] INFRASTRUCTURE_TLDS = {
  159.         "arpa",               // internet infrastructure
  160.     };

  161.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  162.     private static final String[] GENERIC_TLDS = {
  163.         // Taken from Version 2024040200, Last Updated Tue Apr  2 07:07:02 2024 UTC
  164.         "aaa", // aaa American Automobile Association, Inc.
  165.         "aarp", // aarp AARP
  166.         // "abarth", // abarth Fiat Chrysler Automobiles N.V.
  167.         "abb", // abb ABB Ltd
  168.         "abbott", // abbott Abbott Laboratories, Inc.
  169.         "abbvie", // abbvie AbbVie Inc.
  170.         "abc", // abc Disney Enterprises, Inc.
  171.         "able", // able Able Inc.
  172.         "abogado", // abogado Top Level Domain Holdings Limited
  173.         "abudhabi", // abudhabi Abu Dhabi Systems and Information Centre
  174.         "academy", // academy Half Oaks, LLC
  175.         "accenture", // accenture Accenture plc
  176.         "accountant", // accountant dot Accountant Limited
  177.         "accountants", // accountants Knob Town, LLC
  178.         "aco", // aco ACO Severin Ahlmann GmbH &amp; Co. KG
  179. //        "active", // active The Active Network, Inc
  180.         "actor", // actor United TLD Holdco Ltd.
  181. //        "adac", // adac Allgemeiner Deutscher Automobil-Club e.V. (ADAC)
  182.         "ads", // ads Charleston Road Registry Inc.
  183.         "adult", // adult ICM Registry AD LLC
  184.         "aeg", // aeg Aktiebolaget Electrolux
  185.         "aero", // aero Societe Internationale de Telecommunications Aeronautique (SITA INC USA)
  186.         "aetna", // aetna Aetna Life Insurance Company
  187. //        "afamilycompany", // afamilycompany Johnson Shareholdings, Inc.
  188.         "afl", // afl Australian Football League
  189.         "africa", // africa ZA Central Registry NPC trading as Registry.Africa
  190.         "agakhan", // agakhan Fondation Aga Khan (Aga Khan Foundation)
  191.         "agency", // agency Steel Falls, LLC
  192.         "aig", // aig American International Group, Inc.
  193. //        "aigo", // aigo aigo Digital Technology Co,Ltd. [Not assigned as of Jul 25]
  194.         "airbus", // airbus Airbus S.A.S.
  195.         "airforce", // airforce United TLD Holdco Ltd.
  196.         "airtel", // airtel Bharti Airtel Limited
  197.         "akdn", // akdn Fondation Aga Khan (Aga Khan Foundation)
  198.         // "alfaromeo", // alfaromeo Fiat Chrysler Automobiles N.V.
  199.         "alibaba", // alibaba Alibaba Group Holding Limited
  200.         "alipay", // alipay Alibaba Group Holding Limited
  201.         "allfinanz", // allfinanz Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
  202.         "allstate", // allstate Allstate Fire and Casualty Insurance Company
  203.         "ally", // ally Ally Financial Inc.
  204.         "alsace", // alsace REGION D ALSACE
  205.         "alstom", // alstom ALSTOM
  206.         "amazon", // amazon Amazon Registry Services, Inc.
  207.         "americanexpress", // americanexpress American Express Travel Related Services Company, Inc.
  208.         "americanfamily", // americanfamily AmFam, Inc.
  209.         "amex", // amex American Express Travel Related Services Company, Inc.
  210.         "amfam", // amfam AmFam, Inc.
  211.         "amica", // amica Amica Mutual Insurance Company
  212.         "amsterdam", // amsterdam Gemeente Amsterdam
  213.         "analytics", // analytics Campus IP LLC
  214.         "android", // android Charleston Road Registry Inc.
  215.         "anquan", // anquan QIHOO 360 TECHNOLOGY CO. LTD.
  216.         "anz", // anz Australia and New Zealand Banking Group Limited
  217.         "aol", // aol AOL Inc.
  218.         "apartments", // apartments June Maple, LLC
  219.         "app", // app Charleston Road Registry Inc.
  220.         "apple", // apple Apple Inc.
  221.         "aquarelle", // aquarelle Aquarelle.com
  222.         "arab", // arab League of Arab States
  223.         "aramco", // aramco Aramco Services Company
  224.         "archi", // archi STARTING DOT LIMITED
  225.         "army", // army United TLD Holdco Ltd.
  226.         "art", // art UK Creative Ideas Limited
  227.         "arte", // arte Association Relative à la Télévision Européenne G.E.I.E.
  228.         "asda", // asda Wal-Mart Stores, Inc.
  229.         "asia", // asia DotAsia Organisation Ltd.
  230.         "associates", // associates Baxter Hill, LLC
  231.         "athleta", // athleta The Gap, Inc.
  232.         "attorney", // attorney United TLD Holdco, Ltd
  233.         "auction", // auction United TLD HoldCo, Ltd.
  234.         "audi", // audi AUDI Aktiengesellschaft
  235.         "audible", // audible Amazon Registry Services, Inc.
  236.         "audio", // audio Uniregistry, Corp.
  237.         "auspost", // auspost Australian Postal Corporation
  238.         "author", // author Amazon Registry Services, Inc.
  239.         "auto", // auto Uniregistry, Corp.
  240.         "autos", // autos DERAutos, LLC
  241.         // "avianca", // avianca Aerovias del Continente Americano S.A. Avianca
  242.         "aws", // aws Amazon Registry Services, Inc.
  243.         "axa", // axa AXA SA
  244.         "azure", // azure Microsoft Corporation
  245.         "baby", // baby Johnson &amp; Johnson Services, Inc.
  246.         "baidu", // baidu Baidu, Inc.
  247.         "banamex", // banamex Citigroup Inc.
  248.         // "bananarepublic", // bananarepublic The Gap, Inc.
  249.         "band", // band United TLD Holdco, Ltd
  250.         "bank", // bank fTLD Registry Services, LLC
  251.         "bar", // bar Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
  252.         "barcelona", // barcelona Municipi de Barcelona
  253.         "barclaycard", // barclaycard Barclays Bank PLC
  254.         "barclays", // barclays Barclays Bank PLC
  255.         "barefoot", // barefoot Gallo Vineyards, Inc.
  256.         "bargains", // bargains Half Hallow, LLC
  257.         "baseball", // baseball MLB Advanced Media DH, LLC
  258.         "basketball", // basketball Fédération Internationale de Basketball (FIBA)
  259.         "bauhaus", // bauhaus Werkhaus GmbH
  260.         "bayern", // bayern Bayern Connect GmbH
  261.         "bbc", // bbc British Broadcasting Corporation
  262.         "bbt", // bbt BB&amp;T Corporation
  263.         "bbva", // bbva BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
  264.         "bcg", // bcg The Boston Consulting Group, Inc.
  265.         "bcn", // bcn Municipi de Barcelona
  266.         "beats", // beats Beats Electronics, LLC
  267.         "beauty", // beauty L&#39;Oréal
  268.         "beer", // beer Top Level Domain Holdings Limited
  269.         "bentley", // bentley Bentley Motors Limited
  270.         "berlin", // berlin dotBERLIN GmbH &amp; Co. KG
  271.         "best", // best BestTLD Pty Ltd
  272.         "bestbuy", // bestbuy BBY Solutions, Inc.
  273.         "bet", // bet Afilias plc
  274.         "bharti", // bharti Bharti Enterprises (Holding) Private Limited
  275.         "bible", // bible American Bible Society
  276.         "bid", // bid dot Bid Limited
  277.         "bike", // bike Grand Hollow, LLC
  278.         "bing", // bing Microsoft Corporation
  279.         "bingo", // bingo Sand Cedar, LLC
  280.         "bio", // bio STARTING DOT LIMITED
  281.         "biz", // biz Neustar, Inc.
  282.         "black", // black Afilias Limited
  283.         "blackfriday", // blackfriday Uniregistry, Corp.
  284. //        "blanco", // blanco BLANCO GmbH + Co KG
  285.         "blockbuster", // blockbuster Dish DBS Corporation
  286.         "blog", // blog Knock Knock WHOIS There, LLC
  287.         "bloomberg", // bloomberg Bloomberg IP Holdings LLC
  288.         "blue", // blue Afilias Limited
  289.         "bms", // bms Bristol-Myers Squibb Company
  290.         "bmw", // bmw Bayerische Motoren Werke Aktiengesellschaft
  291. //        "bnl", // bnl Banca Nazionale del Lavoro
  292.         "bnpparibas", // bnpparibas BNP Paribas
  293.         "boats", // boats DERBoats, LLC
  294.         "boehringer", // boehringer Boehringer Ingelheim International GmbH
  295.         "bofa", // bofa NMS Services, Inc.
  296.         "bom", // bom Núcleo de Informação e Coordenação do Ponto BR - NIC.br
  297.         "bond", // bond Bond University Limited
  298.         "boo", // boo Charleston Road Registry Inc.
  299.         "book", // book Amazon Registry Services, Inc.
  300.         "booking", // booking Booking.com B.V.
  301. //        "boots", // boots THE BOOTS COMPANY PLC
  302.         "bosch", // bosch Robert Bosch GMBH
  303.         "bostik", // bostik Bostik SA
  304.         "boston", // boston Boston TLD Management, LLC
  305.         "bot", // bot Amazon Registry Services, Inc.
  306.         "boutique", // boutique Over Galley, LLC
  307.         "box", // box NS1 Limited
  308.         "bradesco", // bradesco Banco Bradesco S.A.
  309.         "bridgestone", // bridgestone Bridgestone Corporation
  310.         "broadway", // broadway Celebrate Broadway, Inc.
  311.         "broker", // broker DOTBROKER REGISTRY LTD
  312.         "brother", // brother Brother Industries, Ltd.
  313.         "brussels", // brussels DNS.be vzw
  314. //        "budapest", // budapest Top Level Domain Holdings Limited
  315. //        "bugatti", // bugatti Bugatti International SA
  316.         "build", // build Plan Bee LLC
  317.         "builders", // builders Atomic Madison, LLC
  318.         "business", // business Spring Cross, LLC
  319.         "buy", // buy Amazon Registry Services, INC
  320.         "buzz", // buzz DOTSTRATEGY CO.
  321.         "bzh", // bzh Association www.bzh
  322.         "cab", // cab Half Sunset, LLC
  323.         "cafe", // cafe Pioneer Canyon, LLC
  324.         "cal", // cal Charleston Road Registry Inc.
  325.         "call", // call Amazon Registry Services, Inc.
  326.         "calvinklein", // calvinklein PVH gTLD Holdings LLC
  327.         "cam", // cam AC Webconnecting Holding B.V.
  328.         "camera", // camera Atomic Maple, LLC
  329.         "camp", // camp Delta Dynamite, LLC
  330. //        "cancerresearch", // cancerresearch Australian Cancer Research Foundation
  331.         "canon", // canon Canon Inc.
  332.         "capetown", // capetown ZA Central Registry NPC trading as ZA Central Registry
  333.         "capital", // capital Delta Mill, LLC
  334.         "capitalone", // capitalone Capital One Financial Corporation
  335.         "car", // car Cars Registry Limited
  336.         "caravan", // caravan Caravan International, Inc.
  337.         "cards", // cards Foggy Hollow, LLC
  338.         "care", // care Goose Cross, LLC
  339.         "career", // career dotCareer LLC
  340.         "careers", // careers Wild Corner, LLC
  341.         "cars", // cars Uniregistry, Corp.
  342. //        "cartier", // cartier Richemont DNS Inc.
  343.         "casa", // casa Top Level Domain Holdings Limited
  344.         "case", // case CNH Industrial N.V.
  345. //        "caseih", // caseih CNH Industrial N.V.
  346.         "cash", // cash Delta Lake, LLC
  347.         "casino", // casino Binky Sky, LLC
  348.         "cat", // cat Fundacio puntCAT
  349.         "catering", // catering New Falls. LLC
  350.         "catholic", // catholic Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  351.         "cba", // cba COMMONWEALTH BANK OF AUSTRALIA
  352.         "cbn", // cbn The Christian Broadcasting Network, Inc.
  353.         "cbre", // cbre CBRE, Inc.
  354.         // "cbs", // cbs CBS Domains Inc.
  355. //        "ceb", // ceb The Corporate Executive Board Company
  356.         "center", // center Tin Mill, LLC
  357.         "ceo", // ceo CEOTLD Pty Ltd
  358.         "cern", // cern European Organization for Nuclear Research (&quot;CERN&quot;)
  359.         "cfa", // cfa CFA Institute
  360.         "cfd", // cfd DOTCFD REGISTRY LTD
  361.         "chanel", // chanel Chanel International B.V.
  362.         "channel", // channel Charleston Road Registry Inc.
  363.         "charity", // charity Corn Lake, LLC
  364.         "chase", // chase JPMorgan Chase &amp; Co.
  365.         "chat", // chat Sand Fields, LLC
  366.         "cheap", // cheap Sand Cover, LLC
  367.         "chintai", // chintai CHINTAI Corporation
  368. //        "chloe", // chloe Richemont DNS Inc. (Not assigned)
  369.         "christmas", // christmas Uniregistry, Corp.
  370.         "chrome", // chrome Charleston Road Registry Inc.
  371. //        "chrysler", // chrysler FCA US LLC.
  372.         "church", // church Holly Fileds, LLC
  373.         "cipriani", // cipriani Hotel Cipriani Srl
  374.         "circle", // circle Amazon Registry Services, Inc.
  375.         "cisco", // cisco Cisco Technology, Inc.
  376.         "citadel", // citadel Citadel Domain LLC
  377.         "citi", // citi Citigroup Inc.
  378.         "citic", // citic CITIC Group Corporation
  379.         "city", // city Snow Sky, LLC
  380.         // "cityeats", // cityeats Lifestyle Domain Holdings, Inc.
  381.         "claims", // claims Black Corner, LLC
  382.         "cleaning", // cleaning Fox Shadow, LLC
  383.         "click", // click Uniregistry, Corp.
  384.         "clinic", // clinic Goose Park, LLC
  385.         "clinique", // clinique The Estée Lauder Companies Inc.
  386.         "clothing", // clothing Steel Lake, LLC
  387.         "cloud", // cloud ARUBA S.p.A.
  388.         "club", // club .CLUB DOMAINS, LLC
  389.         "clubmed", // clubmed Club Méditerranée S.A.
  390.         "coach", // coach Koko Island, LLC
  391.         "codes", // codes Puff Willow, LLC
  392.         "coffee", // coffee Trixy Cover, LLC
  393.         "college", // college XYZ.COM LLC
  394.         "cologne", // cologne NetCologne Gesellschaft für Telekommunikation mbH
  395.         "com", // com VeriSign Global Registry Services
  396.         // "comcast", // comcast Comcast IP Holdings I, LLC
  397.         "commbank", // commbank COMMONWEALTH BANK OF AUSTRALIA
  398.         "community", // community Fox Orchard, LLC
  399.         "company", // company Silver Avenue, LLC
  400.         "compare", // compare iSelect Ltd
  401.         "computer", // computer Pine Mill, LLC
  402.         "comsec", // comsec VeriSign, Inc.
  403.         "condos", // condos Pine House, LLC
  404.         "construction", // construction Fox Dynamite, LLC
  405.         "consulting", // consulting United TLD Holdco, LTD.
  406.         "contact", // contact Top Level Spectrum, Inc.
  407.         "contractors", // contractors Magic Woods, LLC
  408.         "cooking", // cooking Top Level Domain Holdings Limited
  409.         // "cookingchannel", // cookingchannel Lifestyle Domain Holdings, Inc.
  410.         "cool", // cool Koko Lake, LLC
  411.         "coop", // coop DotCooperation LLC
  412.         "corsica", // corsica Collectivité Territoriale de Corse
  413.         "country", // country Top Level Domain Holdings Limited
  414.         "coupon", // coupon Amazon Registry Services, Inc.
  415.         "coupons", // coupons Black Island, LLC
  416.         "courses", // courses OPEN UNIVERSITIES AUSTRALIA PTY LTD
  417.         "cpa", // cpa American Institute of Certified Public Accountants
  418.         "credit", // credit Snow Shadow, LLC
  419.         "creditcard", // creditcard Binky Frostbite, LLC
  420.         "creditunion", // creditunion CUNA Performance Resources, LLC
  421.         "cricket", // cricket dot Cricket Limited
  422.         "crown", // crown Crown Equipment Corporation
  423.         "crs", // crs Federated Co-operatives Limited
  424.         "cruise", // cruise Viking River Cruises (Bermuda) Ltd.
  425.         "cruises", // cruises Spring Way, LLC
  426. //        "csc", // csc Alliance-One Services, Inc.
  427.         "cuisinella", // cuisinella SALM S.A.S.
  428.         "cymru", // cymru Nominet UK
  429.         "cyou", // cyou Beijing Gamease Age Digital Technology Co., Ltd.
  430.         "dabur", // dabur Dabur India Limited
  431.         "dad", // dad Charleston Road Registry Inc.
  432.         "dance", // dance United TLD Holdco Ltd.
  433.         "data", // data Dish DBS Corporation
  434.         "date", // date dot Date Limited
  435.         "dating", // dating Pine Fest, LLC
  436.         "datsun", // datsun NISSAN MOTOR CO., LTD.
  437.         "day", // day Charleston Road Registry Inc.
  438.         "dclk", // dclk Charleston Road Registry Inc.
  439.         "dds", // dds Minds + Machines Group Limited
  440.         "deal", // deal Amazon Registry Services, Inc.
  441.         "dealer", // dealer Dealer Dot Com, Inc.
  442.         "deals", // deals Sand Sunset, LLC
  443.         "degree", // degree United TLD Holdco, Ltd
  444.         "delivery", // delivery Steel Station, LLC
  445.         "dell", // dell Dell Inc.
  446.         "deloitte", // deloitte Deloitte Touche Tohmatsu
  447.         "delta", // delta Delta Air Lines, Inc.
  448.         "democrat", // democrat United TLD Holdco Ltd.
  449.         "dental", // dental Tin Birch, LLC
  450.         "dentist", // dentist United TLD Holdco, Ltd
  451.         "desi", // desi Desi Networks LLC
  452.         "design", // design Top Level Design, LLC
  453.         "dev", // dev Charleston Road Registry Inc.
  454.         "dhl", // dhl Deutsche Post AG
  455.         "diamonds", // diamonds John Edge, LLC
  456.         "diet", // diet Uniregistry, Corp.
  457.         "digital", // digital Dash Park, LLC
  458.         "direct", // direct Half Trail, LLC
  459.         "directory", // directory Extra Madison, LLC
  460.         "discount", // discount Holly Hill, LLC
  461.         "discover", // discover Discover Financial Services
  462.         "dish", // dish Dish DBS Corporation
  463.         "diy", // diy Lifestyle Domain Holdings, Inc.
  464.         "dnp", // dnp Dai Nippon Printing Co., Ltd.
  465.         "docs", // docs Charleston Road Registry Inc.
  466.         "doctor", // doctor Brice Trail, LLC
  467. //        "dodge", // dodge FCA US LLC.
  468.         "dog", // dog Koko Mill, LLC
  469. //        "doha", // doha Communications Regulatory Authority (CRA)
  470.         "domains", // domains Sugar Cross, LLC
  471. //            "doosan", // doosan Doosan Corporation (retired)
  472.         "dot", // dot Dish DBS Corporation
  473.         "download", // download dot Support Limited
  474.         "drive", // drive Charleston Road Registry Inc.
  475.         "dtv", // dtv Dish DBS Corporation
  476.         "dubai", // dubai Dubai Smart Government Department
  477. //        "duck", // duck Johnson Shareholdings, Inc.
  478.         "dunlop", // dunlop The Goodyear Tire &amp; Rubber Company
  479. //        "duns", // duns The Dun &amp; Bradstreet Corporation
  480.         "dupont", // dupont E. I. du Pont de Nemours and Company
  481.         "durban", // durban ZA Central Registry NPC trading as ZA Central Registry
  482.         "dvag", // dvag Deutsche Vermögensberatung Aktiengesellschaft DVAG
  483.         "dvr", // dvr Hughes Satellite Systems Corporation
  484.         "earth", // earth Interlink Co., Ltd.
  485.         "eat", // eat Charleston Road Registry Inc.
  486.         "eco", // eco Big Room Inc.
  487.         "edeka", // edeka EDEKA Verband kaufmännischer Genossenschaften e.V.
  488.         "edu", // edu EDUCAUSE
  489.         "education", // education Brice Way, LLC
  490.         "email", // email Spring Madison, LLC
  491.         "emerck", // emerck Merck KGaA
  492.         "energy", // energy Binky Birch, LLC
  493.         "engineer", // engineer United TLD Holdco Ltd.
  494.         "engineering", // engineering Romeo Canyon
  495.         "enterprises", // enterprises Snow Oaks, LLC
  496. //        "epost", // epost Deutsche Post AG
  497.         "epson", // epson Seiko Epson Corporation
  498.         "equipment", // equipment Corn Station, LLC
  499.         "ericsson", // ericsson Telefonaktiebolaget L M Ericsson
  500.         "erni", // erni ERNI Group Holding AG
  501.         "esq", // esq Charleston Road Registry Inc.
  502.         "estate", // estate Trixy Park, LLC
  503.         // "esurance", // esurance Esurance Insurance Company (not assigned as at Version 2020062100)
  504.         // "etisalat", // etisalat Emirates Telecommunic
  505.         "eurovision", // eurovision European Broadcasting Union (EBU)
  506.         "eus", // eus Puntueus Fundazioa
  507.         "events", // events Pioneer Maple, LLC
  508. //        "everbank", // everbank EverBank
  509.         "exchange", // exchange Spring Falls, LLC
  510.         "expert", // expert Magic Pass, LLC
  511.         "exposed", // exposed Victor Beach, LLC
  512.         "express", // express Sea Sunset, LLC
  513.         "extraspace", // extraspace Extra Space Storage LLC
  514.         "fage", // fage Fage International S.A.
  515.         "fail", // fail Atomic Pipe, LLC
  516.         "fairwinds", // fairwinds FairWinds Partners, LLC
  517.         "faith", // faith dot Faith Limited
  518.         "family", // family United TLD Holdco Ltd.
  519.         "fan", // fan Asiamix Digital Ltd
  520.         "fans", // fans Asiamix Digital Limited
  521.         "farm", // farm Just Maple, LLC
  522.         "farmers", // farmers Farmers Insurance Exchange
  523.         "fashion", // fashion Top Level Domain Holdings Limited
  524.         "fast", // fast Amazon Registry Services, Inc.
  525.         "fedex", // fedex Federal Express Corporation
  526.         "feedback", // feedback Top Level Spectrum, Inc.
  527.         "ferrari", // ferrari Fiat Chrysler Automobiles N.V.
  528.         "ferrero", // ferrero Ferrero Trading Lux S.A.
  529.         // "fiat", // fiat Fiat Chrysler Automobiles N.V.
  530.         "fidelity", // fidelity Fidelity Brokerage Services LLC
  531.         "fido", // fido Rogers Communications Canada Inc.
  532.         "film", // film Motion Picture Domain Registry Pty Ltd
  533.         "final", // final Núcleo de Informação e Coordenação do Ponto BR - NIC.br
  534.         "finance", // finance Cotton Cypress, LLC
  535.         "financial", // financial Just Cover, LLC
  536.         "fire", // fire Amazon Registry Services, Inc.
  537.         "firestone", // firestone Bridgestone Corporation
  538.         "firmdale", // firmdale Firmdale Holdings Limited
  539.         "fish", // fish Fox Woods, LLC
  540.         "fishing", // fishing Top Level Domain Holdings Limited
  541.         "fit", // fit Minds + Machines Group Limited
  542.         "fitness", // fitness Brice Orchard, LLC
  543.         "flickr", // flickr Yahoo! Domain Services Inc.
  544.         "flights", // flights Fox Station, LLC
  545.         "flir", // flir FLIR Systems, Inc.
  546.         "florist", // florist Half Cypress, LLC
  547.         "flowers", // flowers Uniregistry, Corp.
  548. //        "flsmidth", // flsmidth FLSmidth A/S retired 2016-07-22
  549.         "fly", // fly Charleston Road Registry Inc.
  550.         "foo", // foo Charleston Road Registry Inc.
  551.         "food", // food Lifestyle Domain Holdings, Inc.
  552.         // "foodnetwork", // foodnetwork Lifestyle Domain Holdings, Inc.
  553.         "football", // football Foggy Farms, LLC
  554.         "ford", // ford Ford Motor Company
  555.         "forex", // forex DOTFOREX REGISTRY LTD
  556.         "forsale", // forsale United TLD Holdco, LLC
  557.         "forum", // forum Fegistry, LLC
  558.         "foundation", // foundation John Dale, LLC
  559.         "fox", // fox FOX Registry, LLC
  560.         "free", // free Amazon Registry Services, Inc.
  561.         "fresenius", // fresenius Fresenius Immobilien-Verwaltungs-GmbH
  562.         "frl", // frl FRLregistry B.V.
  563.         "frogans", // frogans OP3FT
  564.         // "frontdoor", // frontdoor Lifestyle Domain Holdings, Inc.
  565.         "frontier", // frontier Frontier Communications Corporation
  566.         "ftr", // ftr Frontier Communications Corporation
  567.         "fujitsu", // fujitsu Fujitsu Limited
  568. //        "fujixerox", // fujixerox Xerox DNHC LLC
  569.         "fun", // fun DotSpace, Inc.
  570.         "fund", // fund John Castle, LLC
  571.         "furniture", // furniture Lone Fields, LLC
  572.         "futbol", // futbol United TLD Holdco, Ltd.
  573.         "fyi", // fyi Silver Tigers, LLC
  574.         "gal", // gal Asociación puntoGAL
  575.         "gallery", // gallery Sugar House, LLC
  576.         "gallo", // gallo Gallo Vineyards, Inc.
  577.         "gallup", // gallup Gallup, Inc.
  578.         "game", // game Uniregistry, Corp.
  579.         "games", // games United TLD Holdco Ltd.
  580.         "gap", // gap The Gap, Inc.
  581.         "garden", // garden Top Level Domain Holdings Limited
  582.         "gay", // gay Top Level Design, LLC
  583.         "gbiz", // gbiz Charleston Road Registry Inc.
  584.         "gdn", // gdn Joint Stock Company "Navigation-information systems"
  585.         "gea", // gea GEA Group Aktiengesellschaft
  586.         "gent", // gent COMBELL GROUP NV/SA
  587.         "genting", // genting Resorts World Inc. Pte. Ltd.
  588.         "george", // george Wal-Mart Stores, Inc.
  589.         "ggee", // ggee GMO Internet, Inc.
  590.         "gift", // gift Uniregistry, Corp.
  591.         "gifts", // gifts Goose Sky, LLC
  592.         "gives", // gives United TLD Holdco Ltd.
  593.         "giving", // giving Giving Limited
  594. //        "glade", // glade Johnson Shareholdings, Inc.
  595.         "glass", // glass Black Cover, LLC
  596.         "gle", // gle Charleston Road Registry Inc.
  597.         "global", // global Dot Global Domain Registry Limited
  598.         "globo", // globo Globo Comunicação e Participações S.A
  599.         "gmail", // gmail Charleston Road Registry Inc.
  600.         "gmbh", // gmbh Extra Dynamite, LLC
  601.         "gmo", // gmo GMO Internet, Inc.
  602.         "gmx", // gmx 1&amp;1 Mail &amp; Media GmbH
  603.         "godaddy", // godaddy Go Daddy East, LLC
  604.         "gold", // gold June Edge, LLC
  605.         "goldpoint", // goldpoint YODOBASHI CAMERA CO.,LTD.
  606.         "golf", // golf Lone Falls, LLC
  607.         "goo", // goo NTT Resonant Inc.
  608. //        "goodhands", // goodhands Allstate Fire and Casualty Insurance Company
  609.         "goodyear", // goodyear The Goodyear Tire &amp; Rubber Company
  610.         "goog", // goog Charleston Road Registry Inc.
  611.         "google", // google Charleston Road Registry Inc.
  612.         "gop", // gop Republican State Leadership Committee, Inc.
  613.         "got", // got Amazon Registry Services, Inc.
  614.         "gov", // gov General Services Administration Attn: QTDC, 2E08 (.gov Domain Registration)
  615.         "grainger", // grainger Grainger Registry Services, LLC
  616.         "graphics", // graphics Over Madison, LLC
  617.         "gratis", // gratis Pioneer Tigers, LLC
  618.         "green", // green Afilias Limited
  619.         "gripe", // gripe Corn Sunset, LLC
  620.         "grocery", // grocery Wal-Mart Stores, Inc.
  621.         "group", // group Romeo Town, LLC
  622.         // "guardian", // guardian The Guardian Life Insurance Company of America
  623.         "gucci", // gucci Guccio Gucci S.p.a.
  624.         "guge", // guge Charleston Road Registry Inc.
  625.         "guide", // guide Snow Moon, LLC
  626.         "guitars", // guitars Uniregistry, Corp.
  627.         "guru", // guru Pioneer Cypress, LLC
  628.         "hair", // hair L&#39;Oreal
  629.         "hamburg", // hamburg Hamburg Top-Level-Domain GmbH
  630.         "hangout", // hangout Charleston Road Registry Inc.
  631.         "haus", // haus United TLD Holdco, LTD.
  632.         "hbo", // hbo HBO Registry Services, Inc.
  633.         "hdfc", // hdfc HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
  634.         "hdfcbank", // hdfcbank HDFC Bank Limited
  635.         "health", // health DotHealth, LLC
  636.         "healthcare", // healthcare Silver Glen, LLC
  637.         "help", // help Uniregistry, Corp.
  638.         "helsinki", // helsinki City of Helsinki
  639.         "here", // here Charleston Road Registry Inc.
  640.         "hermes", // hermes Hermes International
  641.         // "hgtv", // hgtv Lifestyle Domain Holdings, Inc.
  642.         "hiphop", // hiphop Uniregistry, Corp.
  643.         "hisamitsu", // hisamitsu Hisamitsu Pharmaceutical Co.,Inc.
  644.         "hitachi", // hitachi Hitachi, Ltd.
  645.         "hiv", // hiv dotHIV gemeinnuetziger e.V.
  646.         "hkt", // hkt PCCW-HKT DataCom Services Limited
  647.         "hockey", // hockey Half Willow, LLC
  648.         "holdings", // holdings John Madison, LLC
  649.         "holiday", // holiday Goose Woods, LLC
  650.         "homedepot", // homedepot Homer TLC, Inc.
  651.         "homegoods", // homegoods The TJX Companies, Inc.
  652.         "homes", // homes DERHomes, LLC
  653.         "homesense", // homesense The TJX Companies, Inc.
  654.         "honda", // honda Honda Motor Co., Ltd.
  655. //        "honeywell", // honeywell Honeywell GTLD LLC
  656.         "horse", // horse Top Level Domain Holdings Limited
  657.         "hospital", // hospital Ruby Pike, LLC
  658.         "host", // host DotHost Inc.
  659.         "hosting", // hosting Uniregistry, Corp.
  660.         "hot", // hot Amazon Registry Services, Inc.
  661.         // "hoteles", // hoteles Travel Reservations SRL
  662.         "hotels", // hotels Booking.com B.V.
  663.         "hotmail", // hotmail Microsoft Corporation
  664.         "house", // house Sugar Park, LLC
  665.         "how", // how Charleston Road Registry Inc.
  666.         "hsbc", // hsbc HSBC Holdings PLC
  667. //        "htc", // htc HTC corporation (Not assigned)
  668.         "hughes", // hughes Hughes Satellite Systems Corporation
  669.         "hyatt", // hyatt Hyatt GTLD, L.L.C.
  670.         "hyundai", // hyundai Hyundai Motor Company
  671.         "ibm", // ibm International Business Machines Corporation
  672.         "icbc", // icbc Industrial and Commercial Bank of China Limited
  673.         "ice", // ice IntercontinentalExchange, Inc.
  674.         "icu", // icu One.com A/S
  675.         "ieee", // ieee IEEE Global LLC
  676.         "ifm", // ifm ifm electronic gmbh
  677. //        "iinet", // iinet Connect West Pty. Ltd. (Retired)
  678.         "ikano", // ikano Ikano S.A.
  679.         "imamat", // imamat Fondation Aga Khan (Aga Khan Foundation)
  680.         "imdb", // imdb Amazon Registry Services, Inc.
  681.         "immo", // immo Auburn Bloom, LLC
  682.         "immobilien", // immobilien United TLD Holdco Ltd.
  683.         "inc", // inc Intercap Holdings Inc.
  684.         "industries", // industries Outer House, LLC
  685.         "infiniti", // infiniti NISSAN MOTOR CO., LTD.
  686.         "info", // info Afilias Limited
  687.         "ing", // ing Charleston Road Registry Inc.
  688.         "ink", // ink Top Level Design, LLC
  689.         "institute", // institute Outer Maple, LLC
  690.         "insurance", // insurance fTLD Registry Services LLC
  691.         "insure", // insure Pioneer Willow, LLC
  692.         "int", // int Internet Assigned Numbers Authority
  693. //        "intel", // intel Intel Corporation
  694.         "international", // international Wild Way, LLC
  695.         "intuit", // intuit Intuit Administrative Services, Inc.
  696.         "investments", // investments Holly Glen, LLC
  697.         "ipiranga", // ipiranga Ipiranga Produtos de Petroleo S.A.
  698.         "irish", // irish Dot-Irish LLC
  699. //        "iselect", // iselect iSelect Ltd
  700.         "ismaili", // ismaili Fondation Aga Khan (Aga Khan Foundation)
  701.         "ist", // ist Istanbul Metropolitan Municipality
  702.         "istanbul", // istanbul Istanbul Metropolitan Municipality / Medya A.S.
  703.         "itau", // itau Itau Unibanco Holding S.A.
  704.         "itv", // itv ITV Services Limited
  705. //        "iveco", // iveco CNH Industrial N.V.
  706. //        "iwc", // iwc Richemont DNS Inc.
  707.         "jaguar", // jaguar Jaguar Land Rover Ltd
  708.         "java", // java Oracle Corporation
  709.         "jcb", // jcb JCB Co., Ltd.
  710. //        "jcp", // jcp JCP Media, Inc.
  711.         "jeep", // jeep FCA US LLC.
  712.         "jetzt", // jetzt New TLD Company AB
  713.         "jewelry", // jewelry Wild Bloom, LLC
  714.         "jio", // jio Affinity Names, Inc.
  715. //        "jlc", // jlc Richemont DNS Inc.
  716.         "jll", // jll Jones Lang LaSalle Incorporated
  717.         "jmp", // jmp Matrix IP LLC
  718.         "jnj", // jnj Johnson &amp; Johnson Services, Inc.
  719.         "jobs", // jobs Employ Media LLC
  720.         "joburg", // joburg ZA Central Registry NPC trading as ZA Central Registry
  721.         "jot", // jot Amazon Registry Services, Inc.
  722.         "joy", // joy Amazon Registry Services, Inc.
  723.         "jpmorgan", // jpmorgan JPMorgan Chase &amp; Co.
  724.         "jprs", // jprs Japan Registry Services Co., Ltd.
  725.         "juegos", // juegos Uniregistry, Corp.
  726.         "juniper", // juniper JUNIPER NETWORKS, INC.
  727.         "kaufen", // kaufen United TLD Holdco Ltd.
  728.         "kddi", // kddi KDDI CORPORATION
  729.         "kerryhotels", // kerryhotels Kerry Trading Co. Limited
  730.         "kerrylogistics", // kerrylogistics Kerry Trading Co. Limited
  731.         "kerryproperties", // kerryproperties Kerry Trading Co. Limited
  732.         "kfh", // kfh Kuwait Finance House
  733.         "kia", // kia KIA MOTORS CORPORATION
  734.         "kids", // kids DotKids Foundation Limited
  735.         "kim", // kim Afilias Limited
  736.         // "kinder", // kinder Ferrero Trading Lux S.A.
  737.         "kindle", // kindle Amazon Registry Services, Inc.
  738.         "kitchen", // kitchen Just Goodbye, LLC
  739.         "kiwi", // kiwi DOT KIWI LIMITED
  740.         "koeln", // koeln NetCologne Gesellschaft für Telekommunikation mbH
  741.         "komatsu", // komatsu Komatsu Ltd.
  742.         "kosher", // kosher Kosher Marketing Assets LLC
  743.         "kpmg", // kpmg KPMG International Cooperative (KPMG International Genossenschaft)
  744.         "kpn", // kpn Koninklijke KPN N.V.
  745.         "krd", // krd KRG Department of Information Technology
  746.         "kred", // kred KredTLD Pty Ltd
  747.         "kuokgroup", // kuokgroup Kerry Trading Co. Limited
  748.         "kyoto", // kyoto Academic Institution: Kyoto Jyoho Gakuen
  749.         "lacaixa", // lacaixa CAIXA D&#39;ESTALVIS I PENSIONS DE BARCELONA
  750. //        "ladbrokes", // ladbrokes LADBROKES INTERNATIONAL PLC
  751.         "lamborghini", // lamborghini Automobili Lamborghini S.p.A.
  752.         "lamer", // lamer The Estée Lauder Companies Inc.
  753.         "lancaster", // lancaster LANCASTER
  754.         // "lancia", // lancia Fiat Chrysler Automobiles N.V.
  755. //        "lancome", // lancome L&#39;Oréal
  756.         "land", // land Pine Moon, LLC
  757.         "landrover", // landrover Jaguar Land Rover Ltd
  758.         "lanxess", // lanxess LANXESS Corporation
  759.         "lasalle", // lasalle Jones Lang LaSalle Incorporated
  760.         "lat", // lat ECOM-LAC Federación de Latinoamérica y el Caribe para Internet y el Comercio Electrónico
  761.         "latino", // latino Dish DBS Corporation
  762.         "latrobe", // latrobe La Trobe University
  763.         "law", // law Minds + Machines Group Limited
  764.         "lawyer", // lawyer United TLD Holdco, Ltd
  765.         "lds", // lds IRI Domain Management, LLC
  766.         "lease", // lease Victor Trail, LLC
  767.         "leclerc", // leclerc A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
  768.         "lefrak", // lefrak LeFrak Organization, Inc.
  769.         "legal", // legal Blue Falls, LLC
  770.         "lego", // lego LEGO Juris A/S
  771.         "lexus", // lexus TOYOTA MOTOR CORPORATION
  772.         "lgbt", // lgbt Afilias Limited
  773. //        "liaison", // liaison Liaison Technologies, Incorporated
  774.         "lidl", // lidl Schwarz Domains und Services GmbH &amp; Co. KG
  775.         "life", // life Trixy Oaks, LLC
  776.         "lifeinsurance", // lifeinsurance American Council of Life Insurers
  777.         "lifestyle", // lifestyle Lifestyle Domain Holdings, Inc.
  778.         "lighting", // lighting John McCook, LLC
  779.         "like", // like Amazon Registry Services, Inc.
  780.         "lilly", // lilly Eli Lilly and Company
  781.         "limited", // limited Big Fest, LLC
  782.         "limo", // limo Hidden Frostbite, LLC
  783.         "lincoln", // lincoln Ford Motor Company
  784.         // "linde", // linde Linde Aktiengesellschaft
  785.         "link", // link Uniregistry, Corp.
  786.         "lipsy", // lipsy Lipsy Ltd
  787.         "live", // live United TLD Holdco Ltd.
  788.         "living", // living Lifestyle Domain Holdings, Inc.
  789. //        "lixil", // lixil LIXIL Group Corporation
  790.         "llc", // llc Afilias plc
  791.         "llp", // llp Dot Registry LLC
  792.         "loan", // loan dot Loan Limited
  793.         "loans", // loans June Woods, LLC
  794.         "locker", // locker Dish DBS Corporation
  795.         "locus", // locus Locus Analytics LLC
  796. //        "loft", // loft Annco, Inc.
  797.         "lol", // lol Uniregistry, Corp.
  798.         "london", // london Dot London Domains Limited
  799.         "lotte", // lotte Lotte Holdings Co., Ltd.
  800.         "lotto", // lotto Afilias Limited
  801.         "love", // love Merchant Law Group LLP
  802.         "lpl", // lpl LPL Holdings, Inc.
  803.         "lplfinancial", // lplfinancial LPL Holdings, Inc.
  804.         "ltd", // ltd Over Corner, LLC
  805.         "ltda", // ltda InterNetX Corp.
  806.         "lundbeck", // lundbeck H. Lundbeck A/S
  807. //        "lupin", // lupin LUPIN LIMITED
  808.         "luxe", // luxe Top Level Domain Holdings Limited
  809.         "luxury", // luxury Luxury Partners LLC
  810.         // "macys", // macys Macys, Inc.
  811.         "madrid", // madrid Comunidad de Madrid
  812.         "maif", // maif Mutuelle Assurance Instituteur France (MAIF)
  813.         "maison", // maison Victor Frostbite, LLC
  814.         "makeup", // makeup L&#39;Oréal
  815.         "man", // man MAN SE
  816.         "management", // management John Goodbye, LLC
  817.         "mango", // mango PUNTO FA S.L.
  818.         "map", // map Charleston Road Registry Inc.
  819.         "market", // market Unitied TLD Holdco, Ltd
  820.         "marketing", // marketing Fern Pass, LLC
  821.         "markets", // markets DOTMARKETS REGISTRY LTD
  822.         "marriott", // marriott Marriott Worldwide Corporation
  823.         "marshalls", // marshalls The TJX Companies, Inc.
  824.         // "maserati", // maserati Fiat Chrysler Automobiles N.V.
  825.         "mattel", // mattel Mattel Sites, Inc.
  826.         "mba", // mba Lone Hollow, LLC
  827. //        "mcd", // mcd McDonald’s Corporation (Not assigned)
  828. //        "mcdonalds", // mcdonalds McDonald’s Corporation (Not assigned)
  829.         "mckinsey", // mckinsey McKinsey Holdings, Inc.
  830.         "med", // med Medistry LLC
  831.         "media", // media Grand Glen, LLC
  832.         "meet", // meet Afilias Limited
  833.         "melbourne", // melbourne The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
  834.         "meme", // meme Charleston Road Registry Inc.
  835.         "memorial", // memorial Dog Beach, LLC
  836.         "men", // men Exclusive Registry Limited
  837.         "menu", // menu Wedding TLD2, LLC
  838. //        "meo", // meo PT Comunicacoes S.A.
  839.         "merckmsd", // merckmsd MSD Registry Holdings, Inc.
  840. //        "metlife", // metlife MetLife Services and Solutions, LLC
  841.         "miami", // miami Top Level Domain Holdings Limited
  842.         "microsoft", // microsoft Microsoft Corporation
  843.         "mil", // mil DoD Network Information Center
  844.         "mini", // mini Bayerische Motoren Werke Aktiengesellschaft
  845.         "mint", // mint Intuit Administrative Services, Inc.
  846.         "mit", // mit Massachusetts Institute of Technology
  847.         "mitsubishi", // mitsubishi Mitsubishi Corporation
  848.         "mlb", // mlb MLB Advanced Media DH, LLC
  849.         "mls", // mls The Canadian Real Estate Association
  850.         "mma", // mma MMA IARD
  851.         "mobi", // mobi Afilias Technologies Limited dba dotMobi
  852.         "mobile", // mobile Dish DBS Corporation
  853. //        "mobily", // mobily GreenTech Consultancy Company W.L.L.
  854.         "moda", // moda United TLD Holdco Ltd.
  855.         "moe", // moe Interlink Co., Ltd.
  856.         "moi", // moi Amazon Registry Services, Inc.
  857.         "mom", // mom Uniregistry, Corp.
  858.         "monash", // monash Monash University
  859.         "money", // money Outer McCook, LLC
  860.         "monster", // monster Monster Worldwide, Inc.
  861. //        "montblanc", // montblanc Richemont DNS Inc. (Not assigned)
  862. //        "mopar", // mopar FCA US LLC.
  863.         "mormon", // mormon IRI Domain Management, LLC (&quot;Applicant&quot;)
  864.         "mortgage", // mortgage United TLD Holdco, Ltd
  865.         "moscow", // moscow Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
  866.         "moto", // moto Motorola Trademark Holdings, LLC
  867.         "motorcycles", // motorcycles DERMotorcycles, LLC
  868.         "mov", // mov Charleston Road Registry Inc.
  869.         "movie", // movie New Frostbite, LLC
  870. //        "movistar", // movistar Telefónica S.A.
  871.         "msd", // msd MSD Registry Holdings, Inc.
  872.         "mtn", // mtn MTN Dubai Limited
  873. //        "mtpc", // mtpc Mitsubishi Tanabe Pharma Corporation (Retired)
  874.         "mtr", // mtr MTR Corporation Limited
  875.         "museum", // museum Museum Domain Management Association
  876.         "music", // music DotMusic Limited
  877.         // "mutual", // mutual Northwestern Mutual MU TLD Registry, LLC
  878. //        "mutuelle", // mutuelle Fédération Nationale de la Mutualité Française (Retired)
  879.         "nab", // nab National Australia Bank Limited
  880. //        "nadex", // nadex Nadex Domains, Inc
  881.         "nagoya", // nagoya GMO Registry, Inc.
  882.         "name", // name VeriSign Information Services, Inc.
  883. //        "nationwide", // nationwide Nationwide Mutual Insurance Company
  884.         "natura", // natura NATURA COSMÉTICOS S.A.
  885.         "navy", // navy United TLD Holdco Ltd.
  886.         "nba", // nba NBA REGISTRY, LLC
  887.         "nec", // nec NEC Corporation
  888.         "net", // net VeriSign Global Registry Services
  889.         "netbank", // netbank COMMONWEALTH BANK OF AUSTRALIA
  890.         "netflix", // netflix Netflix, Inc.
  891.         "network", // network Trixy Manor, LLC
  892.         "neustar", // neustar NeuStar, Inc.
  893.         "new", // new Charleston Road Registry Inc.
  894. //        "newholland", // newholland CNH Industrial N.V.
  895.         "news", // news United TLD Holdco Ltd.
  896.         "next", // next Next plc
  897.         "nextdirect", // nextdirect Next plc
  898.         "nexus", // nexus Charleston Road Registry Inc.
  899.         "nfl", // nfl NFL Reg Ops LLC
  900.         "ngo", // ngo Public Interest Registry
  901.         "nhk", // nhk Japan Broadcasting Corporation (NHK)
  902.         "nico", // nico DWANGO Co., Ltd.
  903.         "nike", // nike NIKE, Inc.
  904.         "nikon", // nikon NIKON CORPORATION
  905.         "ninja", // ninja United TLD Holdco Ltd.
  906.         "nissan", // nissan NISSAN MOTOR CO., LTD.
  907.         "nissay", // nissay Nippon Life Insurance Company
  908.         "nokia", // nokia Nokia Corporation
  909.         // "northwesternmutual", // northwesternmutual Northwestern Mutual Registry, LLC
  910.         "norton", // norton Symantec Corporation
  911.         "now", // now Amazon Registry Services, Inc.
  912.         "nowruz", // nowruz Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  913.         "nowtv", // nowtv Starbucks (HK) Limited
  914.         "nra", // nra NRA Holdings Company, INC.
  915.         "nrw", // nrw Minds + Machines GmbH
  916.         "ntt", // ntt NIPPON TELEGRAPH AND TELEPHONE CORPORATION
  917.         "nyc", // nyc The City of New York by and through the New York City Department of Information Technology &amp; Telecommunications
  918.         "obi", // obi OBI Group Holding SE &amp; Co. KGaA
  919.         "observer", // observer Top Level Spectrum, Inc.
  920. //        "off", // off Johnson Shareholdings, Inc.
  921.         "office", // office Microsoft Corporation
  922.         "okinawa", // okinawa BusinessRalliart inc.
  923.         "olayan", // olayan Crescent Holding GmbH
  924.         "olayangroup", // olayangroup Crescent Holding GmbH
  925.         // "oldnavy", // oldnavy The Gap, Inc.
  926.         "ollo", // ollo Dish DBS Corporation
  927.         "omega", // omega The Swatch Group Ltd
  928.         "one", // one One.com A/S
  929.         "ong", // ong Public Interest Registry
  930.         "onl", // onl I-REGISTRY Ltd., Niederlassung Deutschland
  931.         "online", // online DotOnline Inc.
  932. //        "onyourside", // onyourside Nationwide Mutual Insurance Company
  933.         "ooo", // ooo INFIBEAM INCORPORATION LIMITED
  934.         "open", // open American Express Travel Related Services Company, Inc.
  935.         "oracle", // oracle Oracle Corporation
  936.         "orange", // orange Orange Brand Services Limited
  937.         "org", // org Public Interest Registry (PIR)
  938.         "organic", // organic Afilias Limited
  939. //        "orientexpress", // orientexpress Orient Express (retired 2017-04-11)
  940.         "origins", // origins The Estée Lauder Companies Inc.
  941.         "osaka", // osaka Interlink Co., Ltd.
  942.         "otsuka", // otsuka Otsuka Holdings Co., Ltd.
  943.         "ott", // ott Dish DBS Corporation
  944.         "ovh", // ovh OVH SAS
  945.         "page", // page Charleston Road Registry Inc.
  946. //        "pamperedchef", // pamperedchef The Pampered Chef, Ltd. (Not assigned)
  947.         "panasonic", // panasonic Panasonic Corporation
  948. //        "panerai", // panerai Richemont DNS Inc.
  949.         "paris", // paris City of Paris
  950.         "pars", // pars Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  951.         "partners", // partners Magic Glen, LLC
  952.         "parts", // parts Sea Goodbye, LLC
  953.         "party", // party Blue Sky Registry Limited
  954.         // "passagens", // passagens Travel Reservations SRL
  955.         "pay", // pay Amazon Registry Services, Inc.
  956.         "pccw", // pccw PCCW Enterprises Limited
  957.         "pet", // pet Afilias plc
  958.         "pfizer", // pfizer Pfizer Inc.
  959.         "pharmacy", // pharmacy National Association of Boards of Pharmacy
  960.         "phd", // phd Charleston Road Registry Inc.
  961.         "philips", // philips Koninklijke Philips N.V.
  962.         "phone", // phone Dish DBS Corporation
  963.         "photo", // photo Uniregistry, Corp.
  964.         "photography", // photography Sugar Glen, LLC
  965.         "photos", // photos Sea Corner, LLC
  966.         "physio", // physio PhysBiz Pty Ltd
  967. //        "piaget", // piaget Richemont DNS Inc.
  968.         "pics", // pics Uniregistry, Corp.
  969.         "pictet", // pictet Pictet Europe S.A.
  970.         "pictures", // pictures Foggy Sky, LLC
  971.         "pid", // pid Top Level Spectrum, Inc.
  972.         "pin", // pin Amazon Registry Services, Inc.
  973.         "ping", // ping Ping Registry Provider, Inc.
  974.         "pink", // pink Afilias Limited
  975.         "pioneer", // pioneer Pioneer Corporation
  976.         "pizza", // pizza Foggy Moon, LLC
  977.         "place", // place Snow Galley, LLC
  978.         "play", // play Charleston Road Registry Inc.
  979.         "playstation", // playstation Sony Computer Entertainment Inc.
  980.         "plumbing", // plumbing Spring Tigers, LLC
  981.         "plus", // plus Sugar Mill, LLC
  982.         "pnc", // pnc PNC Domain Co., LLC
  983.         "pohl", // pohl Deutsche Vermögensberatung Aktiengesellschaft DVAG
  984.         "poker", // poker Afilias Domains No. 5 Limited
  985.         "politie", // politie Politie Nederland
  986.         "porn", // porn ICM Registry PN LLC
  987.         "post", // post Universal Postal Union
  988.         "pramerica", // pramerica Prudential Financial, Inc.
  989.         "praxi", // praxi Praxi S.p.A.
  990.         "press", // press DotPress Inc.
  991.         "prime", // prime Amazon Registry Services, Inc.
  992.         "pro", // pro Registry Services Corporation dba RegistryPro
  993.         "prod", // prod Charleston Road Registry Inc.
  994.         "productions", // productions Magic Birch, LLC
  995.         "prof", // prof Charleston Road Registry Inc.
  996.         "progressive", // progressive Progressive Casualty Insurance Company
  997.         "promo", // promo Afilias plc
  998.         "properties", // properties Big Pass, LLC
  999.         "property", // property Uniregistry, Corp.
  1000.         "protection", // protection XYZ.COM LLC
  1001.         "pru", // pru Prudential Financial, Inc.
  1002.         "prudential", // prudential Prudential Financial, Inc.
  1003.         "pub", // pub United TLD Holdco Ltd.
  1004.         "pwc", // pwc PricewaterhouseCoopers LLP
  1005.         "qpon", // qpon dotCOOL, Inc.
  1006.         "quebec", // quebec PointQuébec Inc
  1007.         "quest", // quest Quest ION Limited
  1008. //        "qvc", // qvc QVC, Inc.
  1009.         "racing", // racing Premier Registry Limited
  1010.         "radio", // radio European Broadcasting Union (EBU)
  1011. //        "raid", // raid Johnson Shareholdings, Inc.
  1012.         "read", // read Amazon Registry Services, Inc.
  1013.         "realestate", // realestate dotRealEstate LLC
  1014.         "realtor", // realtor Real Estate Domains LLC
  1015.         "realty", // realty Fegistry, LLC
  1016.         "recipes", // recipes Grand Island, LLC
  1017.         "red", // red Afilias Limited
  1018.         "redstone", // redstone Redstone Haute Couture Co., Ltd.
  1019.         "redumbrella", // redumbrella Travelers TLD, LLC
  1020.         "rehab", // rehab United TLD Holdco Ltd.
  1021.         "reise", // reise Foggy Way, LLC
  1022.         "reisen", // reisen New Cypress, LLC
  1023.         "reit", // reit National Association of Real Estate Investment Trusts, Inc.
  1024.         "reliance", // reliance Reliance Industries Limited
  1025.         "ren", // ren Beijing Qianxiang Wangjing Technology Development Co., Ltd.
  1026.         "rent", // rent XYZ.COM LLC
  1027.         "rentals", // rentals Big Hollow,LLC
  1028.         "repair", // repair Lone Sunset, LLC
  1029.         "report", // report Binky Glen, LLC
  1030.         "republican", // republican United TLD Holdco Ltd.
  1031.         "rest", // rest Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
  1032.         "restaurant", // restaurant Snow Avenue, LLC
  1033.         "review", // review dot Review Limited
  1034.         "reviews", // reviews United TLD Holdco, Ltd.
  1035.         "rexroth", // rexroth Robert Bosch GMBH
  1036.         "rich", // rich I-REGISTRY Ltd., Niederlassung Deutschland
  1037.         "richardli", // richardli Pacific Century Asset Management (HK) Limited
  1038.         "ricoh", // ricoh Ricoh Company, Ltd.
  1039.         // "rightathome", // rightathome Johnson Shareholdings, Inc. (retired 2020-07-31)
  1040.         "ril", // ril Reliance Industries Limited
  1041.         "rio", // rio Empresa Municipal de Informática SA - IPLANRIO
  1042.         "rip", // rip United TLD Holdco Ltd.
  1043. //        "rmit", // rmit Royal Melbourne Institute of Technology
  1044.         // "rocher", // rocher Ferrero Trading Lux S.A.
  1045.         "rocks", // rocks United TLD Holdco, LTD.
  1046.         "rodeo", // rodeo Top Level Domain Holdings Limited
  1047.         "rogers", // rogers Rogers Communications Canada Inc.
  1048.         "room", // room Amazon Registry Services, Inc.
  1049.         "rsvp", // rsvp Charleston Road Registry Inc.
  1050.         "rugby", // rugby World Rugby Strategic Developments Limited
  1051.         "ruhr", // ruhr regiodot GmbH &amp; Co. KG
  1052.         "run", // run Snow Park, LLC
  1053.         "rwe", // rwe RWE AG
  1054.         "ryukyu", // ryukyu BusinessRalliart inc.
  1055.         "saarland", // saarland dotSaarland GmbH
  1056.         "safe", // safe Amazon Registry Services, Inc.
  1057.         "safety", // safety Safety Registry Services, LLC.
  1058.         "sakura", // sakura SAKURA Internet Inc.
  1059.         "sale", // sale United TLD Holdco, Ltd
  1060.         "salon", // salon Outer Orchard, LLC
  1061.         "samsclub", // samsclub Wal-Mart Stores, Inc.
  1062.         "samsung", // samsung SAMSUNG SDS CO., LTD
  1063.         "sandvik", // sandvik Sandvik AB
  1064.         "sandvikcoromant", // sandvikcoromant Sandvik AB
  1065.         "sanofi", // sanofi Sanofi
  1066.         "sap", // sap SAP AG
  1067. //        "sapo", // sapo PT Comunicacoes S.A.
  1068.         "sarl", // sarl Delta Orchard, LLC
  1069.         "sas", // sas Research IP LLC
  1070.         "save", // save Amazon Registry Services, Inc.
  1071.         "saxo", // saxo Saxo Bank A/S
  1072.         "sbi", // sbi STATE BANK OF INDIA
  1073.         "sbs", // sbs SPECIAL BROADCASTING SERVICE CORPORATION
  1074.         // "sca", // sca SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
  1075.         "scb", // scb The Siam Commercial Bank Public Company Limited (&quot;SCB&quot;)
  1076.         "schaeffler", // schaeffler Schaeffler Technologies AG &amp; Co. KG
  1077.         "schmidt", // schmidt SALM S.A.S.
  1078.         "scholarships", // scholarships Scholarships.com, LLC
  1079.         "school", // school Little Galley, LLC
  1080.         "schule", // schule Outer Moon, LLC
  1081.         "schwarz", // schwarz Schwarz Domains und Services GmbH &amp; Co. KG
  1082.         "science", // science dot Science Limited
  1083. //        "scjohnson", // scjohnson Johnson Shareholdings, Inc.
  1084.         // "scor", // scor SCOR SE (not assigned as at Version 2020062100)
  1085.         "scot", // scot Dot Scot Registry Limited
  1086.         "search", // search Charleston Road Registry Inc.
  1087.         "seat", // seat SEAT, S.A. (Sociedad Unipersonal)
  1088.         "secure", // secure Amazon Registry Services, Inc.
  1089.         "security", // security XYZ.COM LLC
  1090.         "seek", // seek Seek Limited
  1091.         "select", // select iSelect Ltd
  1092.         "sener", // sener Sener Ingeniería y Sistemas, S.A.
  1093.         "services", // services Fox Castle, LLC
  1094. //        "ses", // ses SES
  1095.         "seven", // seven Seven West Media Ltd
  1096.         "sew", // sew SEW-EURODRIVE GmbH &amp; Co KG
  1097.         "sex", // sex ICM Registry SX LLC
  1098.         "sexy", // sexy Uniregistry, Corp.
  1099.         "sfr", // sfr Societe Francaise du Radiotelephone - SFR
  1100.         "shangrila", // shangrila Shangri‐La International Hotel Management Limited
  1101.         "sharp", // sharp Sharp Corporation
  1102.         "shaw", // shaw Shaw Cablesystems G.P.
  1103.         "shell", // shell Shell Information Technology International Inc
  1104.         "shia", // shia Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  1105.         "shiksha", // shiksha Afilias Limited
  1106.         "shoes", // shoes Binky Galley, LLC
  1107.         "shop", // shop GMO Registry, Inc.
  1108.         "shopping", // shopping Over Keep, LLC
  1109.         "shouji", // shouji QIHOO 360 TECHNOLOGY CO. LTD.
  1110.         "show", // show Snow Beach, LLC
  1111.         // "showtime", // showtime CBS Domains Inc.
  1112. //        "shriram", // shriram Shriram Capital Ltd.
  1113.         "silk", // silk Amazon Registry Services, Inc.
  1114.         "sina", // sina Sina Corporation
  1115.         "singles", // singles Fern Madison, LLC
  1116.         "site", // site DotSite Inc.
  1117.         "ski", // ski STARTING DOT LIMITED
  1118.         "skin", // skin L&#39;Oréal
  1119.         "sky", // sky Sky International AG
  1120.         "skype", // skype Microsoft Corporation
  1121.         "sling", // sling Hughes Satellite Systems Corporation
  1122.         "smart", // smart Smart Communications, Inc. (SMART)
  1123.         "smile", // smile Amazon Registry Services, Inc.
  1124.         "sncf", // sncf SNCF (Société Nationale des Chemins de fer Francais)
  1125.         "soccer", // soccer Foggy Shadow, LLC
  1126.         "social", // social United TLD Holdco Ltd.
  1127.         "softbank", // softbank SoftBank Group Corp.
  1128.         "software", // software United TLD Holdco, Ltd
  1129.         "sohu", // sohu Sohu.com Limited
  1130.         "solar", // solar Ruby Town, LLC
  1131.         "solutions", // solutions Silver Cover, LLC
  1132.         "song", // song Amazon Registry Services, Inc.
  1133.         "sony", // sony Sony Corporation
  1134.         "soy", // soy Charleston Road Registry Inc.
  1135.         "spa", // spa Asia Spa and Wellness Promotion Council Limited
  1136.         "space", // space DotSpace Inc.
  1137. //        "spiegel", // spiegel SPIEGEL-Verlag Rudolf Augstein GmbH &amp; Co. KG
  1138.         "sport", // sport Global Association of International Sports Federations (GAISF)
  1139.         "spot", // spot Amazon Registry Services, Inc.
  1140. //        "spreadbetting", // spreadbetting DOTSPREADBETTING REGISTRY LTD
  1141.         "srl", // srl InterNetX Corp.
  1142. //        "srt", // srt FCA US LLC.
  1143.         "stada", // stada STADA Arzneimittel AG
  1144.         "staples", // staples Staples, Inc.
  1145.         "star", // star Star India Private Limited
  1146. //        "starhub", // starhub StarHub Limited
  1147.         "statebank", // statebank STATE BANK OF INDIA
  1148.         "statefarm", // statefarm State Farm Mutual Automobile Insurance Company
  1149. //        "statoil", // statoil Statoil ASA
  1150.         "stc", // stc Saudi Telecom Company
  1151.         "stcgroup", // stcgroup Saudi Telecom Company
  1152.         "stockholm", // stockholm Stockholms kommun
  1153.         "storage", // storage Self Storage Company LLC
  1154.         "store", // store DotStore Inc.
  1155.         "stream", // stream dot Stream Limited
  1156.         "studio", // studio United TLD Holdco Ltd.
  1157.         "study", // study OPEN UNIVERSITIES AUSTRALIA PTY LTD
  1158.         "style", // style Binky Moon, LLC
  1159.         "sucks", // sucks Vox Populi Registry Ltd.
  1160.         "supplies", // supplies Atomic Fields, LLC
  1161.         "supply", // supply Half Falls, LLC
  1162.         "support", // support Grand Orchard, LLC
  1163.         "surf", // surf Top Level Domain Holdings Limited
  1164.         "surgery", // surgery Tin Avenue, LLC
  1165.         "suzuki", // suzuki SUZUKI MOTOR CORPORATION
  1166.         "swatch", // swatch The Swatch Group Ltd
  1167. //        "swiftcover", // swiftcover Swiftcover Insurance Services Limited
  1168.         "swiss", // swiss Swiss Confederation
  1169.         "sydney", // sydney State of New South Wales, Department of Premier and Cabinet
  1170. //        "symantec", // symantec Symantec Corporation [Not assigned as of Jul 25]
  1171.         "systems", // systems Dash Cypress, LLC
  1172.         "tab", // tab Tabcorp Holdings Limited
  1173.         "taipei", // taipei Taipei City Government
  1174.         "talk", // talk Amazon Registry Services, Inc.
  1175.         "taobao", // taobao Alibaba Group Holding Limited
  1176.         "target", // target Target Domain Holdings, LLC
  1177.         "tatamotors", // tatamotors Tata Motors Ltd
  1178.         "tatar", // tatar LLC "Coordination Center of Regional Domain of Tatarstan Republic"
  1179.         "tattoo", // tattoo Uniregistry, Corp.
  1180.         "tax", // tax Storm Orchard, LLC
  1181.         "taxi", // taxi Pine Falls, LLC
  1182.         "tci", // tci Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  1183.         "tdk", // tdk TDK Corporation
  1184.         "team", // team Atomic Lake, LLC
  1185.         "tech", // tech Dot Tech LLC
  1186.         "technology", // technology Auburn Falls, LLC
  1187.         "tel", // tel Telnic Ltd.
  1188. //        "telecity", // telecity TelecityGroup International Limited
  1189. //        "telefonica", // telefonica Telefónica S.A.
  1190.         "temasek", // temasek Temasek Holdings (Private) Limited
  1191.         "tennis", // tennis Cotton Bloom, LLC
  1192.         "teva", // teva Teva Pharmaceutical Industries Limited
  1193.         "thd", // thd Homer TLC, Inc.
  1194.         "theater", // theater Blue Tigers, LLC
  1195.         "theatre", // theatre XYZ.COM LLC
  1196.         "tiaa", // tiaa Teachers Insurance and Annuity Association of America
  1197.         "tickets", // tickets Accent Media Limited
  1198.         "tienda", // tienda Victor Manor, LLC
  1199.         // "tiffany", // tiffany Tiffany and Company
  1200.         "tips", // tips Corn Willow, LLC
  1201.         "tires", // tires Dog Edge, LLC
  1202.         "tirol", // tirol punkt Tirol GmbH
  1203.         "tjmaxx", // tjmaxx The TJX Companies, Inc.
  1204.         "tjx", // tjx The TJX Companies, Inc.
  1205.         "tkmaxx", // tkmaxx The TJX Companies, Inc.
  1206.         "tmall", // tmall Alibaba Group Holding Limited
  1207.         "today", // today Pearl Woods, LLC
  1208.         "tokyo", // tokyo GMO Registry, Inc.
  1209.         "tools", // tools Pioneer North, LLC
  1210.         "top", // top Jiangsu Bangning Science &amp; Technology Co.,Ltd.
  1211.         "toray", // toray Toray Industries, Inc.
  1212.         "toshiba", // toshiba TOSHIBA Corporation
  1213.         "total", // total Total SA
  1214.         "tours", // tours Sugar Station, LLC
  1215.         "town", // town Koko Moon, LLC
  1216.         "toyota", // toyota TOYOTA MOTOR CORPORATION
  1217.         "toys", // toys Pioneer Orchard, LLC
  1218.         "trade", // trade Elite Registry Limited
  1219.         "trading", // trading DOTTRADING REGISTRY LTD
  1220.         "training", // training Wild Willow, LLC
  1221.         "travel", // travel Tralliance Registry Management Company, LLC.
  1222.         // "travelchannel", // travelchannel Lifestyle Domain Holdings, Inc.
  1223.         "travelers", // travelers Travelers TLD, LLC
  1224.         "travelersinsurance", // travelersinsurance Travelers TLD, LLC
  1225.         "trust", // trust Artemis Internet Inc
  1226.         "trv", // trv Travelers TLD, LLC
  1227.         "tube", // tube Latin American Telecom LLC
  1228.         "tui", // tui TUI AG
  1229.         "tunes", // tunes Amazon Registry Services, Inc.
  1230.         "tushu", // tushu Amazon Registry Services, Inc.
  1231.         "tvs", // tvs T V SUNDRAM IYENGAR  &amp; SONS PRIVATE LIMITED
  1232.         "ubank", // ubank National Australia Bank Limited
  1233.         "ubs", // ubs UBS AG
  1234. //        "uconnect", // uconnect FCA US LLC.
  1235.         "unicom", // unicom China United Network Communications Corporation Limited
  1236.         "university", // university Little Station, LLC
  1237.         "uno", // uno Dot Latin LLC
  1238.         "uol", // uol UBN INTERNET LTDA.
  1239.         "ups", // ups UPS Market Driver, Inc.
  1240.         "vacations", // vacations Atomic Tigers, LLC
  1241.         "vana", // vana Lifestyle Domain Holdings, Inc.
  1242.         "vanguard", // vanguard The Vanguard Group, Inc.
  1243.         "vegas", // vegas Dot Vegas, Inc.
  1244.         "ventures", // ventures Binky Lake, LLC
  1245.         "verisign", // verisign VeriSign, Inc.
  1246.         "versicherung", // versicherung dotversicherung-registry GmbH
  1247.         "vet", // vet United TLD Holdco, Ltd
  1248.         "viajes", // viajes Black Madison, LLC
  1249.         "video", // video United TLD Holdco, Ltd
  1250.         "vig", // vig VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
  1251.         "viking", // viking Viking River Cruises (Bermuda) Ltd.
  1252.         "villas", // villas New Sky, LLC
  1253.         "vin", // vin Holly Shadow, LLC
  1254.         "vip", // vip Minds + Machines Group Limited
  1255.         "virgin", // virgin Virgin Enterprises Limited
  1256.         "visa", // visa Visa Worldwide Pte. Limited
  1257.         "vision", // vision Koko Station, LLC
  1258. //        "vista", // vista Vistaprint Limited
  1259. //        "vistaprint", // vistaprint Vistaprint Limited
  1260.         "viva", // viva Saudi Telecom Company
  1261.         "vivo", // vivo Telefonica Brasil S.A.
  1262.         "vlaanderen", // vlaanderen DNS.be vzw
  1263.         "vodka", // vodka Top Level Domain Holdings Limited
  1264.         // "volkswagen", // volkswagen Volkswagen Group of America Inc.
  1265.         "volvo", // volvo Volvo Holding Sverige Aktiebolag
  1266.         "vote", // vote Monolith Registry LLC
  1267.         "voting", // voting Valuetainment Corp.
  1268.         "voto", // voto Monolith Registry LLC
  1269.         "voyage", // voyage Ruby House, LLC
  1270.         // "vuelos", // vuelos Travel Reservations SRL
  1271.         "wales", // wales Nominet UK
  1272.         "walmart", // walmart Wal-Mart Stores, Inc.
  1273.         "walter", // walter Sandvik AB
  1274.         "wang", // wang Zodiac Registry Limited
  1275.         "wanggou", // wanggou Amazon Registry Services, Inc.
  1276. //        "warman", // warman Weir Group IP Limited
  1277.         "watch", // watch Sand Shadow, LLC
  1278.         "watches", // watches Richemont DNS Inc.
  1279.         "weather", // weather The Weather Channel, LLC
  1280.         "weatherchannel", // weatherchannel The Weather Channel, LLC
  1281.         "webcam", // webcam dot Webcam Limited
  1282.         "weber", // weber Saint-Gobain Weber SA
  1283.         "website", // website DotWebsite Inc.
  1284.         "wed", // wed Atgron, Inc.
  1285.         "wedding", // wedding Top Level Domain Holdings Limited
  1286.         "weibo", // weibo Sina Corporation
  1287.         "weir", // weir Weir Group IP Limited
  1288.         "whoswho", // whoswho Who&#39;s Who Registry
  1289.         "wien", // wien punkt.wien GmbH
  1290.         "wiki", // wiki Top Level Design, LLC
  1291.         "williamhill", // williamhill William Hill Organization Limited
  1292.         "win", // win First Registry Limited
  1293.         "windows", // windows Microsoft Corporation
  1294.         "wine", // wine June Station, LLC
  1295.         "winners", // winners The TJX Companies, Inc.
  1296.         "wme", // wme William Morris Endeavor Entertainment, LLC
  1297.         "wolterskluwer", // wolterskluwer Wolters Kluwer N.V.
  1298.         "woodside", // woodside Woodside Petroleum Limited
  1299.         "work", // work Top Level Domain Holdings Limited
  1300.         "works", // works Little Dynamite, LLC
  1301.         "world", // world Bitter Fields, LLC
  1302.         "wow", // wow Amazon Registry Services, Inc.
  1303.         "wtc", // wtc World Trade Centers Association, Inc.
  1304.         "wtf", // wtf Hidden Way, LLC
  1305.         "xbox", // xbox Microsoft Corporation
  1306.         "xerox", // xerox Xerox DNHC LLC
  1307.         // "xfinity", // xfinity Comcast IP Holdings I, LLC
  1308.         "xihuan", // xihuan QIHOO 360 TECHNOLOGY CO. LTD.
  1309.         "xin", // xin Elegant Leader Limited
  1310.         "xn--11b4c3d", // कॉम VeriSign Sarl
  1311.         "xn--1ck2e1b", // セール Amazon Registry Services, Inc.
  1312.         "xn--1qqw23a", // 佛山 Guangzhou YU Wei Information Technology Co., Ltd.
  1313.         "xn--30rr7y", // 慈善 Excellent First Limited
  1314.         "xn--3bst00m", // 集团 Eagle Horizon Limited
  1315.         "xn--3ds443g", // 在线 TLD REGISTRY LIMITED
  1316. //        "xn--3oq18vl8pn36a", // 大众汽车 Volkswagen (China) Investment Co., Ltd.
  1317.         "xn--3pxu8k", // 点看 VeriSign Sarl
  1318.         "xn--42c2d9a", // คอม VeriSign Sarl
  1319.         "xn--45q11c", // 八卦 Zodiac Scorpio Limited
  1320.         "xn--4gbrim", // موقع Suhub Electronic Establishment
  1321.         "xn--55qw42g", // 公益 China Organizational Name Administration Center
  1322.         "xn--55qx5d", // 公司 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
  1323.         "xn--5su34j936bgsg", // 香格里拉 Shangri‐La International Hotel Management Limited
  1324.         "xn--5tzm5g", // 网站 Global Website TLD Asia Limited
  1325.         "xn--6frz82g", // 移动 Afilias Limited
  1326.         "xn--6qq986b3xl", // 我爱你 Tycoon Treasure Limited
  1327.         "xn--80adxhks", // москва Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
  1328.         "xn--80aqecdr1a", // католик Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  1329.         "xn--80asehdb", // онлайн CORE Association
  1330.         "xn--80aswg", // сайт CORE Association
  1331.         "xn--8y0a063a", // 联通 China United Network Communications Corporation Limited
  1332.         "xn--90ae", // бг Imena.BG Plc (NAMES.BG Plc)
  1333.         "xn--9dbq2a", // קום VeriSign Sarl
  1334.         "xn--9et52u", // 时尚 RISE VICTORY LIMITED
  1335.         "xn--9krt00a", // 微博 Sina Corporation
  1336.         "xn--b4w605ferd", // 淡马锡 Temasek Holdings (Private) Limited
  1337.         "xn--bck1b9a5dre4c", // ファッション Amazon Registry Services, Inc.
  1338.         "xn--c1avg", // орг Public Interest Registry
  1339.         "xn--c2br7g", // नेट VeriSign Sarl
  1340.         "xn--cck2b3b", // ストア Amazon Registry Services, Inc.
  1341.         "xn--cckwcxetd", // アマゾン Amazon Registry Services, Inc.
  1342.         "xn--cg4bki", // 삼성 SAMSUNG SDS CO., LTD
  1343.         "xn--czr694b", // 商标 HU YI GLOBAL INFORMATION RESOURCES(HOLDING) COMPANY.HONGKONG LIMITED
  1344.         "xn--czrs0t", // 商店 Wild Island, LLC
  1345.         "xn--czru2d", // 商城 Zodiac Aquarius Limited
  1346.         "xn--d1acj3b", // дети The Foundation for Network Initiatives “The Smart Internet”
  1347.         "xn--eckvdtc9d", // ポイント Amazon Registry Services, Inc.
  1348.         "xn--efvy88h", // 新闻 Xinhua News Agency Guangdong Branch 新华通讯社广东分社
  1349. //        "xn--estv75g", // 工行 Industrial and Commercial Bank of China Limited
  1350.         "xn--fct429k", // 家電 Amazon Registry Services, Inc.
  1351.         "xn--fhbei", // كوم VeriSign Sarl
  1352.         "xn--fiq228c5hs", // 中文网 TLD REGISTRY LIMITED
  1353.         "xn--fiq64b", // 中信 CITIC Group Corporation
  1354.         "xn--fjq720a", // 娱乐 Will Bloom, LLC
  1355.         "xn--flw351e", // 谷歌 Charleston Road Registry Inc.
  1356.         "xn--fzys8d69uvgm", // 電訊盈科 PCCW Enterprises Limited
  1357.         "xn--g2xx48c", // 购物 Minds + Machines Group Limited
  1358.         "xn--gckr3f0f", // クラウド Amazon Registry Services, Inc.
  1359.         "xn--gk3at1e", // 通販 Amazon Registry Services, Inc.
  1360.         "xn--hxt814e", // 网店 Zodiac Libra Limited
  1361.         "xn--i1b6b1a6a2e", // संगठन Public Interest Registry
  1362.         "xn--imr513n", // 餐厅 HU YI GLOBAL INFORMATION RESOURCES (HOLDING) COMPANY. HONGKONG LIMITED
  1363.         "xn--io0a7i", // 网络 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
  1364.         "xn--j1aef", // ком VeriSign Sarl
  1365.         "xn--jlq480n2rg", // 亚马逊 Amazon Registry Services, Inc.
  1366. //        "xn--jlq61u9w7b", // 诺基亚 Nokia Corporation
  1367.         "xn--jvr189m", // 食品 Amazon Registry Services, Inc.
  1368.         "xn--kcrx77d1x4a", // 飞利浦 Koninklijke Philips N.V.
  1369. //        "xn--kpu716f", // 手表 Richemont DNS Inc. [Not assigned as of Jul 25]
  1370.         "xn--kput3i", // 手机 Beijing RITT-Net Technology Development Co., Ltd
  1371.         "xn--mgba3a3ejt", // ارامكو Aramco Services Company
  1372.         "xn--mgba7c0bbn0a", // العليان Crescent Holding GmbH
  1373.         // "xn--mgbaakc7dvf", // اتصالات Emirates Telecommunications Corporation (trading as Etisalat)
  1374.         "xn--mgbab2bd", // بازار CORE Association
  1375. //        "xn--mgbb9fbpob", // موبايلي GreenTech Consultancy Company W.L.L.
  1376.         "xn--mgbca7dzdo", // ابوظبي Abu Dhabi Systems and Information Centre
  1377.         "xn--mgbi4ecexp", // كاثوليك Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  1378.         "xn--mgbt3dhd", // همراه Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  1379.         "xn--mk1bu44c", // 닷컴 VeriSign Sarl
  1380.         "xn--mxtq1m", // 政府 Net-Chinese Co., Ltd.
  1381.         "xn--ngbc5azd", // شبكة International Domain Registry Pty. Ltd.
  1382.         "xn--ngbe9e0a", // بيتك Kuwait Finance House
  1383.         "xn--ngbrx", // عرب League of Arab States
  1384.         "xn--nqv7f", // 机构 Public Interest Registry
  1385.         "xn--nqv7fs00ema", // 组织机构 Public Interest Registry
  1386.         "xn--nyqy26a", // 健康 Stable Tone Limited
  1387.         "xn--otu796d", // 招聘 Dot Trademark TLD Holding Company Limited
  1388.         "xn--p1acf", // рус Rusnames Limited
  1389. //        "xn--pbt977c", // 珠宝 Richemont DNS Inc. [Not assigned as of Jul 25]
  1390.         "xn--pssy2u", // 大拿 VeriSign Sarl
  1391.         "xn--q9jyb4c", // みんな Charleston Road Registry Inc.
  1392.         "xn--qcka1pmc", // グーグル Charleston Road Registry Inc.
  1393.         "xn--rhqv96g", // 世界 Stable Tone Limited
  1394.         "xn--rovu88b", // 書籍 Amazon EU S.à r.l.
  1395.         "xn--ses554g", // 网址 KNET Co., Ltd
  1396.         "xn--t60b56a", // 닷넷 VeriSign Sarl
  1397.         "xn--tckwe", // コム VeriSign Sarl
  1398.         "xn--tiq49xqyj", // 天主教 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  1399.         "xn--unup4y", // 游戏 Spring Fields, LLC
  1400.         "xn--vermgensberater-ctb", // VERMöGENSBERATER Deutsche Vermögensberatung Aktiengesellschaft DVAG
  1401.         "xn--vermgensberatung-pwb", // VERMöGENSBERATUNG Deutsche Vermögensberatung Aktiengesellschaft DVAG
  1402.         "xn--vhquv", // 企业 Dash McCook, LLC
  1403.         "xn--vuq861b", // 信息 Beijing Tele-info Network Technology Co., Ltd.
  1404.         "xn--w4r85el8fhu5dnra", // 嘉里大酒店 Kerry Trading Co. Limited
  1405.         "xn--w4rs40l", // 嘉里 Kerry Trading Co. Limited
  1406.         "xn--xhq521b", // 广东 Guangzhou YU Wei Information Technology Co., Ltd.
  1407.         "xn--zfr164b", // 政务 China Organizational Name Administration Center
  1408. //        "xperia", // xperia Sony Mobile Communications AB
  1409.         "xxx", // xxx ICM Registry LLC
  1410.         "xyz", // xyz XYZ.COM LLC
  1411.         "yachts", // yachts DERYachts, LLC
  1412.         "yahoo", // yahoo Yahoo! Domain Services Inc.
  1413.         "yamaxun", // yamaxun Amazon Registry Services, Inc.
  1414.         "yandex", // yandex YANDEX, LLC
  1415.         "yodobashi", // yodobashi YODOBASHI CAMERA CO.,LTD.
  1416.         "yoga", // yoga Top Level Domain Holdings Limited
  1417.         "yokohama", // yokohama GMO Registry, Inc.
  1418.         "you", // you Amazon Registry Services, Inc.
  1419.         "youtube", // youtube Charleston Road Registry Inc.
  1420.         "yun", // yun QIHOO 360 TECHNOLOGY CO. LTD.
  1421.         "zappos", // zappos Amazon Registry Services, Inc.
  1422.         "zara", // zara Industria de Diseño Textil, S.A. (INDITEX, S.A.)
  1423.         "zero", // zero Amazon Registry Services, Inc.
  1424.         "zip", // zip Charleston Road Registry Inc.
  1425. //        "zippo", // zippo Zadco Company
  1426.         "zone", // zone Outer Falls, LLC
  1427.         "zuerich", // zuerich Kanton Zürich (Canton of Zurich)
  1428. };

  1429.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1430.     private static final String[] COUNTRY_CODE_TLDS = {
  1431.         // Taken from Version 2024040200, Last Updated Tue Apr  2 07:07:02 2024 UTC
  1432.         "ac",                 // Ascension Island
  1433.         "ad",                 // Andorra
  1434.         "ae",                 // United Arab Emirates
  1435.         "af",                 // Afghanistan
  1436.         "ag",                 // Antigua and Barbuda
  1437.         "ai",                 // Anguilla
  1438.         "al",                 // Albania
  1439.         "am",                 // Armenia
  1440. //        "an",                 // Netherlands Antilles (retired)
  1441.         "ao",                 // Angola
  1442.         "aq",                 // Antarctica
  1443.         "ar",                 // Argentina
  1444.         "as",                 // American Samoa
  1445.         "at",                 // Austria
  1446.         "au",                 // Australia (includes Ashmore and Cartier Islands and Coral Sea Islands)
  1447.         "aw",                 // Aruba
  1448.         "ax",                 // Åland
  1449.         "az",                 // Azerbaijan
  1450.         "ba",                 // Bosnia and Herzegovina
  1451.         "bb",                 // Barbados
  1452.         "bd",                 // Bangladesh
  1453.         "be",                 // Belgium
  1454.         "bf",                 // Burkina Faso
  1455.         "bg",                 // Bulgaria
  1456.         "bh",                 // Bahrain
  1457.         "bi",                 // Burundi
  1458.         "bj",                 // Benin
  1459.         "bm",                 // Bermuda
  1460.         "bn",                 // Brunei Darussalam
  1461.         "bo",                 // Bolivia
  1462.         "br",                 // Brazil
  1463.         "bs",                 // Bahamas
  1464.         "bt",                 // Bhutan
  1465.         "bv",                 // Bouvet Island
  1466.         "bw",                 // Botswana
  1467.         "by",                 // Belarus
  1468.         "bz",                 // Belize
  1469.         "ca",                 // Canada
  1470.         "cc",                 // Cocos (Keeling) Islands
  1471.         "cd",                 // Democratic Republic of the Congo (formerly Zaire)
  1472.         "cf",                 // Central African Republic
  1473.         "cg",                 // Republic of the Congo
  1474.         "ch",                 // Switzerland
  1475.         "ci",                 // Côte d'Ivoire
  1476.         "ck",                 // Cook Islands
  1477.         "cl",                 // Chile
  1478.         "cm",                 // Cameroon
  1479.         "cn",                 // China, mainland
  1480.         "co",                 // Colombia
  1481.         "cr",                 // Costa Rica
  1482.         "cu",                 // Cuba
  1483.         "cv",                 // Cape Verde
  1484.         "cw",                 // Curaçao
  1485.         "cx",                 // Christmas Island
  1486.         "cy",                 // Cyprus
  1487.         "cz",                 // Czech Republic
  1488.         "de",                 // Germany
  1489.         "dj",                 // Djibouti
  1490.         "dk",                 // Denmark
  1491.         "dm",                 // Dominica
  1492.         "do",                 // Dominican Republic
  1493.         "dz",                 // Algeria
  1494.         "ec",                 // Ecuador
  1495.         "ee",                 // Estonia
  1496.         "eg",                 // Egypt
  1497.         "er",                 // Eritrea
  1498.         "es",                 // Spain
  1499.         "et",                 // Ethiopia
  1500.         "eu",                 // European Union
  1501.         "fi",                 // Finland
  1502.         "fj",                 // Fiji
  1503.         "fk",                 // Falkland Islands
  1504.         "fm",                 // Federated States of Micronesia
  1505.         "fo",                 // Faroe Islands
  1506.         "fr",                 // France
  1507.         "ga",                 // Gabon
  1508.         "gb",                 // Great Britain (United Kingdom)
  1509.         "gd",                 // Grenada
  1510.         "ge",                 // Georgia
  1511.         "gf",                 // French Guiana
  1512.         "gg",                 // Guernsey
  1513.         "gh",                 // Ghana
  1514.         "gi",                 // Gibraltar
  1515.         "gl",                 // Greenland
  1516.         "gm",                 // The Gambia
  1517.         "gn",                 // Guinea
  1518.         "gp",                 // Guadeloupe
  1519.         "gq",                 // Equatorial Guinea
  1520.         "gr",                 // Greece
  1521.         "gs",                 // South Georgia and the South Sandwich Islands
  1522.         "gt",                 // Guatemala
  1523.         "gu",                 // Guam
  1524.         "gw",                 // Guinea-Bissau
  1525.         "gy",                 // Guyana
  1526.         "hk",                 // Hong Kong
  1527.         "hm",                 // Heard Island and McDonald Islands
  1528.         "hn",                 // Honduras
  1529.         "hr",                 // Croatia (Hrvatska)
  1530.         "ht",                 // Haiti
  1531.         "hu",                 // Hungary
  1532.         "id",                 // Indonesia
  1533.         "ie",                 // Ireland (Éire)
  1534.         "il",                 // Israel
  1535.         "im",                 // Isle of Man
  1536.         "in",                 // India
  1537.         "io",                 // British Indian Ocean Territory
  1538.         "iq",                 // Iraq
  1539.         "ir",                 // Iran
  1540.         "is",                 // Iceland
  1541.         "it",                 // Italy
  1542.         "je",                 // Jersey
  1543.         "jm",                 // Jamaica
  1544.         "jo",                 // Jordan
  1545.         "jp",                 // Japan
  1546.         "ke",                 // Kenya
  1547.         "kg",                 // Kyrgyzstan
  1548.         "kh",                 // Cambodia (Khmer)
  1549.         "ki",                 // Kiribati
  1550.         "km",                 // Comoros
  1551.         "kn",                 // Saint Kitts and Nevis
  1552.         "kp",                 // North Korea
  1553.         "kr",                 // South Korea
  1554.         "kw",                 // Kuwait
  1555.         "ky",                 // Cayman Islands
  1556.         "kz",                 // Kazakhstan
  1557.         "la",                 // Laos (currently being marketed as the official domain for Los Angeles)
  1558.         "lb",                 // Lebanon
  1559.         "lc",                 // Saint Lucia
  1560.         "li",                 // Liechtenstein
  1561.         "lk",                 // Sri Lanka
  1562.         "lr",                 // Liberia
  1563.         "ls",                 // Lesotho
  1564.         "lt",                 // Lithuania
  1565.         "lu",                 // Luxembourg
  1566.         "lv",                 // Latvia
  1567.         "ly",                 // Libya
  1568.         "ma",                 // Morocco
  1569.         "mc",                 // Monaco
  1570.         "md",                 // Moldova
  1571.         "me",                 // Montenegro
  1572.         "mg",                 // Madagascar
  1573.         "mh",                 // Marshall Islands
  1574.         "mk",                 // Republic of Macedonia
  1575.         "ml",                 // Mali
  1576.         "mm",                 // Myanmar
  1577.         "mn",                 // Mongolia
  1578.         "mo",                 // Macau
  1579.         "mp",                 // Northern Mariana Islands
  1580.         "mq",                 // Martinique
  1581.         "mr",                 // Mauritania
  1582.         "ms",                 // Montserrat
  1583.         "mt",                 // Malta
  1584.         "mu",                 // Mauritius
  1585.         "mv",                 // Maldives
  1586.         "mw",                 // Malawi
  1587.         "mx",                 // Mexico
  1588.         "my",                 // Malaysia
  1589.         "mz",                 // Mozambique
  1590.         "na",                 // Namibia
  1591.         "nc",                 // New Caledonia
  1592.         "ne",                 // Niger
  1593.         "nf",                 // Norfolk Island
  1594.         "ng",                 // Nigeria
  1595.         "ni",                 // Nicaragua
  1596.         "nl",                 // Netherlands
  1597.         "no",                 // Norway
  1598.         "np",                 // Nepal
  1599.         "nr",                 // Nauru
  1600.         "nu",                 // Niue
  1601.         "nz",                 // New Zealand
  1602.         "om",                 // Oman
  1603.         "pa",                 // Panama
  1604.         "pe",                 // Peru
  1605.         "pf",                 // French Polynesia With Clipperton Island
  1606.         "pg",                 // Papua New Guinea
  1607.         "ph",                 // Philippines
  1608.         "pk",                 // Pakistan
  1609.         "pl",                 // Poland
  1610.         "pm",                 // Saint-Pierre and Miquelon
  1611.         "pn",                 // Pitcairn Islands
  1612.         "pr",                 // Puerto Rico
  1613.         "ps",                 // Palestinian territories (PA-controlled West Bank and Gaza Strip)
  1614.         "pt",                 // Portugal
  1615.         "pw",                 // Palau
  1616.         "py",                 // Paraguay
  1617.         "qa",                 // Qatar
  1618.         "re",                 // Réunion
  1619.         "ro",                 // Romania
  1620.         "rs",                 // Serbia
  1621.         "ru",                 // Russia
  1622.         "rw",                 // Rwanda
  1623.         "sa",                 // Saudi Arabia
  1624.         "sb",                 // Solomon Islands
  1625.         "sc",                 // Seychelles
  1626.         "sd",                 // Sudan
  1627.         "se",                 // Sweden
  1628.         "sg",                 // Singapore
  1629.         "sh",                 // Saint Helena
  1630.         "si",                 // Slovenia
  1631.         "sj",                 // Svalbard and Jan Mayen Islands Not in use (Norwegian dependencies; see .no)
  1632.         "sk",                 // Slovakia
  1633.         "sl",                 // Sierra Leone
  1634.         "sm",                 // San Marino
  1635.         "sn",                 // Senegal
  1636.         "so",                 // Somalia
  1637.         "sr",                 // Suriname
  1638.         "ss",                 // ss National Communication Authority (NCA)
  1639.         "st",                 // São Tomé and Príncipe
  1640.         "su",                 // Soviet Union (deprecated)
  1641.         "sv",                 // El Salvador
  1642.         "sx",                 // Sint Maarten
  1643.         "sy",                 // Syria
  1644.         "sz",                 // Swaziland
  1645.         "tc",                 // Turks and Caicos Islands
  1646.         "td",                 // Chad
  1647.         "tf",                 // French Southern and Antarctic Lands
  1648.         "tg",                 // Togo
  1649.         "th",                 // Thailand
  1650.         "tj",                 // Tajikistan
  1651.         "tk",                 // Tokelau
  1652.         "tl",                 // East Timor (deprecated old code)
  1653.         "tm",                 // Turkmenistan
  1654.         "tn",                 // Tunisia
  1655.         "to",                 // Tonga
  1656. //        "tp",                 // East Timor (Retired)
  1657.         "tr",                 // Turkey
  1658.         "tt",                 // Trinidad and Tobago
  1659.         "tv",                 // Tuvalu
  1660.         "tw",                 // Taiwan, Republic of China
  1661.         "tz",                 // Tanzania
  1662.         "ua",                 // Ukraine
  1663.         "ug",                 // Uganda
  1664.         "uk",                 // United Kingdom
  1665.         "us",                 // United States of America
  1666.         "uy",                 // Uruguay
  1667.         "uz",                 // Uzbekistan
  1668.         "va",                 // Vatican City State
  1669.         "vc",                 // Saint Vincent and the Grenadines
  1670.         "ve",                 // Venezuela
  1671.         "vg",                 // British Virgin Islands
  1672.         "vi",                 // U.S. Virgin Islands
  1673.         "vn",                 // Vietnam
  1674.         "vu",                 // Vanuatu
  1675.         "wf",                 // Wallis and Futuna
  1676.         "ws",                 // Samoa (formerly Western Samoa)
  1677.         "xn--2scrj9c", // ಭಾರತ National Internet eXchange of India
  1678.         "xn--3e0b707e", // 한국 KISA (Korea Internet &amp; Security Agency)
  1679.         "xn--3hcrj9c", // ଭାରତ National Internet eXchange of India
  1680.         "xn--45br5cyl", // ভাৰত National Internet eXchange of India
  1681.         "xn--45brj9c", // ভারত National Internet Exchange of India
  1682.         "xn--4dbrk0ce", // ישראל The Israel Internet Association (RA)
  1683.         "xn--54b7fta0cc", // বাংলা Posts and Telecommunications Division
  1684.         "xn--80ao21a", // қаз Association of IT Companies of Kazakhstan
  1685.         "xn--90a3ac", // срб Serbian National Internet Domain Registry (RNIDS)
  1686.         "xn--90ais", // ??? Reliable Software Inc.
  1687.         "xn--clchc0ea0b2g2a9gcd", // சிங்கப்பூர் Singapore Network Information Centre (SGNIC) Pte Ltd
  1688.         "xn--d1alf", // мкд Macedonian Academic Research Network Skopje
  1689.         "xn--e1a4c", // ею EURid vzw/asbl
  1690.         "xn--fiqs8s", // 中国 China Internet Network Information Center
  1691.         "xn--fiqz9s", // 中國 China Internet Network Information Center
  1692.         "xn--fpcrj9c3d", // భారత్ National Internet Exchange of India
  1693.         "xn--fzc2c9e2c", // ලංකා LK Domain Registry
  1694.         "xn--gecrj9c", // ભારત National Internet Exchange of India
  1695.         "xn--h2breg3eve", // भारतम् National Internet eXchange of India
  1696.         "xn--h2brj9c", // भारत National Internet Exchange of India
  1697.         "xn--h2brj9c8c", // भारोत National Internet eXchange of India
  1698.         "xn--j1amh", // укр Ukrainian Network Information Centre (UANIC), Inc.
  1699.         "xn--j6w193g", // 香港 Hong Kong Internet Registration Corporation Ltd.
  1700.         "xn--kprw13d", // 台湾 Taiwan Network Information Center (TWNIC)
  1701.         "xn--kpry57d", // 台灣 Taiwan Network Information Center (TWNIC)
  1702.         "xn--l1acc", // мон Datacom Co.,Ltd
  1703.         "xn--lgbbat1ad8j", // الجزائر CERIST
  1704.         "xn--mgb9awbf", // عمان Telecommunications Regulatory Authority (TRA)
  1705.         "xn--mgba3a4f16a", // ایران Institute for Research in Fundamental Sciences (IPM)
  1706.         "xn--mgbaam7a8h", // امارات Telecommunications Regulatory Authority (TRA)
  1707.         "xn--mgbah1a3hjkrd", // موريتانيا Université de Nouakchott Al Aasriya
  1708.         "xn--mgbai9azgqp6j", // پاکستان National Telecommunication Corporation
  1709.         "xn--mgbayh7gpa", // الاردن National Information Technology Center (NITC)
  1710.         "xn--mgbbh1a", // بارت National Internet eXchange of India
  1711.         "xn--mgbbh1a71e", // بھارت National Internet Exchange of India
  1712.         "xn--mgbc0a9azcg", // المغرب Agence Nationale de Réglementation des Télécommunications (ANRT)
  1713.         "xn--mgbcpq6gpa1a", // البحرين Telecommunications Regulatory Authority (TRA)
  1714.         "xn--mgberp4a5d4ar", // السعودية Communications and Information Technology Commission
  1715.         "xn--mgbgu82a", // ڀارت National Internet eXchange of India
  1716.         "xn--mgbpl2fh", // ????? Sudan Internet Society
  1717.         "xn--mgbtx2b", // عراق Communications and Media Commission (CMC)
  1718.         "xn--mgbx4cd0ab", // مليسيا MYNIC Berhad
  1719.         "xn--mix891f", // 澳門 Bureau of Telecommunications Regulation (DSRT)
  1720.         "xn--node", // გე Information Technologies Development Center (ITDC)
  1721.         "xn--o3cw4h", // ไทย Thai Network Information Center Foundation
  1722.         "xn--ogbpf8fl", // سورية National Agency for Network Services (NANS)
  1723.         "xn--p1ai", // рф Coordination Center for TLD RU
  1724.         "xn--pgbs0dh", // تونس Agence Tunisienne d&#39;Internet
  1725.         "xn--q7ce6a", // ລາວ Lao National Internet Center (LANIC)
  1726.         "xn--qxa6a", // ευ EURid vzw/asbl
  1727.         "xn--qxam", // ελ ICS-FORTH GR
  1728.         "xn--rvc1e0am3e", // ഭാരതം National Internet eXchange of India
  1729.         "xn--s9brj9c", // ਭਾਰਤ National Internet Exchange of India
  1730.         "xn--wgbh1c", // مصر National Telecommunication Regulatory Authority - NTRA
  1731.         "xn--wgbl6a", // قطر Communications Regulatory Authority
  1732.         "xn--xkc2al3hye2a", // இலங்கை LK Domain Registry
  1733.         "xn--xkc2dl3a5ee0h", // இந்தியா National Internet Exchange of India
  1734.         "xn--y9a3aq", // ??? Internet Society
  1735.         "xn--yfro4i67o", // 新加坡 Singapore Network Information Centre (SGNIC) Pte Ltd
  1736.         "xn--ygbi2ammx", // فلسطين Ministry of Telecom &amp; Information Technology (MTIT)
  1737.         "ye",                 // Yemen
  1738.         "yt",                 // Mayotte
  1739.         "za",                 // South Africa
  1740.         "zm",                 // Zambia
  1741.         "zw",                 // Zimbabwe
  1742.     };

  1743.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1744.     private static final String[] LOCAL_TLDS = {
  1745.        "localdomain",         // Also widely used as localhost.localdomain
  1746.        "localhost",           // RFC2606 defined
  1747.     };
  1748.     /*
  1749.      * This field is used to detect whether the getInstance has been called.
  1750.      * After this, the method updateTLDOverride is not allowed to be called.
  1751.      * This field does not need to be volatile since it is only accessed from
  1752.      * synchronized methods.
  1753.      */
  1754.     private static boolean inUse;
  1755.     /*
  1756.      * These arrays are mutable.
  1757.      * They can only be updated by the updateTLDOverride method, and readers must first get an instance
  1758.      * using the getInstance methods which are all (now) synchronized.
  1759.      * The only other access is via getTLDEntries which is now synchronized.
  1760.      */
  1761.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1762.     private static String[] countryCodeTLDsPlus = EMPTY_STRING_ARRAY;
  1763.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1764.     private static String[] genericTLDsPlus = EMPTY_STRING_ARRAY;
  1765.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1766.     private static String[] countryCodeTLDsMinus = EMPTY_STRING_ARRAY;
  1767.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1768.     private static String[] genericTLDsMinus = EMPTY_STRING_ARRAY;

  1769.     // N.B. The constructors are deliberately private to avoid possible problems with unsafe publication.
  1770.     // It is vital that the static override arrays are not mutable once they have been used in an instance
  1771.     // The arrays could be copied into the instance variables, however if the static array were changed it could
  1772.     // result in different settings for the shared default instances

  1773.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1774.     private static String[] localTLDsMinus = EMPTY_STRING_ARRAY;

  1775.     // WARNING: this array MUST be sorted, otherwise it cannot be searched reliably using binary search
  1776.     private static String[] localTLDsPlus = EMPTY_STRING_ARRAY;

  1777.     /**
  1778.      * Check if a sorted array contains the specified key
  1779.      *
  1780.      * @param sortedArray the array to search
  1781.      * @param key the key to find
  1782.      * @return {@code true} if the array contains the key
  1783.      */
  1784.     private static boolean arrayContains(final String[] sortedArray, final String key) {
  1785.         return Arrays.binarySearch(sortedArray, key) >= 0;
  1786.     }

  1787.     /**
  1788.      * Returns the singleton instance of this validator. It
  1789.      *  will not consider local addresses as valid.
  1790.      * @return the singleton instance of this validator
  1791.      */
  1792.     public static synchronized DomainValidator getInstance() {
  1793.         inUse = true;
  1794.         return LazyHolder.DOMAIN_VALIDATOR;
  1795.     }

  1796.     /**
  1797.      * Returns the singleton instance of this validator,
  1798.      *  with local validation as required.
  1799.      * @param allowLocal Should local addresses be considered valid?
  1800.      * @return the singleton instance of this validator
  1801.      */
  1802.     public static synchronized DomainValidator getInstance(final boolean allowLocal) {
  1803.         inUse = true;
  1804.         if (allowLocal) {
  1805.             return LazyHolder.DOMAIN_VALIDATOR_WITH_LOCAL;
  1806.         }
  1807.         return LazyHolder.DOMAIN_VALIDATOR;
  1808.     }

  1809.     /**
  1810.      * Returns a new instance of this validator.
  1811.      * The user can provide a list of {@link Item} entries which can
  1812.      * be used to override the generic and country code lists.
  1813.      * Note that any such entries override values provided by the
  1814.      * {@link #updateTLDOverride(ArrayType, String[])} method
  1815.      * If an entry for a particular type is not provided, then
  1816.      * the class override (if any) is retained.
  1817.      *
  1818.      * @param allowLocal Should local addresses be considered valid?
  1819.      * @param items - array of {@link Item} entries
  1820.      * @return an instance of this validator
  1821.      * @since 1.7
  1822.      */
  1823.     public static synchronized DomainValidator getInstance(final boolean allowLocal, final List<Item> items) {
  1824.         inUse = true;
  1825.         return new DomainValidator(allowLocal, items);
  1826.     }

  1827.     /**
  1828.      * Gets a copy of a class level internal array.
  1829.      * @param table the array type (any of the enum values)
  1830.      * @return a copy of the array
  1831.      * @throws IllegalArgumentException if the table type is unexpected (should not happen)
  1832.      * @since 1.5.1
  1833.      */
  1834.     public static synchronized String[] getTLDEntries(final ArrayType table) {
  1835.         final String[] array;
  1836.         switch (table) {
  1837.         case COUNTRY_CODE_MINUS:
  1838.             array = countryCodeTLDsMinus;
  1839.             break;
  1840.         case COUNTRY_CODE_PLUS:
  1841.             array = countryCodeTLDsPlus;
  1842.             break;
  1843.         case GENERIC_MINUS:
  1844.             array = genericTLDsMinus;
  1845.             break;
  1846.         case GENERIC_PLUS:
  1847.             array = genericTLDsPlus;
  1848.             break;
  1849.         case LOCAL_MINUS:
  1850.             array = localTLDsMinus;
  1851.             break;
  1852.         case LOCAL_PLUS:
  1853.             array = localTLDsPlus;
  1854.             break;
  1855.         case GENERIC_RO:
  1856.             array = GENERIC_TLDS;
  1857.             break;
  1858.         case COUNTRY_CODE_RO:
  1859.             array = COUNTRY_CODE_TLDS;
  1860.             break;
  1861.         case INFRASTRUCTURE_RO:
  1862.             array = INFRASTRUCTURE_TLDS;
  1863.             break;
  1864.         case LOCAL_RO:
  1865.             array = LOCAL_TLDS;
  1866.             break;
  1867.         default:
  1868.             throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
  1869.         }
  1870.         return Arrays.copyOf(array, array.length); // clone the array
  1871.     }

  1872.     /*
  1873.      * Check if input contains only ASCII
  1874.      * Treats null as all ASCII
  1875.      */
  1876.     private static boolean isOnlyASCII(final String input) {
  1877.         if (input == null) {
  1878.             return true;
  1879.         }
  1880.         for (int i = 0; i < input.length(); i++) {
  1881.             if (input.charAt(i) > 0x7F) { // CHECKSTYLE IGNORE MagicNumber
  1882.                 return false;
  1883.             }
  1884.         }
  1885.         return true;
  1886.     }

  1887.     /**
  1888.      * Converts potentially Unicode input to punycode.
  1889.      * If conversion fails, returns the original input.
  1890.      *
  1891.      * @param input the string to convert, not null
  1892.      * @return converted input, or original input if conversion fails
  1893.      */
  1894.     // Needed by UrlValidator
  1895.     static String unicodeToASCII(final String input) {
  1896.         if (isOnlyASCII(input)) { // skip possibly expensive processing
  1897.             return input;
  1898.         }
  1899.         try {
  1900.             final String ascii = IDN.toASCII(input);
  1901.             if (IDNBUGHOLDER.IDN_TOASCII_PRESERVES_TRAILING_DOTS) {
  1902.                 return ascii;
  1903.             }
  1904.             final int length = input.length();
  1905.             if (length == 0) { // check there is a last character
  1906.                 return input;
  1907.             }
  1908.             // RFC3490 3.1. 1)
  1909.             // Whenever dots are used as label separators, the following
  1910.             // characters MUST be recognized as dots: U+002E (full stop), U+3002
  1911.             // (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61
  1912.             // (halfwidth ideographic full stop).
  1913.             final char lastChar = input.charAt(length - 1); // fetch original last char
  1914.             switch (lastChar) {
  1915.             case '\u002E': // "." full stop
  1916.             case '\u3002': // ideographic full stop
  1917.             case '\uFF0E': // fullwidth full stop
  1918.             case '\uFF61': // halfwidth ideographic full stop
  1919.                 return ascii + "."; // restore the missing stop
  1920.             default:
  1921.                 return ascii;
  1922.             }
  1923.         } catch (final IllegalArgumentException e) { // input is not valid
  1924.             return input;
  1925.         }
  1926.     }

  1927.     /**
  1928.      * Update one of the TLD override arrays.
  1929.      * This must only be done at program startup, before any instances are accessed using getInstance.
  1930.      * <p>
  1931.      * For example:
  1932.      * <p>
  1933.      * {@code DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, "apache")}
  1934.      * <p>
  1935.      * To clear an override array, provide an empty array.
  1936.      *
  1937.      * @param table the table to update, see {@link DomainValidator.ArrayType}
  1938.      * Must be one of the following
  1939.      * <ul>
  1940.      * <li>COUNTRY_CODE_MINUS</li>
  1941.      * <li>COUNTRY_CODE_PLUS</li>
  1942.      * <li>GENERIC_MINUS</li>
  1943.      * <li>GENERIC_PLUS</li>
  1944.      * <li>LOCAL_MINUS</li>
  1945.      * <li>LOCAL_PLUS</li>
  1946.      * </ul>
  1947.      * @param tlds the array of TLDs, must not be null
  1948.      * @throws IllegalStateException if the method is called after getInstance
  1949.      * @throws IllegalArgumentException if one of the read-only tables is requested
  1950.      * @since 1.5.0
  1951.      */
  1952.     public static synchronized void updateTLDOverride(final ArrayType table, final String... tlds) {
  1953.         if (inUse) {
  1954.             throw new IllegalStateException("Can only invoke this method before calling getInstance");
  1955.         }
  1956.         final String[] copy = new String[tlds.length];
  1957.         // Comparisons are always done with lower-case entries
  1958.         for (int i = 0; i < tlds.length; i++) {
  1959.             copy[i] = tlds[i].toLowerCase(Locale.ENGLISH);
  1960.         }
  1961.         Arrays.sort(copy);
  1962.         switch (table) {
  1963.         case COUNTRY_CODE_MINUS:
  1964.             countryCodeTLDsMinus = copy;
  1965.             break;
  1966.         case COUNTRY_CODE_PLUS:
  1967.             countryCodeTLDsPlus = copy;
  1968.             break;
  1969.         case GENERIC_MINUS:
  1970.             genericTLDsMinus = copy;
  1971.             break;
  1972.         case GENERIC_PLUS:
  1973.             genericTLDsPlus = copy;
  1974.             break;
  1975.         case LOCAL_MINUS:
  1976.             localTLDsMinus = copy;
  1977.             break;
  1978.         case LOCAL_PLUS:
  1979.             localTLDsPlus = copy;
  1980.             break;
  1981.         case COUNTRY_CODE_RO:
  1982.         case GENERIC_RO:
  1983.         case INFRASTRUCTURE_RO:
  1984.         case LOCAL_RO:
  1985.             throw new IllegalArgumentException("Cannot update the table: " + table);
  1986.         default:
  1987.             throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
  1988.         }
  1989.     }

  1990.     /** Whether to allow local overrides. */
  1991.     private final boolean allowLocal;

  1992.     // TLDs defined by IANA
  1993.     // Authoritative and comprehensive list at:
  1994.     // https://data.iana.org/TLD/tlds-alpha-by-domain.txt

  1995.     // Note that the above list is in UPPER case.
  1996.     // The code currently converts strings to lower case (as per the tables below)

  1997.     // IANA also provide an HTML list at http://www.iana.org/domains/root/db
  1998.     // Note that this contains several country code entries which are NOT in
  1999.     // the text file. These all have the "Not assigned" in the "Sponsoring Organisation" column
  2000.     // For example (as of 2015-01-02):
  2001.     // .bl  country-code    Not assigned
  2002.     // .um  country-code    Not assigned

  2003.     /**
  2004.      * RegexValidator for matching domains.
  2005.      */
  2006.     private final RegexValidator domainRegex =
  2007.             new RegexValidator(DOMAIN_NAME_REGEX);

  2008.     /**
  2009.      * RegexValidator for matching a local hostname
  2010.      */
  2011.     // RFC1123 sec 2.1 allows hostnames to start with a digit
  2012.     private final RegexValidator hostnameRegex =
  2013.             new RegexValidator(DOMAIN_LABEL_REGEX);

  2014.     /** Local override. */
  2015.     final String[] myCountryCodeTLDsMinus;

  2016.     /** Local override. */
  2017.     final String[] myCountryCodeTLDsPlus;

  2018.     // Additional arrays to supplement or override the built in ones.
  2019.     // The PLUS arrays are valid keys, the MINUS arrays are invalid keys

  2020.     /** Local override. */
  2021.     final String[] myGenericTLDsPlus;

  2022.     /** Local override. */
  2023.     final String[] myGenericTLDsMinus;

  2024.     /** Local override. */
  2025.     final String[] myLocalTLDsPlus;

  2026.     /** Local override. */
  2027.     final String[] myLocalTLDsMinus;

  2028.     /*
  2029.      * It is vital that instances are immutable. This is because the default instances are shared.
  2030.      */

  2031.     /**
  2032.      * Private constructor.
  2033.      */
  2034.     private DomainValidator(final boolean allowLocal) {
  2035.         this.allowLocal = allowLocal;
  2036.         // link to class overrides
  2037.         myCountryCodeTLDsMinus = countryCodeTLDsMinus;
  2038.         myCountryCodeTLDsPlus = countryCodeTLDsPlus;
  2039.         myGenericTLDsPlus = genericTLDsPlus;
  2040.         myGenericTLDsMinus = genericTLDsMinus;
  2041.         myLocalTLDsPlus = localTLDsPlus;
  2042.         myLocalTLDsMinus = localTLDsMinus;
  2043.     }

  2044.     /**
  2045.      * Private constructor, allowing local overrides
  2046.      * @since 1.7
  2047.     */
  2048.     private DomainValidator(final boolean allowLocal, final List<Item> items) {
  2049.         this.allowLocal = allowLocal;

  2050.         // default to class overrides
  2051.         String[] ccMinus = countryCodeTLDsMinus;
  2052.         String[] ccPlus = countryCodeTLDsPlus;
  2053.         String[] genMinus = genericTLDsMinus;
  2054.         String[] genPlus = genericTLDsPlus;
  2055.         String[] localMinus = localTLDsMinus;
  2056.         String[] localPlus = localTLDsPlus;

  2057.         // apply the instance overrides
  2058.         for (final Item item : items) {
  2059.             final String[] copy = new String[item.values.length];
  2060.             // Comparisons are always done with lower-case entries
  2061.             for (int i = 0; i < item.values.length; i++) {
  2062.                 copy[i] = item.values[i].toLowerCase(Locale.ENGLISH);
  2063.             }
  2064.             Arrays.sort(copy);
  2065.             switch (item.type) {
  2066.             case COUNTRY_CODE_MINUS: {
  2067.                 ccMinus = copy;
  2068.                 break;
  2069.             }
  2070.             case COUNTRY_CODE_PLUS: {
  2071.                 ccPlus = copy;
  2072.                 break;
  2073.             }
  2074.             case GENERIC_MINUS: {
  2075.                 genMinus = copy;
  2076.                 break;
  2077.             }
  2078.             case GENERIC_PLUS: {
  2079.                 genPlus = copy;
  2080.                 break;
  2081.             }
  2082.             case LOCAL_MINUS: {
  2083.                 localMinus = copy;
  2084.                 break;
  2085.             }
  2086.             case LOCAL_PLUS: {
  2087.                 localPlus = copy;
  2088.                 break;
  2089.             }
  2090.             default:
  2091.                 break;
  2092.             }
  2093.         }

  2094.         // init the instance overrides
  2095.         myCountryCodeTLDsMinus = ccMinus;
  2096.         myCountryCodeTLDsPlus = ccPlus;
  2097.         myGenericTLDsMinus = genMinus;
  2098.         myGenericTLDsPlus = genPlus;
  2099.         myLocalTLDsMinus = localMinus;
  2100.         myLocalTLDsPlus = localPlus;
  2101.     }

  2102.     private String chompLeadingDot(final String str) {
  2103.         if (str.startsWith(".")) {
  2104.             return str.substring(1);
  2105.         }
  2106.         return str;
  2107.     }

  2108.     /**
  2109.      * Gets a copy of an instance level internal array.
  2110.      * @param table the array type (any of the enum values)
  2111.      * @return a copy of the array
  2112.      * @throws IllegalArgumentException if the table type is unexpected, e.g. GENERIC_RO
  2113.      * @since 1.7
  2114.      */
  2115.     public String[] getOverrides(final ArrayType table) {
  2116.         final String[] array;
  2117.         switch (table) {
  2118.         case COUNTRY_CODE_MINUS:
  2119.             array = myCountryCodeTLDsMinus;
  2120.             break;
  2121.         case COUNTRY_CODE_PLUS:
  2122.             array = myCountryCodeTLDsPlus;
  2123.             break;
  2124.         case GENERIC_MINUS:
  2125.             array = myGenericTLDsMinus;
  2126.             break;
  2127.         case GENERIC_PLUS:
  2128.             array = myGenericTLDsPlus;
  2129.             break;
  2130.         case LOCAL_MINUS:
  2131.             array = myLocalTLDsMinus;
  2132.             break;
  2133.         case LOCAL_PLUS:
  2134.             array = myLocalTLDsPlus;
  2135.             break;
  2136.         default:
  2137.             throw new IllegalArgumentException(UNEXPECTED_ENUM_VALUE + table);
  2138.         }
  2139.         return Arrays.copyOf(array, array.length); // clone the array
  2140.     }

  2141.     /**
  2142.      * Does this instance allow local addresses?
  2143.      *
  2144.      * @return true if local addresses are allowed.
  2145.      * @since 1.7
  2146.      */
  2147.     public boolean isAllowLocal() {
  2148.         return this.allowLocal;
  2149.     }

  2150.     /**
  2151.      * Returns true if the specified <code>String</code> parses
  2152.      * as a valid domain name with a recognized top-level domain.
  2153.      * The parsing is case-insensitive.
  2154.      * @param domain the parameter to check for domain name syntax
  2155.      * @return true if the parameter is a valid domain name
  2156.      */
  2157.     public boolean isValid(String domain) {
  2158.         if (domain == null) {
  2159.             return false;
  2160.         }
  2161.         domain = unicodeToASCII(domain);
  2162.         // hosts must be equally reachable via punycode and Unicode
  2163.         // Unicode is never shorter than punycode, so check punycode
  2164.         // if domain did not convert, then it will be caught by ASCII
  2165.         // checks in the regexes below
  2166.         if (domain.length() > MAX_DOMAIN_LENGTH) {
  2167.             return false;
  2168.         }
  2169.         final String[] groups = domainRegex.match(domain);
  2170.         if (groups != null && groups.length > 0) {
  2171.             return isValidTld(groups[0]);
  2172.         }
  2173.         return allowLocal && hostnameRegex.isValid(domain);
  2174.     }

  2175.     /**
  2176.      * Returns true if the specified <code>String</code> matches any
  2177.      * IANA-defined country code top-level domain. Leading dots are
  2178.      * ignored if present. The search is case-insensitive.
  2179.      * @param ccTld the parameter to check for country code TLD status, not null
  2180.      * @return true if the parameter is a country code TLD
  2181.      */
  2182.     public boolean isValidCountryCodeTld(final String ccTld) {
  2183.         final String key = chompLeadingDot(unicodeToASCII(ccTld).toLowerCase(Locale.ENGLISH));
  2184.         return (arrayContains(COUNTRY_CODE_TLDS, key) || arrayContains(myCountryCodeTLDsPlus, key)) && !arrayContains(myCountryCodeTLDsMinus, key);
  2185.     }

  2186.     // package protected for unit test access
  2187.     // must agree with isValid() above
  2188.     final boolean isValidDomainSyntax(String domain) {
  2189.         if (domain == null) {
  2190.             return false;
  2191.         }
  2192.         domain = unicodeToASCII(domain);
  2193.         // hosts must be equally reachable via punycode and Unicode
  2194.         // Unicode is never shorter than punycode, so check punycode
  2195.         // if domain did not convert, then it will be caught by ASCII
  2196.         // checks in the regexes below
  2197.         if (domain.length() > MAX_DOMAIN_LENGTH) {
  2198.             return false;
  2199.         }
  2200.         final String[] groups = domainRegex.match(domain);
  2201.         return groups != null && groups.length > 0 || hostnameRegex.isValid(domain);
  2202.     }
  2203.     /**
  2204.      * Returns true if the specified <code>String</code> matches any
  2205.      * IANA-defined generic top-level domain. Leading dots are ignored
  2206.      * if present. The search is case-insensitive.
  2207.      * @param gTld the parameter to check for generic TLD status, not null
  2208.      * @return true if the parameter is a generic TLD
  2209.      */
  2210.     public boolean isValidGenericTld(final String gTld) {
  2211.         final String key = chompLeadingDot(unicodeToASCII(gTld).toLowerCase(Locale.ENGLISH));
  2212.         return (arrayContains(GENERIC_TLDS, key) || arrayContains(myGenericTLDsPlus, key)) && !arrayContains(myGenericTLDsMinus, key);
  2213.     }

  2214.     /**
  2215.      * Returns true if the specified <code>String</code> matches any
  2216.      * IANA-defined infrastructure top-level domain. Leading dots are
  2217.      * ignored if present. The search is case-insensitive.
  2218.      * @param iTld the parameter to check for infrastructure TLD status, not null
  2219.      * @return true if the parameter is an infrastructure TLD
  2220.      */
  2221.     public boolean isValidInfrastructureTld(final String iTld) {
  2222.         final String key = chompLeadingDot(unicodeToASCII(iTld).toLowerCase(Locale.ENGLISH));
  2223.         return arrayContains(INFRASTRUCTURE_TLDS, key);
  2224.     }

  2225.     /**
  2226.      * Returns true if the specified <code>String</code> matches any
  2227.      * widely used "local" domains (localhost or localdomain). Leading dots are
  2228.      * ignored if present. The search is case-insensitive.
  2229.      * @param lTld the parameter to check for local TLD status, not null
  2230.      * @return true if the parameter is an local TLD
  2231.      */
  2232.     public boolean isValidLocalTld(final String lTld) {
  2233.         final String key = chompLeadingDot(unicodeToASCII(lTld).toLowerCase(Locale.ENGLISH));
  2234.         return (arrayContains(LOCAL_TLDS, key) || arrayContains(myLocalTLDsPlus, key))
  2235.                 && !arrayContains(myLocalTLDsMinus, key);
  2236.     }

  2237.     /**
  2238.      * Returns true if the specified <code>String</code> matches any
  2239.      * IANA-defined top-level domain. Leading dots are ignored if present.
  2240.      * The search is case-insensitive.
  2241.      * <p>
  2242.      * If allowLocal is true, the TLD is checked using {@link #isValidLocalTld(String)}.
  2243.      * The TLD is then checked against {@link #isValidInfrastructureTld(String)},
  2244.      * {@link #isValidGenericTld(String)} and {@link #isValidCountryCodeTld(String)}
  2245.      * @param tld the parameter to check for TLD status, not null
  2246.      * @return true if the parameter is a TLD
  2247.      */
  2248.     public boolean isValidTld(final String tld) {
  2249.         if (allowLocal && isValidLocalTld(tld)) {
  2250.             return true;
  2251.         }
  2252.         return isValidInfrastructureTld(tld)
  2253.                 || isValidGenericTld(tld)
  2254.                 || isValidCountryCodeTld(tld);
  2255.     }
  2256. }