promptunit

Crawl Budget Waste Finder From Server Logs

Is Googlebot spending its time on your best pages or on junk like soft 404s, parameters and redirect chains? This prompt reads your server logs or Crawl Stats, shows exactly where crawling is wasted, and gives you a ranked fix list so new and updated pages get found faster.

Works in ChatGPTClaudeGemini573 words7 inputs to fillSEO-037

Example input

This is exactly what we gave the model. You replace it with your own details.

- Website: https://www.example.net (classifieds site for used cars)
- Site size: About 180,000 URLs; 6,000 new or changed listings per day
- Platform, server and CDN: PHP app on Nginx with a MySQL database, behind Cloudflare
- Log access: 30 days of raw Nginx access logs
- Paste a log sample (50-200 lines) or a summary of Googlebot hits by URL folder, status code and file type:
Googlebot hits over 30 days (from logs, not yet verified by DNS):
  /listing/ (car ads): 31%
  /search/?make=...&model=...&page=... : 28%
  /listing/ URLs that return 200 with 'This ad has expired': 14%
  /compare/?ids=... : 9%
  /static/js/ and /static/css/: 8%
  /dealer/ pages: 5%
  404 errors: 3%
  301 redirects (http to https and trailing slash): 2%
- Crawl Stats summary: total requests per day, average response time, % by response code, % by file type, % by purpose (discovery/refresh): 95,000 requests per day; average response time 1,250 ms; 200 OK 88%, 301 4%, 404 3%, 5xx 1%; by purpose: refresh 81%, discovery 19%
- Pages that take too long to get crawled or updated: New listings take 4-6 days to appear in Google; price changes take over a week

Real output

Pasted straight from the model. We did not fix a word.

Crawl budget audit: www.example.net (used-car classifieds)

Crawl budget is a real problem for you. Google's own crawl budget guide says it matters for sites with 10,000+ pages whose content changes daily. You have about 180,000 URLs and 6,000 new or changed ads a day, and new ads take 4–6 days to appear in Google. Page count isn't the cause, though. Two things are:

  1. Waste: more than half (56%) of Googlebot's hits go to low-value URLs.
  2. Slow server: an average response time of 1,250 ms lowers how much Google is willing to crawl, so every wasted hit costs more.

Before I start: 5 questions, each with the guess I'm using

I have used these guesses all through the answer. Anything marked (guess) depends on them, so correct me if one is wrong.

  1. Do your Nginx logs show the visitor's real IP, and do they include response time? Guess: no to both. Behind Cloudflare, Nginx logs Cloudflare's IPs unless real_ip is set up, and the default "combined" log format has no timing field.
  2. How many ads are live at one time, and how many of the 6,000 a day are brand new vs. changed? Guess: about 150,000 live ads; about 3,500 new and 2,500 changed per day.
  3. Do any /search/ URLs get Google clicks, and do you have clean category URLs like /used-cars/toyota/corolla/? Guess: a few hundred make/model search URLs get most of the search clicks, and there are no clean category URLs yet.
  4. What is in your XML sitemap? Guess: one or a few large files, lastmod missing or not updated when a price changes, and expired ads still listed.
  5. Is the site responsive, with the same links on mobile and desktop? Guess: it is responsive, but mobile search results use a "Load more" button instead of page links. This needs checking because Google crawls mobile-first.

1. Log analysis method and script

Step-by-step method

  1. Fix the logs first (about 10 minutes). Make Nginx log the real visitor IP instead of Cloudflare's, and add $request_time (config below). If your current logs hold Cloudflare IPs, the old 30 days can't be verified. Use them for rough patterns only, and collect 14 fresh days for the real numbers.
  2. Export expired ad IDs from MySQL. Logs can't see the "This ad has expired" text, so the script matches listing IDs instead.
  3. Run the script on all log files (plain and .gz).
  4. Check verification.
    • Look at the verified vs. fake share.
    • Compare verified hits per day with Crawl Stats (95,000/day). The gap is requests that Cloudflare answered itself, such as cached files and edge redirects. Google counts those, but they never reach Nginx.
  5. Read the groups:
    • key pages vs. low-value pages
    • which parameter combinations eat the crawl
    • how deep Googlebot goes into search pagination
    • which page types are slowest
  6. Cross-check in Search Console.
    • Crawl Stats → By purpose → Discovery: click it to see example URLs.
    • Page indexing: look at "Soft 404", "Discovered – currently not indexed" and "Crawled – currently not indexed".

