Raw access logs record every request made to your website — including page views, file downloads, and bot activity. cPanel provides a built-in interface to download and archive these logs so you can analyse traffic with your preferred statistics software.
Step 1 — Log in to cPanel
- Navigate to your cPanel login page (typically
https://yourdomain.com/cpanelorhttps://yourdomain.com:2083). - Enter your cPanel username and password.
Step 2 — Open Raw Access Logs
- In the cPanel dashboard, scroll to the Metrics section (or use the search bar).
- Click on Raw Access Logs.
Step 3 — Configure Log Archiving
- To automatically archive your raw logs at the end of each month, check the box labelled Archive logs in your home directory at the end of each month.
- Click Save to apply the setting.
- Archived logs will be stored in your home directory under
/home/username/logs/and compressed as.gzfiles.
Step 4 — Download Raw Access Logs
- On the Raw Access Logs page, you will see a list of your domains and their current log files.
- Click the domain name to download the log file directly.
- The file will download in a raw text format (Apache/Nginx combined log format).
Understanding the Log Format
Each line in a raw access log follows the combined log format:
- IP address — The visitor's IP.
- Timestamp — Date and time of the request.
- Request method & path — e.g.,
GET /index.html HTTP/1.1. - Status code — HTTP response code (200 = OK, 404 = Not Found, etc.).
- Bytes transferred — Size of the response.
- Referrer — The page that linked to the requested resource.
- User agent — Browser or bot identifier.
Important Notes
- Log retention: cPanel typically keeps raw logs for the current month only. Enable archiving to preserve historical data.
- Resource limits: Very busy sites may have large log files. Use
grepor log analysis tools to filter specific requests. - Recommended tools: You can analyse raw logs with tools like GoAccess, AWStats, or import them into a spreadsheet for custom analysis.
Troubleshooting
- No logs listed: If your domain is new or has had no traffic, no log file will appear. Logs are generated on the first request.
- Archived logs not appearing: Verify that archiving was enabled before the end of the month. Archives are created at month's end.
- Permission denied on download: Ensure your domain is active and assigned to your cPanel account. Contact your hosting provider if the issue persists.