Using Log Analysis for SEO

How to analyze server access logs to understand search engine crawler behavior and optimize crawl budget.

Speakers: Yiğit Konur

Content author

03 May 2017

Video Transcript

⏱ 13 min read• 2,183 words

Read the full speech or switch languages

Hey everyone, Zeo fans. Today's video gets a little more technical. Our topic is log analysis. As you know, technical SEO is one of our most important metrics on the Google side. Large-scale sites especially need to use their whole crawl budget well. That's the time and credit Google spends browsing your site. There are a few methods we can use here. The first is crawl analysis. We've made plenty of videos about that already. Log analysis is a bit more advanced. It can feel intimidating. But once you dig in, you'll see it's not that hard.

Here's how it basically works. You've got a server and a computer. The two talk to each other. On the server side, we have to log every request coming in. Those come from computers, users, and clients. Even outside SEO, you have to record them. That happens in Apache or in your Load Balancer. Your web hosting company or IT manager definitely knows this. They mostly use this data to spot problems. Here's the path we'll take. We'll figure out what we can learn from this data for SEO.

First, let's understand how this data gets created. You're looking at a typical Apache log here. It's just one line from your web server's logs. The first part is the server's IP. More precisely, it's the IP of the client making the request. So which IP sent you this request. First off, you can see this right here. Second, there's the timestamp. When did this person, or Google bot, hit this page? We can see that clearly from the timestamp. Right after that comes the GET part.

So what kind of request is this? Is it a data request? Or is it sending me data? Usually 90% of what we see is GET and HEAD methods. Here it's requesting data from our site. That's the IP you see there. And in the request details, in the request URI. I see this: it's making a request over the HTTP protocol from inside the videos and log analysis folders. Basically it says, can you get me the content on that page? It sends that request to the server through the browser. Right after, the server came back with 200. It said OK. I have this page, I found the match. No problems on my server. I'm giving you an OK response.

The code we usually want to see here is 200. Right after that, this user has to identify itself to the server. But by identity, I don't mean specific details about your computer. For example, if you use Google Chrome, a user agent saying you're on Google Chrome. Or if you're on a device, a mobile device, I mean a user agent for that. You can see it here. There's a user agent pointing to Mozilla 5.0 Compatible Googlebot 2.1 HTTP/google.com/bot/html. Here's what that means. I'm Google's spider. I came from this IP. I'm requesting this page from you as a GET, with a 200. And you gave me back a 200 response.

And every detail of the actual session lives in the log analysis you see here. For big sites, these can run millions of lines long. Every action on the site writes one line to the log. Picture huge web sites. Huge e-commerce sites. Sites pulling in millions of visits. You can imagine how crowded that log file gets. As SEO consultants, we usually prefer to process these files monthly. You can also configure your server to include more data. Things like total bytes loaded. The host name. Details on the IP making the request. And how long it took to respond.

All of this varies based on where you pull the data from. There are usually two types of data sources. First, data straight from your server. Second, the load balancer. That's a device that takes an incoming request. Then it routes it based on which backend server is free. It can be pure hardware. Or a machine managed by software. Brands, especially big ones, often prefer to hand you the load balancer logs. In that case you need to take those logs. Then convert them into a format our tools can handle.

BuildVisible has an incredible guide on this called Log Analysis. Search Google and you'll find it right away. It gives you very clear info on the topic. It covers how to manipulate this data with Excel. Of course, past a million requests, Excel may not be an option. There are five core metrics we'll use here. First up: error codes. When Google bot hits my server, what response code does it get back? So first I wanted to look at all my data through a Google bot lens. And here's what I see. Sometimes I served Google bot a 404. Sometimes I threw a 500.

What do these mean? 404 is not found, as you know. 500 is the one we usually point to for server errors. And all of this is sitting right there in our server logs. So we can spot our problem pages and build a plan to fix them. Second: the bot's total crawl coverage. Say you've got a million and a half pages on your site. But is Google bot really crawling all million and a half? It might only be crawling 150k or 200k. Knowing the bot's crawl coverage exactly can hand you huge insights.

The section that actually matters to you might not get crawled at all. You'll see this way more clearly once you run a log analysis. Third: the bot's crawl priorities. Does Google bot spend time on your key landing pages? What about the pages you keep updating? If you run a news site, you publish a story. How long until Google bot shows up on that page? That gap matters a lot. You might want to break urgent news the second it happens. So that difference, that gap, becomes one of your most important metrics.

So you need a really solid grasp of the bot's crawl priorities. Of course, you can't do this by eye. That's one line you see back there. And there are millions of them. We'll use some tools. That's how we get these insights. Fourth: misreading your crawl budget. Basically, Google bot spends too much time on page groups we don't care about. Picture an e-commerce site. You've got filters. You've got categories. And Google bot burns time on totally irrelevant filters. You don't want Google crawling those filters. Or say you run a news site. Google bot keeps hitting your printer-friendly page. That page is identical to the main article page. There's no added value there. So you probably don't want it crawled.