Nginx changes (do these first)

# /etc/nginx/conf.d/seo-logging.conf   (loaded inside the http {} block)

# 1) Log the visitor's REAL IP, not Cloudflare's.
#    Add EVERY IPv4 and IPv6 range listed at https://www.cloudflare.com/ips/
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 162.158.0.0/15;
# ... all other Cloudflare ranges ...
real_ip_header CF-Connecting-IP;

# 2) Add response time to every line (the script reads $request_time)
log_format seo '$remote_addr - $remote_user [$time_local] "$request" '
               '$status $body_bytes_sent "$http_referer" "$http_user_agent" '
               '$request_time $upstream_response_time';
access_log /var/log/nginx/access.log seo;

Script

#!/usr/bin/env python3
"""
googlebot_audit.py - verify real Googlebot hits in Nginx logs and show where the crawl goes.

Usage:
  python3 googlebot_audit.py /var/log/nginx/access.log*            # reads plain and .gz files
  python3 googlebot_audit.py /var/log/nginx/access.log* --expired expired_ids.txt

expired_ids.txt = one expired/sold listing ID per line, exported from MySQL, e.g.
  mysql -N -e "SELECT id FROM listings WHERE status IN ('expired','sold')" carsdb > expired_ids.txt
  (table and column names are a guess - use yours)

Needs Python 3.8+. No extra packages.
"""
import argparse, gzip, ipaddress, json, re, socket, sys, urllib.request
from collections import Counter, defaultdict
from datetime import datetime
from urllib.parse import urlsplit, parse_qs

# Google's published Googlebot IP ranges. If this link stops working,
# take the current one from Google's "Verifying Googlebot" help page.
RANGES_URL = "https://developers.google.com/static/search/apis/ipranges/googlebot.json"

# Nginx "combined" format, plus optional $request_time at the end (see the Nginx config).
LINE_RE = re.compile(
    r'(?P<ip>\S+) \S+ \S+ \[(?P<day>[^:]+)[^\]]*\] "\S+ (?P<url>\S+)[^"]*" '
    r'(?P<status>\d{3}) \S+ "[^"]*" "(?P<ua>[^"]*)"(?: (?P<rt>[\d.]+))?')

LISTING_ID = re.compile(r"^/listing/(\d+)")   # guess: /listing/482911-toyota-corolla-2018/
KEY_GROUPS = ("listing live", "dealer", "category (clean URLs)")
WASTE_GROUPS = ("search (parameters)", "listing EXPIRED (soft 404)", "compare",
                "404/410", "3xx redirect", "5xx error")


def load_google_ranges():
    """Download Google's official Googlebot IP list (falls back to DNS checks)."""
    try:
        with urllib.request.urlopen(RANGES_URL, timeout=15) as resp:
            data = json.load(resp)
        return [ipaddress.ip_network(p.get("ipv4Prefix") or p["ipv6Prefix"])
                for p in data["prefixes"]]
    except Exception as err:
        print(f"! Could not load Google IP ranges ({err}); using DNS checks only", file=sys.stderr)
        return []


_checked = {}   # cache: each IP is checked only once
def is_real_googlebot(ip, ranges):
    """Real Googlebot = IP inside Google's list, OR reverse DNS ends in
    googlebot.com / google.com AND a forward lookup of that name gives the same IP."""
    if ip not in _checked:
        ok = False
        try:
            addr = ipaddress.ip_address(ip)
            ok = any(addr in net for net in ranges)
            if not ok:
                host = socket.gethostbyaddr(ip)[0]                                 # reverse DNS
                if host.endswith((".googlebot.com", ".google.com")):
                    ok = ip in {a[4][0] for a in socket.getaddrinfo(host, None)}   # forward DNS
        except (ValueError, OSError):
            ok = False
        _checked[ip] = ok
    return _checked[ip]


def group_of(path, status, expired):
    """Put each hit in one group; the groups match the rows of the waste table."""
    if status in (301, 302, 307, 308): return "3xx redirect"
    if status in (404, 410):           return "404/410"
    if status >= 500:                  return "5xx error"
    if path.startswith("/static/"):    return "static js/css"
    if path.startswith("/search"):     return "search (parameters)"
    if path.startswith("/compare"):    return "compare"
    if path.startswith("/dealer/"):    return "dealer"
    if path.startswith("/used-cars/"): return "category (clean URLs)"   # after Fix 5
    if path.startswith("/listing/"):
        m = LISTING_ID.match(path)
        return "listing EXPIRED (soft 404)" if m and m.group(1) in expired else "listing live"
    return "other"


