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