Re: Identifying subdomains and top-level domains in a URI

This is a discussion on Re: Identifying subdomains and top-level domains in a URI within the Bind Users forums, part of the DNS and Related Forums category; On Sat, Jan 29, 2005 at 01:57:23PM -0800, stan <wanderingstan@gmail.com> wrote a message of ...


Go Back   Usenet Forums > DNS and Related Forums > Bind Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-31-2005
Stephane Bortzmeyer
 
Posts: n/a
Default Re: Identifying subdomains and top-level domains in a URI

On Sat, Jan 29, 2005 at 01:57:23PM -0800,
stan <wanderingstan@gmail.com> wrote
a message of 17 lines which said:

> My challenge is to determine the base portion of the URI--stripped
> of subdomains but including top-level domains. E.g., for
> "http://www.google.com" I need to get "google.com", and for
> "subdomain.domain.com.au", I need to get "domain.com.au".


Your examples do not match your requirment. The top-level domain for
www.google.com is "com" and for subdomain.domain.com.au, it is "au".

> My current naive system just takes the last two chunks, which means
> it thinks all web pages from austrailia are the same site. (They'll
> all from "com.au"!)


There is no better algorithm, not even hardwiring the number of labels
in a registry-indexed table (because some registries like "fr", "dz"
or "af" delegate both second-level and third-level domains).

> What's the intelligent way to do this?


None. Funny question because there have been a thread on namedroppers
(the IETF Working group on DNS extensions) recently about this very
subject (in the context of the SPF protocol):

http://ops.ietf.org/lists/namedroppe.../msg00039.html


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:08 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0