How to check access logs in cPanel

Understanding Access Logs:

Access logs serve as a comprehensive record of every request made for each specific file on a website. These files encompass various elements such as HTML and other associated information that visitors access. 

Essentially, access logs provide valuable insights into website visitors and the content they interact with.

If you encounter any website-related challenges or simply wish to examine and analyze website traffic, you can easily access the logs within your cPanel.

To begin, log in to your cPanel account.

Next, navigate to the Metrics section and locate the “Raw Access” option. Click on it to proceed.

Upon accessing the Raw Access screen, you will find a range of options at your disposal. These include configuring logs, downloading current raw access logs, and accessing archived logs.

By default, both configurations are checked, ensuring that log files are automatically archived in your Home Directory every 24 hours. 

To optimize storage space, these archived logs are subsequently removed at the end of each month. However, you have the flexibility to modify these settings as per your requirements using the checkboxes provided.

Located beneath the Configure Logs section, you will find the Download Current Raw Access Logs option. 

This enables you to retrieve the most recent raw access logs for your listed domains and subdomains. Simply click on the links associated with your specific domain or subdomain.

It’s important to note that raw logs typically retain only a few hours’ worth of data, as they are discarded once the system completes its processing. 

However, if archiving is enabled, the system will first archive the raw log data before discarding it.

Afterward, you will come across the Archived Raw Logs section, which contains logs from previous months. To retrieve logs for a specific month, simply click on the domain or subdomain associated with that month.

To proceed, you must utilize an archiving tool like WinZip, WinRar, or 7-Zip to extract the downloaded files.

Once the extraction is complete, you can access the files using your preferred text editor.

The contents of the Raw Access Logs:

1. Website Visitor’s IP address

2. Date and time stamp indicating when the access occurred

3. HTTP activity transmitted by the visitor’s browser, denoted as either GET or POST

4. The specific resource file that was accessed

5. User-agent identity, which provides insights into how the user interacted with your website.

Was this article helpful?

Related Articles

Leave A Comment?