Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a hosted dedicated server with a site in IIS 7.5. This site has various bindings that allow external access to it (,, I would like to know how i can have statistics of how the site is being accessed. How many times it was accessed through, for example. How can I achieve that?


share|improve this question
up vote 1 down vote accepted

Wouldn't configuring IIS to log the cs-host property allow you to see what site they were visiting?

share|improve this answer
Thanks Joe. I think this is the best way of doing what I want. Now I need a good log parser. Do you know a good one? – Norba Nov 18 '10 at 11:47
I don't do a lot of IIS log parsing, but I have used this in the past: If I remember correctly they have a scaled down free version and a feature packed paid version. – joeqwerty Nov 18 '10 at 12:27

Use IIS Advance Logging option that would be helpful. There are also Options are available to write logs with options available as following:

Gaurav Maniar MCP | MCSE | MCST | MCITP | ITILv3 Certified

share|improve this answer

If you have PHP installed, you could write a script with the SERVER_NAME or HTTP_HOST variable and include it on the index page.

Some pseudocode:

if visitor HTTP_HOST =
then increase $foocount by 1
else if visitor HTTP_HOST =
then increase $barcount by 1
else if visitor HTTP_HOST =
then increase $bazcount by 1

$foocount, $barcount, $bazcount could be anything from a text file to a database. It could also mean "load specific 1x1 pixel image", and then see how many times each pixel image has been accessed. As long as you know about HTTP_HOST and SERVER_NAME, there are many ways to implement a visitor counter.

share|improve this answer

Um, Google Analytics?

share|improve this answer
I'll check if it can do what i want. Thank you. – Norba Nov 17 '10 at 18:59

Your Answer


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.