Magic TLD: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
mNo edit summary
Replaced content with "__NOTOC__ When writing include and exclude rules in the metadata block of a Greasemonkey script, using the magic syntax <code>.tld</code> in place of a specific ..."
 
(15 intermediate revisions by 8 users not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  


When writing [[include and exclude rules]] in the [[metadata block]] of a greasemonkey script.  Using the magic syntax .tld in place of a specific [http://en.wikipedia.org/wiki/Top-level_domain top-level domain] will match against any top-level domain. Greasemonkey uses a list of top-level domains when this special case is invoked. This list of tld's includes global tld's (aka gTLDs) eg. .com, .org, country-specific tld's (aka ccTLDs) eg. uk, jp and a large list of two-level domains designed to capture  country specific domain-name conventions eg. .co.uk, .org.uk.  In addition, greasemonkey also has specific rules for [[#us|.us]] intended to match US state bodies, counties and cities and a few strange special cases (eg. [[#uk|demon.co.uk]]).
When writing [[include and exclude rules]] in the [[metadata block]] of a Greasemonkey script, using the magic syntax <code>.tld</code> in place of a specific [http://en.wikipedia.org/wiki/Top-level_domain top-level domain] will match against any top-level domain.
 
Greasemonkey uses a list of top-level domains when this special case is invoked.
'''Note. Since there are so many tlds it is possible a malicious party could register a domain in order to steal information from your script.  Never use the .tld magic syntax on scripts that deal with private information.'''
This list is based on the [http://publicsuffix.org/ Public Suffix] database.
 
==Top-level domains==
=== Global TLDs ===
 
[[#museum|museum]], [[#travel|travel]], [[#aero|aero]], [[#arpa|arpa]], [[#coop|coop]], [[#info|info]], [[#jobs|jobs]], [[#name|name]], [[#nvus|nvus]], [[#biz|biz]], [[#com|com]], [[#edu|edu]], [[#gov|gov]], [[#int|int]], [[#mil|mil]], [[#net|net]], [[#org|org]], [[#pro|pro]], [[#xxx|xxx]]
(19 Global tlds)
 
=== Country TLDs ===
 
[[#ac|ac]], [[#ad|ad]], [[#ae|ae]], [[#af|af]], [[#ag|ag]], [[#ai|ai]], [[#ak|ak]], [[#al|al]], [[#al|al]], [[#am|am]], [[#an|an]], [[#ao|ao]], [[#aq|aq]], [[#ar|ar]], [[#ar|ar]], [[#as|as]], [[#at|at]], [[#au|au]], [[#aw|aw]], [[#ax|ax]], [[#az|az]], [[#az|az]], [[#ba|ba]], [[#bb|bb]], [[#bd|bd]], [[#be|be]], [[#bf|bf]], [[#bg|bg]], [[#bh|bh]], [[#bi|bi]], [[#bj|bj]], [[#bm|bm]], [[#bn|bn]], [[#bo|bo]], [[#br|br]], [[#bs|bs]], [[#bt|bt]], [[#bv|bv]], [[#bw|bw]], [[#by|by]], [[#bz|bz]], [[#ca|ca]], [[#ca|ca]], [[#cc|cc]], [[#cd|cd]], [[#cf|cf]], [[#cg|cg]], [[#ch|ch]], [[#ci|ci]], [[#ck|ck]], [[#cl|cl]], [[#cm|cm]], [[#cn|cn]], [[#co|co]], [[#co|co]], [[#cr|cr]], [[#cs|cs]], [[#ct|ct]], [[#cu|cu]], [[#cv|cv]], [[#cx|cx]], [[#cy|cy]], [[#cz|cz]], [[#dc|dc]], [[#de|de]], [[#de|de]], [[#dj|dj]], [[#dk|dk]], [[#dm|dm]], [[#do|do]], [[#dz|dz]], [[#ec|ec]], [[#ee|ee]], [[#eg|eg]], [[#eh|eh]], [[#er|er]], [[#es|es]], [[#et|et]], [[#eu|eu]], [[#fi|fi]], [[#fj|fj]], [[#fk|fk]], [[#fl|fl]], [[#fm|fm]], [[#fo|fo]], [[#fr|fr]], [[#ga|ga]], [[#ga|ga]], [[#gb|gb]], [[#gd|gd]], [[#ge|ge]], [[#gf|gf]], [[#gg|gg]], [[#gh|gh]], [[#gi|gi]], [[#gl|gl]], [[#gm|gm]], [[#gn|gn]], [[#gp|gp]], [[#gq|gq]], [[#gr|gr]], [[#gs|gs]], [[#gt|gt]], [[#gu|gu]], [[#gu|gu]], [[#gw|gw]], [[#gy|gy]], [[#hi|hi]], [[#hk|hk]], [[#hm|hm]], [[#hn|hn]], [[#hr|hr]], [[#ht|ht]], [[#hu|hu]], [[#ia|ia]], [[#id|id]], [[#id|id]], [[#ie|ie]], [[#il|il]], [[#il|il]], [[#im|im]], [[#in|in]], [[#in|in]], [[#io|io]], [[#iq|iq]], [[#ir|ir]], [[#is|is]], [[#it|it]], [[#je|je]], [[#jm|jm]], [[#jo|jo]], [[#jp|jp]], [[#ke|ke]], [[#kg|kg]], [[#kh|kh]], [[#ki|ki]], [[#km|km]], [[#kn|kn]], [[#kp|kp]], [[#kr|kr]], [[#ks|ks]], [[#kw|kw]], [[#ky|ky]], [[#ky|ky]], [[#kz|kz]], [[#la|la]], [[#la|la]], [[#lb|lb]], [[#lc|lc]], [[#li|li]], [[#lk|lk]], [[#lr|lr]], [[#ls|ls]], [[#lt|lt]], [[#lu|lu]], [[#lv|lv]], [[#ly|ly]], [[#ma|ma]], [[#ma|ma]], [[#mc|mc]], [[#md|md]], [[#md|md]], [[#me|me]], [[#mg|mg]], [[#mh|mh]], [[#mi|mi]], [[#mk|mk]], [[#ml|ml]], [[#mm|mm]], [[#mn|mn]], [[#mn|mn]], [[#mo|mo]], [[#mo|mo]], [[#mp|mp]], [[#mq|mq]], [[#mr|mr]], [[#ms|ms]], [[#ms|ms]], [[#mt|mt]], [[#mt|mt]], [[#mu|mu]], [[#mv|mv]], [[#mw|mw]], [[#mx|mx]], [[#my|my]], [[#mz|mz]], [[#na|na]], [[#nc|nc]], [[#nc|nc]], [[#nd|nd]], [[#ne|ne]], [[#ne|ne]], [[#nf|nf]], [[#ng|ng]], [[#nh|nh]], [[#ni|ni]], [[#nj|nj]], [[#nl|nl]], [[#nm|nm]], [[#no|no]], [[#np|np]], [[#nr|nr]], [[#nu|nu]], [[#ny|ny]], [[#nz|nz]], [[#oh|oh]], [[#ok|ok]], [[#om|om]], [[#or|or]], [[#pa|pa]], [[#pa|pa]], [[#pe|pe]], [[#pf|pf]], [[#pg|pg]], [[#ph|ph]], [[#pk|pk]], [[#pl|pl]], [[#pm|pm]], [[#pn|pn]], [[#pr|pr]], [[#pr|pr]], [[#ps|ps]], [[#pt|pt]], [[#pw|pw]], [[#py|py]], [[#qa|qa]], [[#re|re]], [[#ri|ri]], [[#ro|ro]], [[#ru|ru]], [[#rw|rw]], [[#sa|sa]], [[#sb|sb]], [[#sc|sc]], [[#sc|sc]], [[#sd|sd]], [[#sd|sd]], [[#se|se]], [[#sg|sg]], [[#sh|sh]], [[#si|si]], [[#sj|sj]], [[#sk|sk]], [[#sl|sl]], [[#sm|sm]], [[#sn|sn]], [[#so|so]], [[#sr|sr]], [[#st|st]], [[#su|su]], [[#sv|sv]], [[#sy|sy]], [[#sz|sz]], [[#tc|tc]], [[#td|td]], [[#tf|tf]], [[#tg|tg]], [[#th|th]], [[#tj|tj]], [[#tk|tk]], [[#tl|tl]], [[#tm|tm]], [[#tn|tn]], [[#tn|tn]], [[#to|to]], [[#tp|tp]], [[#tr|tr]], [[#tt|tt]], [[#tv|tv]], [[#tw|tw]], [[#tx|tx]], [[#tz|tz]], [[#ua|ua]], [[#ug|ug]], [[#uk|uk]], [[#um|um]], [[#us|us]], [[#ut|ut]], [[#uy|uy]], [[#uz|uz]], [[#va|va]], [[#va|va]], [[#vc|vc]], [[#ve|ve]], [[#vg|vg]], [[#vi|vi]], [[#vi|vi]], [[#vn|vn]], [[#vt|vt]], [[#vu|vu]], [[#wa|wa]], [[#wf|wf]], [[#wi|wi]], [[#ws|ws]], [[#wv|wv]], [[#wy|wy]], [[#ye|ye]], [[#yt|yt]], [[#yu|yu]], [[#za|za]], [[#zm|zm]], [[#zw|zw]] 
 
(302 country tlds)
==Two-level domains==
(876 Two-level domains excluding us special cases)
 
====arpa====
e164.arpa
====com====
au.com, br.com, cn.com, de.com, eu.com, gb.com, hu.com, no.com, qc.com, ru.com, sa.com, se.com, uk.com, us.com, uy.com, za.com
====net====
de.net, gb.net, uk.net
====org====
dk.org, eu.org
====ac====
com.ac, edu.ac, gov.ac, mil.ac, net.ac, org.ac
====ae====
ac.ae, co.ae, com.ae, gov.ae, net.ae, org.ae, pro.ae, sch.ae
====ai====
com.ai, edu.ai, gov.ai, org.ai
====ar====
com.ar, edu.ar, gov.ar, int.ar, mil.ar, net.ar, org.ar, uba.ar
There is also a rare three-level domain esc.edu.ar that matches as a tld.
====at====
ac.at, co.at, gv.at, or.at, priv.at
====au====
asn.au, com.au, conf.au, csiro.au, edu.au, gov.au, id.au, info.au, net.au, org.au, otc.au, oz.au, telememo.au
====az====
com.az, net.az, org.az
====bb====
com.bb, net.bb, org.bb,
====be====
ac.be, belgie.be, dns.be, fgov.be
====bh====
com.bh, edu.bh, gov.bh, net.bh, org.bh
====bm====
com.bm, edu.bm, gov.bm, net.bm, org.bm
====br====
art.br, com.br, etc.br, g12.br, gov.br, ind.br, inf.br, mil.br, net.br, org.br, psi.br, rec.br, sp.br, tmp.br
====bs====
com.bs, net.bs, org.bs
====ca====
ab.ca, bc.ca, mb.ca, nb.ca, nf.ca, nl.ca, ns.ca, nt.ca, nu.ca, on.ca, pe.ca, qc.ca, sk.ca, yk.ca
====ck====
co.ck, edu.ck, gov.ck, net.ck, org.ck
====cn====
ac.cn, ah.cn, bj.cn, com.cn, cq.cn, edu.cn, gd.cn, gov.cn, gs.cn, gx.cn, gz.cn, hb.cn, he.cn, hi.cn, hk.cn, hl.cn, hn.cn, jl.cn, js.cn, ln.cn, mo.cn, net.cn, nm.cn, nx.cn, org.cn, qh.cn, sc.cn, sh.cn, sn.cn, sx.cn, tj.cn, tw.cn, xj.cn, xz.cn, yn.cn, zj.cn
====co====
arts.co, com.co, edu.co, firm.co, gov.co, info.co, int.co, mil.co, nom.co, org.co, rec.co, store.co, web.co
====cr====
ac.cr, co.cr, ed.cr, fi.cr, go.cr, or.cr, sa.cr
====cu====
com.cu, net.cu, org.cu
====cy====
ac.cy, com.cy, gov.cy, net.cy, org.cy
====dk====
co.dk,
====do====
art.do, com.do, edu.do, gov.do, mil.do, net.do, org.do, web.do
====dz====
art.dz, ass.dz, com.dz, edu.dz, gov.dz, net.dz, org.dz, pol.dz
====ec====
com.ec, edu.ec, fin.ec, gov.ec, k12.ec, med.ec, mil.ec, net.ec, org.ec
====eg====
com.eg, edu.eg, eun.eg, gov.eg, net.eg, org.eg, sci.eg
====et====
biz.et, com.et, edu.et, gov.et, info.et, name.et, net.et, org.et
====fj====
ac.fj, com.fj, gov.fj, id.fj, org.fj, school.fj
====fk====
ac.fk, com.fk, gov.fk, net.fk, nom.fk, org.fk
====fr====
aeroport.fr, assedic.fr, asso.fr, avocat.fr, avoues.fr, barreau.fr, cci.fr, chambagri.fr, chirurgiens-dentistes.fr, com.fr, experts-comptables.fr, geometre-expert.fr, gouv.fr, greta.fr, huissier-justice.fr, medecin.fr, nom.fr, notaires.fr, pharmacien.fr, port.fr, prd.fr, presse.fr, tm.fr, veterinaire.fr
====ge====
com.ge, edu.ge, gov.ge, mil.ge, net.ge, org.ge, pvt.ge
====gg====
ac.gg, alderney.gg, co.gg, gov.gg, guernsey.gg, ind.gg, ltd.gg, net.gg, org.gg, sark.gg, sch.gg
====gu====
com.gu, edu.gu, gov.gu, mil.gu, net.gu, org.gu
====hk====
com.hk, edu.hk, gov.hk, idv.hk, net.hk, org.hk,
====hu====
2000.hu, agrar.hu, bolt.hu, casino.hu, city.hu, co.hu, erotica.hu, erotika.hu, film.hu, forum.hu, games.hu, hotel.hu, info.hu, ingatlan.hu, jogasz.hu, konyvelo.hu, lakas.hu, media.hu, news.hu, org.hu, priv.hu, reklam.hu, sex.hu, shop.hu, sport.hu, suli.hu, szex.hu, tm.hu, tozsde.hu, utazas.hu, video.hu
====id====
ac.id, co.id, go.id, mil.id, net.id, or.id
====il====
ac.il, co.il, gov.il, idf.il, k12.il, muni.il, net.il, org.il
====im====
ac.im, co.im, gov.im, net.im, nic.im, org.im
 
The three-level domains lkd.co.im and plc.co.im are also in the ruleset, but improperly encoded as lkd.co\.im and plc.co\.im so they won't work.
====in====
ac.in, co.in, ernet.in, firm.in, gen.in, gov.in, ind.in, mil.in, net.in, nic.in, org.in, res.in
====je====
ac.je, co.je, gov.je, ind.je, jersey.je, ltd.je, net.je, org.je, sch.je
====jo====
com.jo, edu.jo, gov.jo, mil.jo, net.jo, org.jo
====jp====
ac.jp, ad.jp, aichi.jp, akita.jp, aomori.jp, chiba.jp, co.jp, ed.jp, ehime.jp, fukui.jp, fukuoka.jp, fukushima.jp, gifu.jp, go.jp, gov.jp, gr.jp, gunma.jp, hiroshima.jp, hokkaido.jp, hyogo.jp, ibaraki.jp, ishikawa.jp, iwate.jp, kagawa.jp, kagoshima.jp, kanagawa.jp, kanazawa.jp, kawasaki.jp, kitakyushu.jp, kobe.jp, kochi.jp, kumamoto.jp, kyoto.jp, lg.jp, matsuyama.jp, mie.jp, miyagi.jp, miyazaki.jp, nagano.jp, nagasaki.jp, nagoya.jp, nara.jp, ne.jp, net.jp, niigata.jp, oita.jp, okayama.jp, okinawa.jp, or.jp, org.jp, osaka.jp, saga.jp, saitama.jp, sapporo.jp, sendai.jp, shiga.jp, shimane.jp, shizuoka.jp, takamatsu.jp, tochigi.jp, tokushima.jp, tokyo.jp, tottori.jp, toyama.jp, utsunomiya.jp, wakayama.jp, yamagata.jp, yamaguchi.jp, yamanashi.jp, yokohama.jp
====kh====
com.kh, edu.kh, gov.kh, mil.kh, net.kh, org.kh, per.kh
====kr====
ac.kr, co.kr, go.kr, kyonggi.kr, ne.kr, or.kr, pe.kr, re.kr, seoul.kr
====kw====
com.kw, edu.kw, gov.kw, net.kw, org.kw
====la====
com.la, net.la, org.la
====lb====
com.lb, edu.lb, gov.lb, mil.lb, net.lb, org.lb
====lc====
com.lc, edu.lc, gov.lc, net.lc, org.lc
====lv====
asn.lv, com.lv, conf.lv, edu.lv, gov.lv, id.lv, mil.lv, net.lv, org.lv
====ly====
com.ly, net.ly, org.ly
====ma====
ac.ma, co.ma, net.ma, org.ma, press.ma
====mk====
com.mk
====mm====
com.mm, edu.mm, gov.mm, net.mm, org.mm
====mo====
com.mo, edu.mo, gov.mo, net.mo, org.mo
====mt====
com.mt, edu.mt, net.mt, org.mt, tm.mt, uu.mt
====mx====
com.mx, net.mx, org.mx
====my====
com.my, edu.my, gov.my, net.my, org.my
====na====
alt.na, com.na, cul.na, edu.na, net.na, org.na, telecom.na, unam.na
====nc====
com.nc, net.nc, org.nc
====ng====
ac.ng, com.ng, edu.ng, gov.ng, net.ng, org.ng, sch.ng
====ni====
com.ni, edu.ni, gob.ni, net.ni, nom.ni, org.ni
====no====
tel.no
====np====
com.np, edu.np, gov.np, net.np, org.np
====nr====
fax.nr, mob.nr, mobil.nr, mobile.nr, tel.nr, tlf.nr
====nz====
ac.nz, co.nz, cri.nz, geek.nz, gen.nz, govt.nz, iwi.nz, maori.nz, mil.nz, net.nz, org.nz, school.nz
====om====
ac.om, biz.om, co.om, com.om, edu.om, gov.om, med.om, mod.om, museum.om, net.om, org.om, pro.om
====pa====
ac.pa, com.pa, edu.pa, gob.pa, net.pa, org.pa, sld.pa
====pe====
com.pe, edu.pe, gob.pe, mil.pe, net.pe, nom.pe, org.pe
====pg====
ac.pg, com.pg, net.pg
====ph====
com.ph, mil.ph, net.ph, ngo.ph, org.ph
====pk====
biz.pk, com.pk, edu.pk, fam.pk, gob.pk, gok.pk, gon.pk, gop.pk, gos.pk, gov.pk, net.pk, org.pk, web.pk
====pl====
agro.pl, aid.pl, atm.pl, auto.pl, biz.pl, com.pl, edu.pl, gmina.pl, gsm.pl, info.pl, mail.pl, media.pl, miasta.pl, mil.pl, net.pl, nieruchomosci.pl, nom.pl, org.pl, pc.pl, powiat.pl, priv.pl, realestate.pl, rel.pl, sex.pl, shop.pl, sklep.pl, sos.pl, szkola.pl, targi.pl, tm.pl, tourism.pl, travel.pl, turystyka.pl
====ps====
edu.ps, gov.ps, plo.ps, sec.ps
====py====
com.py, edu.py, net.py, org.py
====qa====
com.qa, edu.qa, gov.qa, net.qa, org.qa
====re====
asso.re, com.re, nom.re
====ru====
com.ru, net.ru, org.ru, pp.ru
====sa====
com.sa, edu.sa, gov.sa, med.sa, net.sa, org.sa, pub.sa, sch.sa
====sb====
com.sb, edu.sb, gov.sb, net.sb, org.sb
====sd====
com.sd, edu.sd, gov.sd, med.sd, net.sd, org.sd, sch.sd
====sg====
com.sg, edu.sg, gov.sg, net.sg, org.sg, per.sg
====sh====
com.sh, edu.sh, gov.sh, mil.sh, net.sh, org.sh
====sv====
com.sv, edu.sv, gob.sv, org.sv, red.sv
====sy====
com.sy, gov.sy, net.sy, org.sy
====th====
ac.th, co.th, go.th, net.th, or.th
====tn====
com.tn, edunet.tn, ens.tn, fin.tn, gov.tn, ind.tn, info.tn, intl.tn, nat.tn, net.tn, org.tn, rnrt.tn, rns.tn, rnu.tn, tourism.tn
====tr====
bbs.tr, com.tr, edu.tr, gen.tr, gov.tr, k12.tr, mil.tr, net.tr, org.tr
====tt====
at.tt, au.tt, be.tt, biz.tt, ca.tt, co.tt, com.tt, de.tt, dk.tt, edu.tt, es.tt, eu.tt, fr.tt, gov.tt, info.tt, it.tt, name.tt, net.tt, nic.tt, org.tt, pro.tt, se.tt, uk.tt, us.tt
====tv====
co.tv
====tw====
com.tw, edu.tw, gove.tw, idv.tw, net.tw, org.tw
====ua====
com.ua, edu.ua, gov.ua, net.ua, org.ua
====ug====
ac.ug, co.ug, go.ug, or.ug
====uk====
ac.uk, co.uk, edu.uk, gov.uk, ltd.uk, me.uk, mod.uk, net.uk, nhs.uk, nic.uk, org.uk, plc.uk, police.uk, sch.uk
For some reason the magic tld rule also match demon.co.uk a UK ISP.
====us====
dni.us, fed.us
 
There are additionally rules to match US cities and counties written eg. ci.nyc.ny.us or co.orange.ny.us (for new york city, and orange county respectively), and us stae bodies eg. state.ny.us or k12.ny.us - the full list of state bodies is k12,cc,tec,lib,state,gen.
 
====uy====
com.uy, edu.uy, gub.uy, mil.uy, net.uy, org.uy
====ve====
arts.ve, bib.ve, co.ve, com.ve, edu.ve, firm.ve, gov.ve, info.ve, int.ve, mil.ve, net.ve, nom.ve, org.ve, rec.ve, store.ve, tec.ve, web.ve
====vi====
co.vi, net.vi, org.vi
====vn====
ac.vn, biz.vn, com.vn, edu.vn, gov.vn, health.vn, info.vn, int.vn, name.vn, net.vn, org.vn, pro.vn
====vu====
ch.vu, com.vu, de.vu, edu.vu, fr.vu, net.vu, org.vu
====ws====
com.ws, edu.ws, gov.ws, net.ws, org.ws
====ye====
com.ye, edu.ye, gov.ye, mil.ye, net.ye, org.ye
====yu====
ac.yu, co.yu, edu.yu, org.yu
====za====
ac.za, alt.za, bourse.za, city.za, co.za, edu.za, gov.za, law.za, mil.za, net.za, ngo.za, nom.za, org.za, school.za, tm.za, web.za
====zw====
ac.zw, co.zw, gov.zw, org.zw

Latest revision as of 18:17, 20 December 2012


When writing include and exclude rules in the metadata block of a Greasemonkey script, using the magic syntax .tld in place of a specific top-level domain will match against any top-level domain. Greasemonkey uses a list of top-level domains when this special case is invoked. This list is based on the Public Suffix database.