Independent Site Log Analysis: Reading Crawlers, Errors, and Traffic in Nginx/Apache Logs

70% to 85% of requests in server logs come from crawlers and scripts; real human visitors usually account for only 15% to 30%. Looking at total visits alone is seriously misleading. The right way to read them has three steps: first use Us...

日志分析三件事:分清谁在爬、哪里在错、人在哪Reading server logs: who crawls, what errors, where the humans are 反直觉:日志里 70% 至 85% 的请求不是人,别把爬虫量当成流量增长Counter-intuitive: 70%-85% of log rows are bots, not human visits 维度Dimension 看什么What to look at 爬虫识别Bot traffic UA 字段 + IP 反查UA string + IP lookup 区分好爬与坏爬Good vs bad crawlers AI 爬虫单独统计Track AI bots separately 错误排查Errors 404 死链与 5xx 故障404s and 5xx outages 错误率阈值告警Error-rate alerting 5xx >1% 立即查5xx above 1% = act 真人流量Human traffic 去机器人后再算 PVStrip bots before PV 落地页与来源路径Landing pages and referrers 真人数常占 15% 至 30%Humans often 15%-30% 标准工具链:GoAccess 周报 + awk 按小时统计 + 每月一次全量审计Toolchain: GoAccess weekly + awk hourly + monthly full audit 日志至少保留 90 天,按月切割压缩;CDN 回源日志才是真实源站视角Keep 90+ days, rotate monthly; origin pull logs show real back-to-source traffic 动作优先级:5xx 错误 > 404 死链 > AI 爬虫读取情况 > 真人 PV 趋势Priority: 5xx > 404s > AI crawl reads > human PV trend 先读错误,再读爬虫,最后才看流量——顺序反了容易被数字误导Read errors first, then bots, then traffic; reverse order misleads
Three Ways to Read Nginx/Apache Logs: Crawler Identification, Error Troubleshooting, and Restoring Real Human Traffic

Independent Site Log Analysis: Reading Crawlers, Errors, and Traffic in Nginx/Apache Logs

Bottom line first:70% to 85% of requests in server logs come from crawlers and scripts; real human visitors usually account for only 15% to 30%. Looking at total visits alone is seriously misleading. The right way to read them has three steps: first filter out crawlers by User-Agent and IP, then watch the 5xx error rate (investigate immediately if it exceeds 1%) and 404 dead links, and only then run PV, landing page, and referrer analysis on the remaining human requests. Keep logs for at least 90 days, produce a GoAccess report weekly, and run a full audit monthly.

1. Why You Can’t Just Look at “Total Visits”

Many site owners open their logs and their first reaction is “how many requests came in today,” then judge how business is going from that. That’s the first trap: in Nginx’s default access.log, one record is one HTTP request. A single human opening the homepage can generate 8 to 15 requests (HTML, CSS, JS, and images each count as one), while a malicious crawler can fire off thousands in a minute. The total tells you almost nothing for decision-making.

Here’s the counterintuitive conclusion:Your traffic “spiked” — eight times out of ten it’s just some crawler hammering your site, not customers arriving. The test is simple: deduplicate the log by User-Agent and see who the top 20 request sources are. If more than half come from bot-type UAs, that spike has nothing to do with your business. This aligns with the approach of AI Crawler Log Analysis: first figure out “who is reading you,” then talk about “how much was read.”

Log Field (Nginx combined) Meaning Analysis Use
$remote_addr Source IP Identify data center IPs, malicious scans, and crawler ownership
$request Request method + path + protocol See which URLs were actually visited and which files got hammered
$status HTTP status code 200 normal, 301 redirect, 404 dead link, 5xx failure
$body_bytes_sent Bytes returned Identify empty responses and blocked abnormal downloads
$http_referer Referrer page Which link a real person clicked to get in
$http_user_agent Client identifier Distinguish browsers, search engine crawlers, and AI crawlers

2. How to Read Them: Three Signal Types — Crawlers, Errors, and Real Human Traffic

The recommended analysis order is fixed as “errors → crawlers → humans,” not the reverse. The reason is that errors directly affect the human experience, so they have the highest priority; crawler volume determines your crawl budget and bandwidth costs; real human traffic is the part worth scrutinizing last. This is also why Site monitoring and alerts puts availability and error rate in the first tier.

