Book a call Free rebuild
Home/Glossary/Hosting/Access Log

Access Log

August 16, 2022 Updated November 16, 2026 2 min read

Hosting glossaryAn access log is a server file that records every request a website receives: the visitor's IP address, the time, the page requested, and the response code.

Every time a browser, bot, or script asks a web server for something, whether a page, an image, a stylesheet, or a call to wp-login.php, the server writes one line about it to the access log. Read together, those lines are the most complete record of what actually reached a site: not a sample, not what a JavaScript tag managed to report, but every request the server handled.

What an entry contains

Apache and NGINX both default to a variant of the "combined" log format. A typical line looks like this:

203.0.113.7 - - [16/Nov/2026:09:14:02 +0000] "GET /pricing/ HTTP/2.0" 200 18342 "https://www.google.com/" "Mozilla/5.0 ..."

From left to right: the client's IP address, two identity fields that are usually empty, the date and time, the request (method, path, and protocol), the HTTP status code, the size of the response in bytes, the referrer, and the user agent. Hosts can add more, such as the time the server took to respond, which is useful when hunting slow pages.

Where to find it

  • cPanel hosting: the Raw Access section of the control panel lets you download recent logs per domain.
  • Your own server: common locations are /var/log/apache2/access.log, /var/log/httpd/access_log, or /var/log/nginx/access.log, depending on the system.
  • Managed WordPress hosts: most expose access logs in their dashboard or over SSH, sometimes only for a few days.

If the site sits behind a CDN or reverse proxy such as Cloudflare, two things change. Requests served from the CDN's cache never reach the origin, so the origin log undercounts traffic. And the IP recorded may be the proxy's, not the visitor's, unless the server is configured to restore the real client IP from the forwarded header.

What it is used for

  • Troubleshooting: a run of 404s shows broken links or a botched migration; 500s and 503s show when and where the site failed.
  • Security: thousands of POST requests to wp-login.php or xmlrpc.php from a handful of IPs are a brute-force attack in progress. Requests for files that should not exist, such as random PHP files in the uploads folder, can point to an infection.
  • Crawl analysis: filtering for Googlebot shows which URLs Google actually fetches and how often, which matters on large sites with a limited crawl budget. User agents can be faked, so confirm real Googlebot traffic with a reverse DNS lookup followed by a forward lookup, or by checking the IP against Google's published Googlebot IP ranges.
  • Load and bandwidth: logs reveal which files, bots, or hotlinking sites are using the most server resources.

Access logs record requests; they do not explain failures. For the reason behind a 500 error, look in the error log.

Privacy and retention

IP addresses can count as personal data under laws such as the GDPR, so keep logs only as long as there is a reason to, rotate and compress them, and restrict who can read them. Busy sites generate large files quickly; log rotation stops them from filling the disk.

HostList

The hosting directory with no paid rankings.

Compare 30,000+ web hosts and MSPs across 120+ countries, ranked by HRI, an independent 0 to 100 rating built from verified data. Find your perfect web host.