Welcome to WebmasterWorld Guest from 54.226.67.166

Forum Moderators: buckworks & webwork

Message Too Old, No Replies

how to extract tld part from a fqdn?

     

Xuefer

12:03 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



tld of example.com is .com
tld of example.co.uk is .co.uk
tld of example.com.cn is .com.cn
tld of example.abc.cn is .cn, not abc.cn
it seems the browser know it when setting cookie with domain name (reject to save cookie into tld), but what if there's a new tld? how can a browser know it without update/patch? is there any pattern to recognize which part is tld without knowing a list a tld?

jmccormac

5:15 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not sure how the browsers do it but a few hundred ccTLDs exist and some of the follow the US system of com.ccTLD/net.ccTLD/org.ccTLD/gov.ccTLD etc. Some follow the British model of .co.ccTLD, .ltd.ccTLD. And others still can have multiple subdomains like .kr or .us. It can get fairly complex after a while. For generating the statistics for each hoster in .com/net/org/biz/info/ie [1], the first stage is to check the tld at the end of the domain of the nameserver in question and then apply the country code subdomain rules.

Regards...jmcc
[1] My main work involves publishing stats reports on the domains hosted on each hoster every month.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month