Don’t rely on user agent alone to spot crawlers, since malicious bots spoof their UA to pose as Googlebot. The standard approach is two-way verification: run a reverse DNS lookup on any IP claiming to be Googlebot to confirm it really comes from the googlebot.com range, then do a forward lookup to match it back. Fake crawlers fail this step.

Signal Healthy range Threshold for action Action
5xx error rate Under 0.5% Above 1% for 10 minutes straight Check PHP-FPM and backend logs, immediately
Share of 404s Below 3% A single URL returning 404 more than 100 times/day Add a 301 or fix the internal link
Share of suspicious crawler requests 20% to 40% Above 60% and bandwidth is tight Restrict via robots or WAF
Real user sessions Steady week over week Down more than 20% for 2 weeks straight Check indexing and ad campaigns, not the server
Share of AI crawler reads 5% to 15% is normal A jump of 3x or more See if you’re being scraped for training at scale

3. How to do it: from one command to a weekly report

A solo team doesn’t need an expensive log analysis platform. The minimal toolchain is three things: GoAccess for visual weekly reports, awk for hourly stats, and a manual full audit once a month. Here are two scenarios you can use right away.

Scenario 1: Find today’s most error-prone URLs. In your Nginx log directory, run: awk ‘$9 ~ /^5/ {print $7}’ access.log | sort | uniq -c | sort -rn | head -20. It pulls the paths of all 5xx requests and sorts them by how often they appear. The top 20 are the pages you should fix today.

Scenario 2: See how many times Google and AI crawlers visited today. awk ‘BEGIN{IGNORECASE=1} /Googlebot|GPTBot|ClaudeBot|bingbot/ {print $http_user_agent}’ access.log | sort | uniq -c | sort -rn. Bucket the results by UA and you can see the ratio of Google’s normal indexing crawler to the various AI reading crawlers. For CDN sites, pull origin logs rather than edge logs. See CDN global acceleration for the difference between origin pull and caching.

Scenario 3: Generate a weekly report for yourself. Once GoAccess is running, generate an HTML report each week and focus on four sets of numbers: the breakdown of 4xx vs. 5xx in the status code distribution, the top ten most-requested URLs, the hourly traffic curve, and the crawler share bucketed by UA. Make a habit of reviewing this report every Monday morning. It’s far more efficient than digging through logs on the fly. One habit worth building: write every anomaly you find into a small table. Look back after three months and you’ll see the patterns.

Frequency Action Output Time
Daily Glance at the 5xx error rate dashboard Decide whether something is broken 2 minutes
Weekly Run GoAccess for last week’s report Top paths, top crawlers, status code distribution 10 min
Monthly Full audit of 404s and unusual UAs Dead link list, IPs to block 1 hour
Quarterly Calibrate log retention and rotation policy Make sure the disk won’t fill up and history stays searchable 30 minutes

4. Pitfalls: the three most common misreadings

The first trap is treating every 200 as healthy. Some plugins get hit by malicious scanners and return a 200 with a fake page: the status code looks fine, but the content has been swapped. You catch this by looking for “abnormally small response size” or “URL parameters that shouldn’t be there,” and in serious cases handle it with After your site gets hacked the same process.

The second trap is watching only real time and keeping no history. If logs aren’t rotated and retained under a policy, you either blow out the disk or, three months later, you want to check “when exactly did that March outage start?” and there’s nothing to look through. Rotate daily, keep 90 days of hot data, and compress and archive anything older.

The third trap is treating crawler hits as an SEO win. Ten thousand Googlebot visits don’t mean you rank well, only that it keeps crawling. What actually matters for SEO is “are your important pages being crawled properly,” and you have to read that against your indexing data, not just brag about crawler volume. For how performance relates to crawling, see Core Web Vitals its impact on how completely spiders crawl your site.

