source: josm/trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java@ 10243

Last change on this file since 10243 was 10243, checked in by Don-vip, 8 years ago

update new TLD from IANA

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