So you need to read this section really well too. And last, the last crawl dates. This is one of the big ones. You might work hard to keep some pages fresh. But Google bot has to see it. If it never visits, that freshness means nothing. So you need to sniff out and analyze those last crawl dates. On that note, there was a great talk at Brighton SEO. Mark Thomas gave it. He's Botify's current growth director. Mark touched on five different questions here. I really liked all of them. I wanted to bring some into this show. First, Mark asks: "What's my crawl rate? After crawling all my pages, which page group does Google bot focus on? What about other search engine spiders?"

Once you can pin that down clearly, you start to see something. Maybe your internal linking has serious problems. And because of those problems, Google indexes the wrong areas. That's a really big risk for you. For big sites especially, you need a clear read on crawl rate. How often does Google bot hit your fresh pages? That's one of the most important questions to answer. Second, the share of pages Google crawls. Is Google crawling 30% of the site? Or is it skipping 70% most of the time?

Look at this data monthly. Maybe Google only re-crawls 70% of your site every three months. That can point to core problems in your link structure. It can also point to off-site SEO issues. Or it can shine a light on server-side problems you didn't know about. Maybe something is basically blocking Google from reaching your whole site. Your server might throw a 404 sometimes. Sometimes a 500. And you might never notice on your own routine visits. Because you always get a 200 back.

But Google bot makes constant requests. It hits 100-200 pages back to back, every second. That can wear out your server. And the errors you hit there? They can absolutely stop Google from indexing your whole site. On top of that, you've got target keywords for every web site. And each one has a matching landing page. Are you ranking well for the keywords that actually matter to you? Is Google crawling them? You really need to check this. Build a VIP page list. Then you can review the crawl habits of each one. And finally, look at the user agent side. That's the visitor identity. Is there a gap between Google bot's crawl rate and other search engine spiders?

Maybe your server responds differently to Google bot. It shows up constantly, after all. Study how the other search engine spiders behave. That gives you a clearer answer here. People use this data for one thing especially. Here's what you can infer from Google bot data. Which pages does Google bot follow from the page I'm on? So you can map Google bot's path. Its route through the site. The log analysis makes that easy. And you can layer in some extra data too. Bytes loaded, for example. Or how long the page took to load. Do slowdowns at certain points actually change how Google bot treats you?

So you can start answering questions like this. How does site performance relate to crawl? Of course, it's just those two lines here. Really, it's a one-line file. Commenting on that alone might feel tough. Yeah, it's really hard to spot this as a human. So I want to cover five tools you can use. Let's go by site type. Say you have an e-commerce site. It's huge, and you want real-time log analysis. In that case, use Logs.io. It analyzes your logs in real time, super clearly. It gives you great insights. It's a bit pricey, but I'd recommend it. Botify works the same way. You upload your logs to Botify.

Not in real time, if I'm not mistaken. It maps out the bot's movements and paths. It surfaces problems. It gives you performance-related insights. Amazing tool. You've got to use it. That said, some companies won't share these logs externally. In our country, e-commerce law is a big reason why. We have two solid alternatives here. First is OnCrawl. OnCrawl has an open source log analysis tool. If you can use it, it's great. You set it up on your own system. And you'll get the best answer there. How to run log analysis, and what insights to pull out.

Totally free. You can analyze millions of pages. Same goes if you're used to Screaming Frog. They've got a new tool for this. I think it's around 99 pounds a year. Pretty reasonable. If you buy it, you might hit some hiccups at the tens of millions level. But at the million level, log analysis is easy. You can even run weekly log analysis for big sites in Screaming Frog. It gives you great insights. Which events happened at the page level. Which bots and visitors hit which pages, and how often. You can filter all of that in Screaming Frog.

Finally, at the widest scale, say you want to review a full year of logs. Splunk is one of the smartest tools for that. Splunk wasn't built for SEO. It was built to look at server logs from a big-picture view. It's an enterprise solution. The pricing matches that. But I think you get the first two months free. Enough time to make sense of all your data. Pull a year of data and run it through Splunk. I really recommend it. While you're doing all this, some terminal knowledge helps a lot. Being able to slice up the data. Writing a grep command to pull out the Google bot queries you want. Or writing a little Python scraper. Something that extracts exactly the parts you care about from the whole dataset. That skill makes life way easier here.

So maybe work with a developer. Or just bring a little curiosity. Either way, you can handle this process yourself. I know it looks tough on the technical side. But just load your data once. Screaming Frog's free version handles up to 1000 events. Once you load it up, you'll start pulling out great results. And I think you'll really enjoy the process. That's everything I wanted to cover on log analysis. Thanks for listening. See you in the next video. Take care.

This transcript was generated using AI speech recognition and verified against subtitle style rules.

Yiğit Konur

Content author

Yiğit Konur

both

Contact us

How we handle your data

Open as a full page