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