homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Domain Names
Forum Library, Charter, Moderators: buckworks & webwork

Domain Names Forum

how to extract tld part from a fqdn?

10+ Year Member

Msg#: 3629 posted 12:03 pm on Mar 21, 2006 (gmt 0)

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?



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

Msg#: 3629 posted 5:15 pm on Mar 21, 2006 (gmt 0)

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.

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Domain Names
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved