In today’s competitive world it has become necessary to keep track of our visitors. As a business policy you should know :
- Who is visiting our Web site?
- What browsers do they use?
- Where do they go in the site?
- What pages do they look at?
- How long they stay at our site? etc.
The answers to these questions would be found in Server log files
A server log is a file (or several files) automatically created and maintained by a server.
Your Web server log files contain much useful information such as :
- Which pages get the most traffic – and the least.
- What sites are referring visitors to you.
- Which pages visitors look at.
- What browsers and operating systems are most popular with visitors.
- When search engine spiders and directory editors visit.
This information often helps webmasters to figure out problems on our web site. Using log file we get detail information of our visitors. Once we know from where we are getting targeted traffic then it becomes easy for us to take necessary steps for maintaining and improving traffic from particular search engine.
The server stores visitor information in files with the .log extension, nearly all of the major Web servers use a common format for this log files. These log files contain information such as the IP address of the remote host, the document that was requested, and a timestamp.
The syntax for each line of a log file is:
site logName fullName [date:time GMToffset] “req file proto” status length
Each of the eleven items listed in the above syntax and example are described in the following list.
- site-either an IP address or the symbolic name of the site making the HTTP request
- logName – login name of the user who owns the account that is making the HTTP request. Most remote sites don’t give out this information for security reasons. If this field is disabled by the host, you see a dash (-) instead of the login name.
- fullName – full name of the user who owns the account that is making the HTTP request. Most remote sites don’t give out this information for security reasons. If this field is disabled by the host, you see a dash (-) instead of the full name. If your server requires a user id in order to fulfill an HTTP request, the user id will be placed in this field.
- Date – date of the HTTP request.
- Time – time of the HTTP request. The time will be presented in 24-hour format.
- GMToffset – signed offset from Greenwich Mean Time. GMT is the international time reference.
- req – HTTP command. For WWW page requests, this field will always start with the GET command.
- file-path and filename of the requested file.
- proto-type of protocol used for the request.
- status-status code generated by the request.
- length-length of requested document.
These data can be combined into a single file, or separated into distinct logs, such as an access log, error log, or referrer log. However, server logs typically do not collect user-specific information.
These files are usually not accessible to general Internet users, only to the webmaster or other administrative person. A statistical analysis of the server log may be used to examine traffic patterns by time of day, day of week, referrer, or user agent.
Visit the WHUK website for more news, knowledge base articles, blog posts and information on our wide range of hosting services.