Short answer: An access log records every request your web server answers: who asked (IP address), when, what (method and URL), the result (status code), the size, where they came from (referrer) and what software asked (user agent). In cPanel you download it from Metrics → Raw Access; on a VPS it is usually in /var/log/nginx/ or /var/log/apache2/. Reading it shows broken links, bad bots and attacks that analytics tools never see.
Analytics shows you people who run JavaScript. Your access log shows everything: bots, scanners, failed logins, broken links and the exact moment something went wrong.
Where to find your logs
- cPanel: open Metrics → Raw Access to download the access log for each domain, and Metrics → Errors for recent errors.
- VPS with Nginx:
/var/log/nginx/access.logand/var/log/nginx/error.log. - VPS with Apache on Debian or Ubuntu:
/var/log/apache2/access.loganderror.log. - VPS with Apache on AlmaLinux, Rocky or CentOS:
/var/log/httpd/access_loganderror_log.
Logs are rotated (renamed and compressed, often daily), so older days are in files ending .1 or .gz.
Reading one log line
Most servers use the "combined" format:
203.0.113.24 - - [05/Nov/2026:10:14:32 +0100] "GET /blog/what-is-seo/ HTTP/2.0" 200 18452 "https://www.google.com/" "Mozilla/5.0 (Linux; Android 14) ..."
| Part | Example | Meaning |
|---|---|---|
| IP address | 203.0.113.24 | Who made the request |
| Time | 05/Nov/2026:10:14:32 +0100 | When, with time zone |
| Request | GET /blog/what-is-seo/ HTTP/2.0 | Method, address and protocol |
| Status | 200 | The result (see below) |
| Size | 18452 | Bytes sent back |
| Referrer | https://www.google.com/ | The page that linked here |
| User agent | Mozilla/5.0 ... | The browser or bot |
The status code tells you most of the story: 200 fine, 301/302 redirected, 304 not changed (served from cache), 404 not found, 403 forbidden, 500/502/503 server errors. Our guide to HTTP status codes lists them all.
What to look for
- Broken links: lots of 404s for the same address. Add a 301 redirect or fix the link. See fixing 404 errors.
- Login attacks: repeated
POST /wp-login.phporPOST /xmlrpc.phpfrom the same addresses. See brute-force attacks and WordPress XML-RPC. - Scanners: requests for files you don't have, such as
/.env,/.git/config,/phpmyadmin/or/wp-admin/on a site that isn't WordPress. They are bots looking for mistakes; make sure none of those return 200. - Bad bots: a single user agent or address making thousands of requests. See bad bot traffic.
- Server errors: clusters of 500s point at a broken plugin or script; check the error log at the same time.
- Real search engine crawlers: Googlebot and Bingbot visiting new pages is a good sign after you publish.
Quick commands on a VPS
Watch requests as they arrive:
tail -f /var/log/nginx/access.log
The 10 busiest IP addresses:
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
The most requested missing pages:
awk '$9 == 404 {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
Every login attempt on WordPress:
grep "POST /wp-login.php" /var/log/nginx/access.log | wc -l
To see who an address belongs to, paste it into the IP address lookup.
Logs and privacy
Access logs contain IP addresses, which privacy laws such as the GDPR and Nigeria's NDPA treat as personal data. Keep logs only as long as you need them for security and troubleshooting, protect access to them, and mention them in your privacy policy. See also NDPA compliance for websites.
Frequently asked questions
What is the difference between an access log and an error log?
The access log records every request and its result. The error log records problems the server or PHP hit while answering, with details such as the file and line that failed.
Why do I see visits from IPs I don't recognise?
Most are bots: search engine crawlers, uptime monitors, and scanners probing every site on the internet. That is normal. Act when one source sends a flood of requests or targets your login pages.
Can I see what pages a visitor read?
You can see the requests from one IP address in order, which shows the pages loaded. Logs don't tell you who the person is.
How long should I keep access logs?
Long enough to investigate problems, often a few weeks to a few months. Delete or anonymise older logs unless you have a legal reason to keep them.



