views:

15

answers:

1

what is the best way to detect the country code of a website ? 1) looking at the domain registration info 2) ip range 3) domain extension

...

UPDATE : this information (country codes) will be used to built a search engine for the web of a given country.

+1  A: 

This depends on what you want to know. If you want to know where it is hosted, then do some digging into the WHOIS records on the IP of the server. If you want to know what country the domain name is generally associated with, check the top-level domain. If you want to know who owns it and where they are located, check the domain registration info.

Keep in mind, none of these are exact. IPs can be utilized anywhere... where the block is registered with ARIN is rarely correct, and almost never exact. The domain extension doesn't really mean anything... think about all of the .TV domains used in the US. Finally, domain registration info is often wrong or hidden behind a private registration.

Brad
And since 'nu' means 'now' in Dutch and 'Nude' in French, many .nu domains are actually used in France, Belgium and the Netherlands. :-)
Workshop Alex
Nice! On a related note, I wonder if the Federated States of Micronesia collect any cash on those expensive .FM domains?
Brad