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