Next.js deploymentId and Crawl Budget: 46% of Googlebot’s Requests to Our Site Were JavaScript
Googlebot spent 45.9% of its requests on our site fetching JavaScript. Our site has about 71 URLs in its sitemap. Much of that JavaScript was the same Next.js chunks, fetched again under a new ?dpl= deploy ID after each release.
This post shows the numbers from our own Search Console Crawl Stats export for aeoprobe.com, 2 Sep to 29 Nov 2026, how the deploy ID caused it, and the three changes that fix it. You can check your own site with the free Crawl Stats analyzer. It reads the export in your browser.
What the Crawl Stats export showed
Over those 89 days, Googlebot made 3,639 requests to aeoprobe.com and downloaded 43.86 MB.
| File type | Share | Requests |
|---|---|---|
| JavaScript | Share45.9% | Requests1,669 |
| Other file type (mostly fonts) | Share25.3% | Requests921 |
| HTML | Share10.9% | Requestsabout 395 |
| CSS | Share9.8% | Requests357 |
By purpose, 83.4% of requests were refresh (a URL Googlebot already knew) and 16.7% were discovery. By response, 1.29% (47 requests) were 404s.
JavaScript’s share grew over time. In November it was 57.8% of all requests, and on 13 Nov it reached 74.8%.
The JavaScript sample: same files, new URLs
The JavaScript drilldown in Crawl Stats exports a sample of the requests. Ours had 623 rows, and 616 of them were /_next/static/chunks/*.js files.
- 135 unique chunk paths were crawled as 406 distinct URLs, one per path and
?dpl=value. - Those URLs carried 35 different deploy IDs.
- 61 of the 135 paths (45.2%) were fetched under more than one deploy ID.
- 287 of the 406 URLs (70.7%) were extra copies of a path Googlebot had already fetched under another ID.
A chunk’s file name already holds a hash of its content. When the file changes, its name changes. A new ?dpl= value on an unchanged file gives Googlebot a new URL for the same bytes.
Why the deploy ID changed so often
We set NEXT_DEPLOYMENT_ID=$(git rev-parse HEAD) at build time, so every commit got a new ID. Many of our releases change only the backend. Of our 84 releases since 14 Oct, 31 (37%) did not touch the frontend, yet each one gave every chunk a new URL.
Next.js has a setting, supportsImmutableAssets, meant to avoid this. Next.js turns it off for output: 'standalone', the mode we deploy with, so the query stays on chunk URLs.
The fix: three changes
1. Derive the deploy ID from the frontend’s inputs
Keep deploymentId, which makes browsers and CDNs fetch fresh files after a release. Make it a hash of only what goes into the frontend build: the committed tree of its source, the shared contracts it reads and its public build variables. A backend-only release then keeps the same ID and the same chunk URLs. This is the hash our deploy script computes, run from the repository root on a clean checkout:
NEXT_DEPLOYMENT_ID=$(
printf '%s\n' \
"$(git rev-parse HEAD:services/frontend)" "$(git rev-parse HEAD:contracts)" \
"$TURNSTILE_SITE_KEY" "$NEXT_PUBLIC_CHATGPT_OAUTH_ISSUER" "$NEXT_PUBLIC_MCP_URL" \
"$UMAMI_ORIGIN" "$UMAMI_WEBSITE_ID" \
| sha256sum | cut -c1-40
)
# then: docker build --build-arg NEXT_DEPLOYMENT_ID="$NEXT_DEPLOYMENT_ID" …
# next.config.ts: deploymentId: process.env.NEXT_DEPLOYMENT_ID
Replace those paths and variables with your own repository’s frontend directories and every public value or build argument your next build receives: those change the built files without changing the source. The tree hashes cover committed files only, so with uncommitted changes fall back to a per-build ID such as the commit hash.
2. Send X-Robots-Tag: noindex on build files
Chunks are not pages, and they should not appear in search results. Send X-Robots-Tag: noindex on /_next/static/, on 404 responses too, so old chunk URLs that no longer exist carry it as well. Keep those paths allowed in robots.txt, because Googlebot needs the files to render your pages. In nginx, always adds the header to error responses:
location /_next/static/ {
add_header X-Robots-Tag "noindex" always;
# keep your existing proxy and cache settings here
}
3. Serve /favicon.ico as a static file
Put a real multi-size favicon.ico (16×16 and 32×32) in the site root so /favicon.ico returns HTTP 200 as a plain file.
What this post does not show
- The numbers above are from before the change. This post does not show results after it.
- The JavaScript sample is a sample, not every request. It shows the pattern, not exact totals.
- Search Console offers Crawl Stats only in its interface and export, not through its API, so tracking it means exporting it again.
- Fewer wasted requests do not promise better rankings or AI citations.
Check your own site
- Export Crawl Stats from Search Console (Settings → Crawl stats → Open report → Export), and the JavaScript drilldown from By file type → JavaScript.
- Drop both ZIPs into the Crawl Stats analyzer. It shows your file-type split, JavaScript share by month and the chunks fetched under more than one deploy ID, and writes a fix brief you can paste into your coding agent.
- Run the free audit to check your static files for deploy queries, cache headers and noindex.
For more on Next.js, see AEO for Next.js. To have your coding agent read the evidence and make the change, see coding agents.
Questions
Does Next.js add ?dpl= to every static chunk?
When deploymentId is set, Next.js adds it to static asset URLs (JavaScript, CSS, images) as a ?dpl= query, so browsers and CDNs fetch fresh files after a release. If the ID changes on every release, every chunk URL changes with it, even when the file itself did not.
Should I turn off deploymentId?
Not necessarily. It makes browsers and CDNs fetch fresh files after a release. Keep it, and derive it from a hash of the frontend build inputs, so releases that do not touch the frontend keep the same ID.
Can I get Crawl Stats through the Search Console API?
No. Crawl Stats is in the Search Console interface only, as a report and its export. That is why our analyzer reads the export file.
Will this fix improve rankings or AI citations?
We cannot promise that, and this post makes no such claim. The fix stops Googlebot from fetching files that did not change. How Google spends the requests that frees up is up to Google.
Related posts
AEO Audit Checklist: 15 Technical Checks for Any Public Site
Fifteen technical checks for crawler access, indexing, rendering, canonicals and sitemaps. Then how to measure the result.
Read morerobots.txt for AI Search: OAI‑SearchBot, Claude, and Perplexity
AI search, user-fetch and training crawlers are separate robots.txt choices. Set each one for OpenAI, Anthropic, Perplexity and Google.
Read moreWhat Is Answer Engine Optimization (AEO)? The Complete Guide for 2026
AEO is the technical groundwork that lets search and AI answer products reach, index, and understand your website.
Read moreCheck what AI crawlers can actually reach
Run a free audit to find public crawler, indexing, markup, and page-structure issues.
Run free audit