def folder_of(path):
    parts = path.split("/")
    first = parts[1] if len(parts) > 1 else ""
    return f"/{first}/" if first and "." not in first else "/ (root)"


def file_type(path):
    last = path.rsplit("/", 1)[-1]
    return last.rsplit(".", 1)[-1].lower() if "." in last else "html page"


def page_depth(params):
    p = params.get("page", ["1"])[0]
    n = int(p) if p.isdigit() else 1
    return "page 1" if n <= 1 else "pages 2-5" if n <= 5 else "pages 6-20" if n <= 20 else "pages 21+"


def show(title, counter, total, top=15):
    print(f"\n=== {title} ===")
    for key, n in counter.most_common(top):
        print(f"{n:>10,}  {n / total:6.1%}  {key}")


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("logs", nargs="+")
    ap.add_argument("--expired", help="file with expired listing IDs, one per line")
    args = ap.parse_args()
    expired = set(open(args.expired).read().split()) if args.expired else set()
    ranges = load_google_ranges()
    socket.setdefaulttimeout(3)          # don't hang on slow DNS lookups

    claimed = fake = 0
    stats = defaultdict(Counter)         # e.g. stats["status code"][200] -> hits
    times = defaultdict(list)            # group -> response times (seconds)

    for name in args.logs:
        opener = gzip.open if name.endswith(".gz") else open
        with opener(name, "rt", errors="replace") as f:
            for line in f:
                if "Googlebot" not in line:            # quick filter before the regex
                    continue
                m = LINE_RE.match(line)
                if not m or "Googlebot" not in m["ua"]:
                    continue
                claimed += 1
                if not is_real_googlebot(m["ip"], ranges):
                    fake += 1
                    stats["fake Googlebot IPs"][m["ip"]] += 1
                    continue

                url = urlsplit(m["url"])
                status = int(m["status"])
                params = parse_qs(url.query, keep_blank_values=True)
                group = group_of(url.path, status, expired)

                stats["group"][group] += 1
                stats["folder"][folder_of(url.path)] += 1
                stats["status code"][status] += 1
                stats["file type"][file_type(url.path)] += 1
                stats["day"][m["day"]] += 1
                if params:   # which parameter combinations eat the crawl
                    stats["parameter sets"][folder_of(url.path) + "?" + "&".join(sorted(params))] += 1
                if group == "search (parameters)":
                    stats["search page depth"][page_depth(params)] += 1
                if m["rt"]:
                    times[group].append(float(m["rt"]))

    real = claimed - fake
    print(f"Hits with a Googlebot user agent: {claimed:,}")
    print(f"Verified real Googlebot:          {real:,} ({real / max(claimed, 1):.1%})")
    print(f"Fake Googlebot (ignored):         {fake:,}")
    if claimed and real / claimed < 0.05:
        print("! Almost nothing verified: the log probably holds Cloudflare IPs. Set up real_ip first.")
    if not real:
        return

    key = sum(stats["group"][g] for g in KEY_GROUPS)
    waste = sum(stats["group"][g] for g in WASTE_GROUPS)
    print(f"\nKEY PAGES {key / real:.1%} | LOW-VALUE {waste / real:.1%} | "
          f"STATIC {stats['group']['static js/css'] / real:.1%}")
    if not expired:
        print("(No --expired file: expired ads are counted as 'listing live'.)")

    for dim in ("group", "folder", "status code", "file type", "parameter sets", "search page depth"):
        show(dim, stats[dim], real)
    show("fake Googlebot IPs (top 10)", stats["fake Googlebot IPs"], max(fake, 1), 10)

    print("\n=== verified hits per day ===")
    for day, n in sorted(stats["day"].items(), key=lambda kv: datetime.strptime(kv[0], "%d/%b/%Y")):
        print(f"{day}  {n:,}")

    if times:
        print("\n=== response time by group (seconds) ===")
        for g, t in sorted(times.items(), key=lambda kv: -len(kv[1])):
            t.sort()
            print(f"{g:28} hits {len(t):>9,}   median {t[len(t) // 2]:.2f}   "
                  f"p95 {t[min(len(t) - 1, int(len(t) * 0.95))]:.2f}")
    else:
        print("\n(No $request_time in the log yet - add it to log_format.)")


