Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Not sure if this is the right SE site. I figured this question doesn't belong on SO, but if you think it doesn't belong here either, I apologize.

I've been looking into determining the location, specifically the state, of a user accessing my website. One of the options I've known about for a while is the GeoIP City Database, however this isn't the most cost effective solution and I'm cheap so I was looking for a less expensive way. Something that occurred to me was that my state was in the public hostname assigned to me by Comcast:

(Dash Separated IP).hsd1.ma.comcast.net

Could it be possible that other ISPs follow this same pattern of inserting the state abbreviation into their users' hostnames? I've been looking around for a list of hostnames for other ISPs, but I haven't found anything. Can anyone verify that this holds true for other major ISPs?

Edit: Is your state in your hostname? Is it abbreviated or written out? Is it in it's own subdomain?


After some more digging, I discovered that Verizon FiOS customers have location data in their hostnames. It seems that the general pattern that they follow is:

static-(Dash Separated IP).(City Abbreviation)(State Abbreviation).fios.verizon.net

So for example a FiOS customer in boston would have a hostname that looks like:

static-(Dash Separated IP).bstnma.fios.verizon.net

I can extract a state from this, leading me to believe that there must be other ISPs that follow this pattern. Can anyone else confirm by checking if their hostname has their state in it?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

GeoIP also offers a free version with obviously drawbacks such as its not as accurate. It can be found here:

http://www.maxmind.com/app/geolite

If you are interested in web analytics for your site. I recommend using piwik. This is a free solution and has GeoIP built in as a plugin. It will show you where your traffic is coming from plus you own all the data unlike with using google analytics. This can be an issue with large corporations and smaller companies who do not wish for another company to own their data.

As far as MO is concerned, I do not have the state from my ISP.

share|improve this answer
    
Geolite was likely going to be my fallback...either that or the API (in which case I was looking for ways to reduce my number of calls, beyond simple caching). Just out of curiosity: who is your ISP? –  PhpMyCoder Jun 18 '12 at 15:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.