Misreading What it looks like The real cause How to check it properly
A traffic spike is a good thing Requests tripled A crawler started hammering the site Dedupe by UA and check the share of real users
All 200s means healthy All status codes look normal Hacked and serving a fake page Spot-check abnormally small responses and suspicious parameters
More Google crawling = better rankings Googlebot requests are high It’s re-crawling low-quality pages Compare against indexed pages and actual rankings
404s can be ignored The share doesn’t look high Old backlinks keep losing weight 301 the top 404s to the matching new pages

FAQ

What’s the difference between Nginx and Apache log formats, and do the same analysis methods work for both?
Mostly yes. Both support the combined format by default: IP, time, request line, status code, bytes, referrer and User-Agent, the same seven columns. Nginx uses $status for the status code, Apache uses %s; the field positions differ, so watch for a one-column offset when pulling columns with awk. The approach is identical: bucket by status code first, then by UA, then aggregate by path. Standardize both machines on the same combined format and your scripts will work on both.
How do you tell real Googlebot from a fake crawler?
Do two-way DNS verification. First reverse-resolve the IP claiming to be Googlebot and check whether the hostname ends in googlebot.com or google.com; then forward-resolve that hostname and check whether it returns the same IP. Only when both steps match is it a real Google crawler. Fakes can usually only change the UA string and can’t get past the IP ownership check. The same goes for AI crawlers: check the officially published IP ranges.
How long should logs be kept to be useful?
Keep hot data for 90 days. After that, compress and archive it by month to disk or object storage, and keep archives for at least a year. There are three reasons: when troubleshooting, you often need to trace back to where a problem started weeks earlier; SEO indexing issues usually require comparing against crawls from one or two months ago; and if a security incident occurs, you need to check access records from the past six months. Split by day and compress with gzip, and a year of logs usually takes up only a few GB.
Should you fix every 404 error?
Don’t spread your effort evenly. Sort them by hit count and work through them in that order. If a single URL generates more than 100 404s in a day, it means there are real backlinks or users clicking through, so you must add a 301 to the closest matching new page. For long-tail 404s that only get a few hits a day, leave them for now and clean them up once a month. Redirecting every 404 site-wide to the homepage with a 301 is the wrong approach and will dilute your link equity.
After using a CDN, are server logs still accurate?
No, they’ll be severely undercounted and distorted. Requests that hit the CDN cache never go back to the origin, so origin logs only show the traffic that does. Most real user requests are handled at the CDN edge nodes. The right approach is to look at both logs: pull edge request logs from the CDN console to see total traffic, and use origin logs to check back-to-origin requests and backend errors. Use CDN logs to analyze crawler and human traffic, and origin logs to troubleshoot 5xx errors and PHP failures.
I see GPTBot and ClaudeBot crawling in my logs. Is that good or bad?
It depends on your goals. If you want your content cited by large language models, this is normal and even welcome reading. Rising read volume often goes hand in hand with rising AI citation rates. If you don’t want your content used for training, you can disallow the corresponding crawlers in robots.txt. The standard isn’t how much they crawl, but whether important pages are being read properly and whether the read frequency is abnormal enough to affect bandwidth. I recommend tracking these user agents separately from search engine crawlers.

Final thoughts

The value of log analysis isn’t in “looking at traffic” — it’s in “troubleshooting and identifying who’s who.” For a solo-run independent site, spending ten minutes a week running a report and one hour a month doing a full audit is enough to cover 90% of common issues: where errors are happening, where dead links are, which crawlers are eating your bandwidth, and where real users are actually coming from.

Three steps to implement: First, standardize your log format to combined and split by day, keeping 90 days. Second, set an alert for 5xx error rates over 1%, then deal with the top 404s. Third, track crawlers and real users separately — stop fooling yourself with total visit counts. For a related site maintenance schedule, you can cross-reference Website Maintenance Schedule with the monthly six-item checklist.

One sentence worth remembering: server logs aren’t a traffic dashboard — they’re footage from the scene of an accident. First find where the car crashed, then count how many cars were on the road.

Crater
Crater Crater experts

Official Organization · Crater

Crater is a go-global services company specializing in WordPress standalone site development + Google SEO + GEO full-funnel growth, serving sectors including smart hardware, industrial equipment, SaaS, and new energy.

Product CapabilitiesMethodology WhitepaperIndustry Report
965articles shared
78knowledge base articles