if __name__ == "__main__":
    main()

Quick shell checks

# Who claims to be Googlebot? If the top IPs look like 172.64-172.71.x, 162.158.x,
# 104.16-104.27.x or 141.101.x, they are Cloudflare IPs: fix real_ip before trusting anything.
zcat -f /var/log/nginx/access.log* | grep -F 'Googlebot' | awk '{print $1}' | sort | uniq -c | sort -rn | head

# Check one IP by hand: the name must end in googlebot.com or google.com,
# and the second lookup must return the same IP.
host 66.249.66.1
host crawl-66-249-66-1.googlebot.com

2. Waste table

Where Googlebot's crawl goes now (from your 30-day log summary):

GroupsShare of hitsAbout this many requests a day*
Key pageslive listings (31%) + dealer pages (5%)36%~34,200
Needed, but can be movedstatic JS/CSS8%~7,600
Low-value (waste)search parameters, expired ads, compare, 404, 30156%~53,200

*Requests a day = 95,000 × the log share. This assumes your log shares match Crawl Stats (guess, because the hits are not verified yet).

Waste sources, largest first:

Source% of Googlebot hitsExample URLFixDifficulty
Search parameter pages (filters, sort, deep pagination)28% (~26,600/day)/search/?make=toyota&model=corolla&page=37Build clean /used-cars/make/model/ pages for valuable combinations, 301 the old make/model URLs to them, then Disallow: /search/Medium–Hard
Expired ads returning 200 (soft 404)14% (~13,300/day)/listing/482911-toyota-corolla-2018/ showing "This ad has expired"Return 410 with a "similar cars" block; remove the ad from sitemaps and internal linksEasy–Medium
Compare tool9% (~8,550/day)/compare/?ids=482911,503377,511020Disallow: /compare; make "Compare" a button instead of a linkEasy
Static JS/CSS8% (~7,600/day)/static/js/app.js?v=1764400000 (guess)Move to static.example.net with fingerprinted file names, a 1-year cache and fewer files. Never block it in robots.txtMedium
404 errors3% (~2,850/day)/listing/310455-honda-civic-2014/ (deleted ad still linked somewhere, guess)Remove internal links to them; removed ads get a 410Easy
301 redirects (http→https, trailing slash)2% in logs, 4% in Crawl Stats (~1,900–3,800/day)http://www.example.net/dealer/city-motors → https://www.example.net/dealer/city-motors/Link to final URLs everywhere; one-hop redirectsEasy
5xx errors (from Crawl Stats)1% (~950/day)heavy search URLs timing out (guess)Fix slow queries, PHP-FPM workers and cachingMedium
Slow responses (multiply every other problem)affects 100%average 1,250 msDatabase indexes, faster pagination queries, HTML cachingMedium–Hard

