Discussion
  • Indexing
  • Technical SEO

Google now documents a 2MB fetch limit for HTML. Has anyone found real pages, like mega menus or inline JSON state, pushing canonicals or copy past the cut-off?

Published 1 reply

Discussion starter: a technical SEO question, posted with an answer from Niraj Raut to open the thread. If you have dealt with this on a site, reply with what you saw, especially where it differs.

Disclosure: Niraj Raut, who posted this answer, runs the SEO consultancy linked at the end of it.

1 reply

  • admin
    Admin
    Original poster

    The short answer is that verified, public cases of a canonical being pushed past Google’s 2MB cut-off are close to non-existent, and the available data says HTML documents over 2MB sit in the extreme tail of the web. The page types you mention are, however, exactly where the real offenders live: server-rendered JavaScript frameworks carrying bloated inline state, mega menus rendered twice, and templates stuffed with base64 assets. On those pages the element at risk is usually not the canonical, which sits near the top of the <head>, but whatever comes last in the byte stream: footer links, late structured data, and the inline state itself.

    So the decision depends less on how heavy a page feels in Lighthouse and more on two measurements: the decompressed size of each template, and the byte offset at which your important elements appear.

    What Google has actually documented

    Google’s March 2026 post on how Googlebot fetches content states that Googlebot fetches up to 2MB of an individual URL (PDFs excepted, at 64MB), that the HTTP headers count towards that figure, and that anything past the cut-off is ignored: not fetched, not rendered and not indexed. The fetch is not rejected. Google stops at the limit and passes the part it downloaded on for indexing. CSS and JavaScript files referenced by the page are fetched separately, each with its own limit, and other Google crawlers default to 15MB.

    Two details matter for diagnosis. First, the updated documentation says the limit is applied to the uncompressed data, so a page that transfers as 300KB gzipped can still be well over 2MB. Second, Google’s own advice in that post is to keep meta tags, the title, link elements, canonicals and essential structured data high in the document and to move heavy CSS and JavaScript into external files. That advice only makes sense if byte order, not total weight, is what decides the outcome.

    On how often this bites, the best evidence is size data rather than case studies. Analyses of HTTP Archive data from Search Engine Journal and Tame the Bots put typical HTML documents at a small fraction of 2MB, with multi-megabyte documents appearing only at the far end of the distribution. When the limits were documented, John Mueller said “None of these recently changed, we just wanted to document them in more detail”. He also pointed people to Tame the Bots’ fetch-and-render tool, which can truncate text resources at 2MB to show what would be lost.

    Evidence gap:

    I have not found a published, verifiable example of a canonical lost to this cut-off. That is partly because it is rare and partly because it is hard to see: Search Console has no “truncated” status, so a lost footer or a missing JSON-LD block would surface as a vague symptom rather than a labelled error. Absence of reports is weak evidence either way.

    Why byte order matters more than page weight

    Think of it as a courier who will carry only the first 2MB of your parcel and leave the rest on the doorstep. The total weight tells you whether anything gets left behind. The packing order tells you what gets left behind.

    Technically, the fetch stops at the byte limit and the truncated document goes forward as if it were complete. A browser-style HTML parser closes any elements left open, and rendering works from that shortened document. Any script, link or JSON-LD block that started after the cut simply does not exist for Google. If the cut lands inside an inline <script>, the parser treats the remainder as that script’s text, so the JSON it contains will not parse.

    A typical server-rendered page reaches Google in roughly this order:

    HTTP headers
    ↓
    <head>: title, meta robots, canonical, hreflang, sometimes JSON-LD, inline critical CSS
    ↓
    Site header and navigation (often desktop and mobile copies of the mega menu)
    ↓
    Main content, then related items, reviews and comments
    ↓
    Footer links
    ↓
    Inline framework state, analytics, and JSON-LD added late by plugins or tag managers

    Read against that order, the canonical is only at risk when the <head> itself is bloated before the canonical tag appears (large inline CSS, inline SVG sprites, base64 fonts, oversized JSON-LD), or when the canonical is injected by JavaScript that lives in the tail. Google already ignores a rel="canonical" link that appears outside the <head>, and its JavaScript SEO guidance prefers the canonical in the original HTML.

    Element Usual position What pushes it past 2MB Likely consequence
    Canonical, meta robots, title Early in <head> Megabytes of inline CSS, SVG or JSON placed before them Canonical hint lost; Google chooses from other signals
    Main copy After navigation A navigation block so large it consumes most of the budget Page indexed with little more than boilerplate
    Related links, footer, pagination Late in <body> Long server-rendered lists, reviews, comments Links not discovered from that page
    JSON-LD appended by plugins End of <body> Any large page Structured data missing for that URL
    Inline state (__NEXT_DATA__, Nuxt, Apollo) Last Oversized serialised props Server-rendered: content survives, hydration fails. Client-rendered: page may render empty

    Where I would look for real offenders first

    These are the patterns I would check before anything else. They are the mechanisms that can produce 2MB documents, not a list of documented incidents.

    • Next.js Pages Router with fat props. Next.js serialises page data as __NEXT_DATA__ JSON inlined in every HTML response and warns once it passes 128kB. Passing whole API responses or full product records is how that JSON grows into megabytes. That warning covers only the Pages Router, but App Router pages also inline a serialised component payload in script tags, so check them the same way.
    • Mega menus rendered twice. Many themes output one navigation tree for desktop and another for the mobile drawer, often with inline SVG icons on every item. On large retailers with thousands of category links, that can be hundreds of kilobytes before the first product.
    • Base64 images and fonts, and page builders that inline CSS per block.
    • “View all” templates. Category pages set to show every item, long forum threads, changelogs and glossaries rendered as one document. The template may be fine on average and explode on specific URLs, such as a product with thousands of reviews.
    • Non-Latin scripts. The limit is in bytes. In UTF-8, most CJK characters take three bytes, so a character count underestimates the real size.
    • Escaped data in attributes. JSON stored in data- attributes with HTML entities inflates quickly.

    Hypothetical example:

    A Next.js (Pages Router) category page lists 120 products. The rendered markup is about 450KB, including two copies of the mega menu. getServerSideProps returns full product objects with variant arrays and long descriptions, producing about 1.7MB of __NEXT_DATA__. The decompressed total is roughly 2.15MB. The canonical sits in the first few kilobytes and the product grid and footer finish before 450KB, so indexing of the visible content is fine. What gets cut is the tail of the state JSON, which breaks hydration in Google’s render, plus a Product and ItemList JSON-LD block a plugin appends after it. Now make the same site client-rendered, with the grid built from that state: the truncated JSON means Google may render an empty grid. Same byte count, very different consequence.

    How to check your own templates

    1. Measure decompressed bytes as Googlebot would receive them. For example, curl -sL --compressed -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/page -o page.html, then wc -c page.html. In Chrome DevTools, use the resource size, not the transferred size. Sending the Googlebot user agent matters if your stack serves bots different HTML.
    2. Find the byte offsets of what matters. grep -bo 'rel="canonical"' page.html returns the byte position of the canonical. Repeat for application/ld+json, a sentence from the main copy, and your last important footer link. I would treat anything beyond about 1.5MB as too close, because headers count towards the limit and I would not engineer to the exact boundary.
    3. Crawl at scale and sort by size. Confirm whether your crawler reports decompressed size or transferred bytes, then segment by template and look at the maximum per template, not the average.
    4. Simulate the cut. Run the largest URLs through Tame the Bots’ fetch-and-render tool with the 2MB truncation option and compare the rendered output with and without it.
    5. Check Google’s stored view. In URL Inspection, look at the crawled page HTML for the indexed version and confirm that content from the end of your source is present. I have not found documentation confirming that the live test applies exactly the same cut-off, so I would not treat a clean live test as proof.

    Fixes, in order of value

    Put the essentials first in the <head>: title, meta robots, canonical and hreflang before any large inline CSS or JSON, and move the JSON-LD you rely on into the <head> or early in the body. Then trim serialised state to the fields the page renders, which is also what the Next.js documentation recommends for performance. Replace base64 assets and per-block inline CSS with external files, and paginate lists server-side instead of rendering everything.

    Mega menus need more care. Loading the menu as a JavaScript fragment reduces the HTML, but it also removes those links from the initial HTML, which can weaken internal linking and discovery. On large catalogues the safer trade is usually one rendered menu (styled responsively rather than duplicated), fewer levels in the global navigation, and deeper categories reached through hub pages.

    Watch for this:

    Page speed tools typically report compressed transfer sizes. A template that looks lean in a performance report can still be close to the limit once decompressed, which is the number Google applies.

    What should decide how much effort this gets

    If your largest templates, measured decompressed at their worst-case URLs, sit under about 500KB, this is not where your time should go. If any template passes 1.5MB, rank the fix by that template’s organic value and by what sits in its tail: client-rendered content or structured data you depend on moves it up the queue, while a harmless analytics blob moves it down. The one check I would run on every site this week is the grep -bo test on the biggest URL of each template, because it turns a vague worry into a byte offset you can act on.

    Need help with this on your own site?

    Niraj Raut works with businesses in Nepal, Australia, the UK, Europe and the US on technical SEO, ecommerce SEO, local SEO and AI search.

    See SEO services

Add a reply

Replies are open to approved members. Log in or apply to join.