tags:

views:

80

answers:

5

I want to know the original country of a website. I noticed that Alexa website can often detect the original country of websites. For example, Alexa can detect that the original country of stackoverflow.com website is US (check this http://www.alexa.com/search?q=http%3A%2F%2Fstackoverflow.com%2F&r=site_screener&p=bigtop) and so on. How Alexa do this? and how i can do this? Thank You..

A: 

You could get this information out of the IP of a domain. You would need an IP-to-country database to look up that country.

Try this http://www.ip2country.net/

reggie
+1  A: 

In whois protocol you have one information "country" witch you must use it.

Felipe Cardoso Martins
+1  A: 

Most likely checks the DNS data for given domain

http://en.wikipedia.org/wiki/Whois

Mchl
+1  A: 

You can do a WHOIS lookup as mentioned in other answers to get the information about the website that were stored by the registrar and filled in by the user. But you rely on an existing database of user-entered information and not actual technical data.

You can use a an IP geo-localisation service to get the location based on the IP. This may not always work for all IPs. You could also do this for all the hops you go through, which you can list by doing a traceroute (with tracert on Windows or traceroute on *NIX) and see where your request is travelling to.

haylem
+1  A: 

The other answers are fine, but bear in mind that many DNS registrations are protected by anonymization services, and that many sites are also hosted by providers in countries other than the one where the site's owner is.

example.com could be physically hosted on an American ISP's server, DNS provided by a Canadian company, and the site's owning company could be in Lesotho. You just can't tell these days.

Marc B