What this means for you:

  • Google crawls junk about 1.5× more than your money pages (56% vs. 36%).
  • Why price changes take a week. About 29,450 listing hits a day spread over about 150,000 live ads (guess) means each ad is re-crawled roughly every 5 days on average. That alone explains your 4–6 day delay and the 1+ week price updates.
    • If most of the 56% waste moved to listings, each ad could be crawled every 2 days or so.
    • That is the best case: Google doesn't move freed crawl over 1:1.
  • Your new ads are stuck in a queue. Discovery is 19%, about 18,000 "new URL" crawls a day, but you create only about 3,500 new ads a day (guess). So Google finds about 5× more "new" URLs than you create ads. Most of them must be new search and compare combinations (inference: confirm it with the script's "parameter sets" output and with Crawl Stats → Discovery examples).
  • Your HTML pages are probably slower than 1,250 ms. Fast CSS/JS hits pull the average down. Google lowers its crawl rate on slow hosts, so the slowness and the waste multiply each other.
  • Crawl Stats shows 4% redirects but your logs show 2%. The missing ~2% are probably Cloudflare's own "Always Use HTTPS" redirects, which never reach Nginx (guess).
  • None of these shares are verified yet. If many fake Googlebots hit /search/, the real shares will shift. Fixes 1 and 2 below are safe either way; re-run the script before Phase 2 of Fix 5.

3. Ranked fix plan

RankFixWhat it hitsSizeDifficultyWhen
0Fix the logs and verify GooglebotAll analysis—EasyDays 1–3
1Expired ads → 410Soft 404s14%Easy–MediumWeek 1
2Block /compareCompare9%EasyWeek 1
3Sitemaps with true lastmod + newest-first linksThe 4–6 day new-ad delay—Easy–MediumWeeks 1–2
4Server and database speedEvery request (1,250 ms, 1% 5xx)100%Medium–HardStart week 1, finish by week 8
5Search pages → clean category pages, then block /search/Search parameters28%Medium–HardWeeks 2–8
6404 links and redirect chains404 + 3015%EasyWeeks 2–3
7Static files → static.example.netStatic JS/CSS8%MediumWeeks 4–6
8Mobile vs. desktop link checkHidden linksunknownEasyWeek 2

Why this order:

  • Fixes 1 and 2 remove 23% of the crawl waste with very little code.
  • Fix 3 attacks your actual pain (slow new ads) directly.
  • Fix 4 is the only fix that makes the total budget bigger; the others only move it to better pages.
  • Fix 5 is the biggest waste source, but it goes later and in phases so you don't lose traffic from search pages that already rank.

Your robots.txt

# https://www.example.net/robots.txt
User-agent: *

# Fix 2 (now): compare tool = endless ID combinations, no search value.
# (Also blocks any URL starting with /compare - make sure no content pages start that way.)
Disallow: /compare

# Fix 5, phase 1 (week 2, after the sitemaps are live): stop deep pagination and sort orders.
# Use your real parameter names from the script's "parameter sets" output.
Disallow: /search/*page=
Disallow: /search/*sort=

# Fix 5, phase 2 (after clean category pages have been live ~4 weeks):
# replace the two lines above with:
# Disallow: /search/

# Never block /static/ - Google needs CSS and JS to render your pages.

Sitemap: https://www.example.net/sitemap-index.xml

Google can cache robots.txt for up to 24 hours, so changes take about a day to work. Link page 1 of each search without page=, so phase 1 doesn't block it.

Fix 1: expired ads return 410, not 200 (14%)

  • The problem: about 13,300 hits a day go to pages that say "This ad has expired" but return 200. Google treats them as live pages and keeps refreshing them. With ~6,000 changes a day, new expired ads keep refilling this pool.
  • Do this:
    • Return 410 Gone when an ad is expired, sold or deleted. A 404 works too; Google treats the two almost the same.
    • Keep the page useful for people: "This car is sold", 8–12 similar live cars, and a link to the make/model page.
    • Remove the ad within the hour from sitemaps, dealer pages, search results and "similar cars" blocks.
    • If you cache HTML at Cloudflare (Fix 4), purge the ad's URL when it expires.
  • Don't:
    • Don't 301 every expired ad to a category page or the homepage. Google often treats mass redirects like that as soft 404s anyway. (If a seller re-lists the same car under a new ID, a 301 from the old ad to the new one is fine.)
    • Don't block expired ads in robots.txt. Google would never see that they are gone.
// In the listing controller, before rendering the ad
if (in_array($ad['status'], ['expired', 'sold', 'deleted'], true)) {
    http_response_code(410);                                         // "Gone": no longer a soft 404
    $similar = findSimilarAds($ad['make_id'], $ad['model_id'], 12);  // live ads only
    render('ad_gone', ['ad' => $ad, 'similar' => $similar]);         // still useful for humans
    exit;
}
  • What to expect: Google re-checks a 410 URL a few times, then less and less. Expired-ad hits should fall from 14% to a few percent within 1–2 months (guess). Your "% 200" in Crawl Stats will dip at first. That is expected and fine.

Fix 2: block the compare tool (9%)

  • ?ids= lets anyone combine any 2–4 of your ~150,000 ads, so the number of possible URLs is endless. This is pure discovery waste.
  • Add Disallow: /compare (in the robots.txt above).
  • Change the "Compare" link from <a href="/compare/?ids=..."> to a <button> that builds the URL with JavaScript on click, so Googlebot finds no links to follow.

Fix 3: get new ads and price changes found fast (the 4–6 day delay)

  • Sitemap index (sitemap-index.xml, listed in robots.txt and submitted in Search Console) pointing to:
    • sitemap-new.xml: ads created or changed in the last 48 hours, rebuilt every 15 minutes.
    • sitemap-listings-1.xml, -2.xml and so on: all live ads, split by ID range, at most 50,000 URLs per file.
    • sitemap-categories.xml and sitemap-dealers.xml.
  • Make lastmod truthful. Update it only when something a buyer cares about changes: price, photos, mileage, text or status. Never update it for view counts. Google uses lastmod only if it is consistently accurate. It ignores priority and changefreq.
<url>
  <loc>https://www.example.net/listing/482911-toyota-corolla-2018/</loc>
  <lastmod>2026-11-29T08:14:00+00:00</lastmod>
</url>
  • Newest-first links: the homepage, make/model pages and dealer pages should list the newest ads first, with plain <a href> links. New ads then land on the pages Google crawls most often. Your dealer pages (5%) are good discovery hubs, so keep them crawlable.
  • Put the price in the server-rendered HTML, not loaded by JavaScript, and in schema.org/Car structured data with an Offer price. Then one crawl is enough to pick up a price change.
  • Don't use Google's Indexing API. It officially supports only job postings and livestream videos.

Fix 4: server and database speed (affects every request)

Google sets how hard it crawls you partly from how fast and healthy your server is. At 1,250 ms it keeps its crawl rate low. This is the only fix that makes the total budget bigger. Target: under 500 ms average in Crawl Stats.

  1. Measure. Add $request_time (step 1). The script then shows which page types are slow. Turn on the MySQL slow query log and rank the queries with pt-query-digest:

    # my.cnf
    slow_query_log = 1
    long_query_time = 0.3
    log_queries_not_using_indexes = 1
    
  2. Add indexes that match your search filters (schema is a guess):

    ALTER TABLE listings ADD INDEX idx_live_make_model (status, make_id, model_id, created_at);
    
  3. Make deep pagination cheap. Googlebot hits page=37 and similar pages a lot, and big OFFSETs are slow. Find the IDs first using the index, then fetch only those rows:

    -- Slow: MySQL reads full rows and throws 720 of them away
    SELECT * FROM listings WHERE status='live' AND make_id=12 AND model_id=88
    ORDER BY created_at DESC LIMIT 20 OFFSET 720;
    
    -- Faster "deferred join": the index finds the 20 IDs, then only those rows are read
    SELECT l.* FROM listings l
    JOIN (SELECT id FROM listings WHERE status='live' AND make_id=12 AND model_id=88
          ORDER BY created_at DESC LIMIT 20 OFFSET 720) t ON t.id = l.id
    ORDER BY l.created_at DESC;
    
  4. Cache.

    • Keep result counts and filter menus in Redis, refreshed every few minutes, instead of running COUNT(*) on every page.
    • Cache full HTML of listing and category pages for logged-out visitors. Use a Cloudflare Cache Rule (edge TTL about 10 minutes, bypassed when a session cookie is present).
    • When an ad's price changes or the ad expires, call Cloudflare's purge-by-URL API for that ad. That works on all plans.
  5. PHP:

    • Turn on OPcache.
    • Give PHP-FPM enough workers (pm.max_children) that requests don't queue.
    • Find out whether your 1% 5xx are Nginx 502/504 errors (PHP-FPM is overloaded or timing out) or Cloudflare 52x errors (origin timeouts).
    • In Cloudflare Security Events, check that Googlebot is never challenged.

Fix 5: search parameter pages (28%), done in phases

Don't use noindex or canonical tags as the main fix here. Google still has to crawl a page to see them, so they save little crawl. Only robots.txt stops the crawling. Search Console's old URL Parameters tool was retired in 2022, so this has to be fixed on your site.

  1. Find what has value. In Search Console → Performance → Pages, filter on /search/ and list the URLs with clicks. Then look at the script's "parameter sets" and "search page depth" output to see what Google actually crawls.
  2. Build clean category pages:
    • URLs like /used-cars/toyota/ and /used-cars/toyota/corolla/. Add city pages only where you have enough live ads.
    • Each page: its own title and H1, newest ads first, plain <a href="?page=2"> pagination, a self-canonical tag, and a place in sitemap-categories.xml.
    • Lowercase only, one trailing-slash style, and a 301 from uppercase variants.
    • Think about capping pagination at about 50 pages (guess). Older ads are still found through sitemaps and dealer pages.
  3. 301 the old make/model URLs (for example /search/?make=toyota&model=corolla with no other parameters) to the matching clean page, so their links and rankings move over.
  4. Switch internal links (menus, breadcrumbs, "more Toyota Corolla" links on ads, footer) to the clean URLs. Filters like price, year, mileage, fuel and sort stay on /search/ for users.
  5. Block in two steps:
    • Phase 1 (week 2): block page= and sort=.
    • Phase 2: block all of /search/. Wait until Google has followed the 301s for about 4 weeks; you'll see hits on the old make/model URLs fall in your logs. Blocking earlier would hide the redirects from Google.

Fix 6: 404s and redirect chains (5%)

  • 404 (3%):

    • Crawl your site with Screaming Frog or a similar tool to find internal links that point to 404s. Likely sources (guess): deleted ads still linked from dealer pages, "similar cars" blocks or old sitemaps.
    • Remove those links.
    • Don't redirect random 404s to the homepage.
  • 301 (2% in logs, 4% in Crawl Stats):

    • Pick one URL style: https://www.example.net/... with a trailing slash (or without, but match your canonical tags).
    • Make every link come from one PHP URL helper, and use the same style in sitemaps, canonical tags, structured data and Open Graph tags.
  • Test for chains. You want one 301 and then a 200:

    curl -sIL http://example.net/dealer/city-motors | grep -iE '^(HTTP|location)'
    

    If you see 2–3 hops (for example Cloudflare does http→https, then Nginx adds the slash), make one rule that goes straight to the final URL:

    # In the HTTPS server block: add the trailing slash AND set the final host in ONE hop.
    # Skips files (.css/.js). Exclude API/POST routes if you have any.
    if ($uri ~ ^(/[^.]*[^/])$) {
        return 301 https://www.example.net$1/$is_args$args;
    }
    

Fix 7: move static files to their own hostname (8%)

  • Crawl budget is counted per hostname. Serve /static/ from static.example.net (a proxied CNAME in Cloudflare).

  • Use fingerprinted file names like app.3f9a1c.js with Cache-Control: public, max-age=31536000, immutable. Google and Cloudflare then reuse their cached copy, and a new file name appears only when the code changes. Remove ?v= cache-busting query strings if you use them (guess: check static in the script's "parameter sets").

  • Bundle files so each page needs fewer JS/CSS files.

    location ^~ /static/ {
        add_header Cache-Control "public, max-age=31536000, immutable";
        add_header Access-Control-Allow-Origin "https://www.example.net";   # needed for web fonts
    }
    
  • Don't block anything in static.example.net/robots.txt. It is a separate host, and blocking there would break rendering.

  • Keep the old /static/ paths working for a few weeks.

  • Your data shows no image hits, so car photos are probably already on another hostname (guess). If they aren't, move them too.

Fix 8: mobile vs. desktop links (check)

  • Google crawls as a smartphone. If mobile pages show fewer links (a "Load more" button instead of page links, or hidden "similar cars" and dealer links), Google can miss new ads.

  • Check it:

    • In Search Console, use URL Inspection → View crawled page on a make/model page and on an ad, and count the /listing/ links.
    • Or compare mobile and desktop yourself; the two numbers should match:
    for ua in "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) Mobile" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"; do
      curl -s -A "$ua" "https://www.example.net/search/?make=toyota" | grep -o 'href="[^"]*/listing/[^"]*"' | sort -u | wc -l
    done
    
  • Any "Load more" button must also have a real <a href="?page=2"> link behind it.


4. KPI targets and monthly checklist

KPI targets

These targets are my estimates for a site like yours.

KPINowAfter 1 monthAfter 3 monthsWhere to check
Share of verified Googlebot hits on key pages (live ads + dealer + clean category pages)36%≥ 50%≥ 70%Script "KEY PAGES" line
Low-value share (search params + expired 200 + compare + 404 + 301)56%≤ 35%≤ 15%Script "LOW-VALUE" line
Expired ads answered with 20014%0% (all 410)0%Script with --expired
Average response time1,250 ms< 800 ms< 500 ms (stretch: < 300 ms)Crawl Stats + script median/p95
% 200 OK88%May dip to ~80–85% (expected: new 410s)≥ 88%, now all real content. 5–10% 410s is normal for classifieds (guess)Crawl Stats → By response
5xx1%< 0.5%< 0.1%Crawl Stats
3014%< 2%< 1%Crawl Stats
Discovery vs. refresh19% / 81%Don't chase the ratio. ≥ 70% of discovery examples should be /listing/ URLs≥ 80% /listing/Crawl Stats → By purpose → Discovery examples
Time from ad going live to first Googlebot crawlUnknown (4–6 days to appear)Median < 48 hMedian < 24 h; in Google < 48 hLogs + DB
Price change picked up by Google> 1 week< 4 days< 48 hSampled ads

Total requests per day will probably fall after Fix 2 and Fix 5, because the waste is leaving. That's good. Watch listing hits per day rising instead, and make sure the total never drops together with a rise in 5xx errors.

Monthly checklist (first week of each month, about 2 hours)

  • Run the script on the last 30 days with a fresh --expired export. Save the output as crawl-YYYY-MM.txt and compare it with last month: key pages share, low-value share, and response time per group.
  • Fake Googlebots: if they are heavy and hit slow pages, block unverified "Googlebot" user agents at Cloudflare with a WAF rule (user agent contains "Googlebot" and the request is not a known/verified bot).
  • New traps: check "parameter sets" and "other" for any new pattern above 1%, such as a new sort parameter or a new tool URL. Add a robots.txt rule or fix the links.
  • Crawl Stats:
    • total requests, average response time, by response, by file type, by purpose
    • Discovery examples should be ads
    • host status (robots.txt, DNS, server connection) should be all green
  • Page indexing report:
    • "Soft 404" and "Discovered – currently not indexed" should be falling
    • "Blocked by robots.txt" should show only /search/ and /compare URLs
  • Sitemaps report: sitemap-new.xml read recently with no errors. Spot-check lastmod on 10 ads against the database.
  • Time to crawl:
    • Take 20 ads created last month and compare their first Googlebot hit with created_at.
    • Take 10 price changes and find the first crawl after each change.
    • Example: zgrep -h '/listing/482911' /var/log/nginx/access.log* | grep -F Googlebot | head -1
  • Site crawl (Screaming Frog or similar): no internal links to 301, 404 or 410 URLs, and no /compare or old /search/ links left in templates.
  • MySQL slow log: list the top 5 queries by total time (pt-query-digest) and fix the worst one.
  • Cloudflare:
    • cache hit rate for static.example.net and for cached HTML
    • any 52x errors
    • no Googlebot challenges in Security Events
  • Mobile vs. desktop link count on 3 templates: home, make/model page and an ad.

The prompt

First lines open so you can see how it is built. The rest opens after purchase.

the prompt · 573 words7 sections
#ROLE
You are a technical SEO expert in log file analysis and crawl budget. Find where Googlebot wastes crawling on my site and tell me how to fix it.

#INPUTS
Fill in every line. Leave a line blank if you don't know it.
- Website: [WEBSITE URL]
- Site size: [e.g., 150,000 URLs, 5,000 new or changed per day]
- Platform, server and CDN: [e.g., Magento on Nginx behind Cloudflare]
Full prompt opens after purchase
Sections inside: #ROLE #INPUTS #FACTS #PROCESS #OUTPUT FORMAT #RULES #QUALITY CHECK

How to use it

  1. Buy, then open it in your account.
  2. Copy the prompt into ChatGPT, Claude or Gemini.
  3. Replace the 7 inputs with your product.
  4. Run it. Use the output. Re-run with a different tone if you like.

Pro tips

  • Verify Googlebot with reverse DNS before you trust your numbers. Fake Googlebots can be a big share of 'Googlebot' traffic.
  • Fix response time early. A slow server or database cuts crawling across the whole site.
  • Run the script it gives you every month and track the share of crawling that goes to your key pages.

Before you buy

Will it work for my product?
Yes, if you can fill the 7 inputs. If the output is bad with your inputs, email us: we fix the prompt and refund you.
Do I download a file?
No. It lives in your account with a copy button, and updates when we improve it.
Which model is best?
Best on Claude. Works in ChatGPT, Claude and Gemini.

Works well with this

Prompts people use in the same campaign.

More in Crawling & Indexing

See all in this sub-category

Buying more than two? Lifetime is cheaper.

Every prompt, every category, forever. $59 once. Nothing to download, nothing to renew.

Get lifetime · $59

This prompt

$3$7

  • ✓ Instant access in your account, with a copy button
  • ✓ Example input and real output included
  • ✓ 7-day money-back, no form

Or get every prompt, forever

Lifetime Access · $59 $149 — all categories, all future prompts, rewrites included.

Get lifetime access

Card or PayPal · taxes at checkout · nothing to download

Not the one you need?

Browse every prompt by category and sub-category.

Browse all prompts
Lifetime $59 →