Repository navigation
/favicon.ico answered 404, the one path every crawler tries - #2787
Merged
Merged
Conversation
The noindex on /icon was the cause of Google's globe and is fixed (#2771). This is the gap that survived it: /favicon.ico, the conventional location every crawler and tool probes directly, returned 404. The rel="icon" link is what Google documents as sufficient, so this is unlikely to be what finally flips the listing, but a 404 on that path is strictly worse than a file, and it is the single most-requested URL on any site. A real multi-size ICO: 16, 32, 48 and 64 px, each a PNG payload, on the same #f8f3eb background as icon.tsx with 10 % padding so the mark is not flush to the edge at 16 px. Two things cost an attempt each and are written into the generator so they cost nobody else one: Next's ICO decoder rejects non-RGBA payloads. flatten() produces RGB, so the first build died on "Format error decoding Ico: The PNG is not in RGBA format!". ensureAlpha() after flatten() is required, and the script asserts four channels per size rather than trusting it. The file is binary and nobody would remember how it was made, so scripts/build-favicon.mjs regenerates it from public/logo.png and explains both constraints. What this does NOT change: the existing <link rel="icon" href="/icon"> stays exactly as it is. Google wants a stable favicon URL and that one has already been reset once this morning when icon.tsx was edited; it is not being touched again.
Flotapponnier
added a commit
that referenced
this pull request
Oct 2, 2026
…2788) The noindex on /icon was the cause of Google's globe and is fixed (#2771). This is the gap that survived it: /favicon.ico, the conventional location every crawler and tool probes directly, returned 404. The rel="icon" link is what Google documents as sufficient, so this is unlikely to be what finally flips the listing, but a 404 on that path is strictly worse than a file, and it is the single most-requested URL on any site. A real multi-size ICO: 16, 32, 48 and 64 px, each a PNG payload, on the same #f8f3eb background as icon.tsx with 10 % padding so the mark is not flush to the edge at 16 px. Two things cost an attempt each and are written into the generator so they cost nobody else one: Next's ICO decoder rejects non-RGBA payloads. flatten() produces RGB, so the first build died on "Format error decoding Ico: The PNG is not in RGBA format!". ensureAlpha() after flatten() is required, and the script asserts four channels per size rather than trusting it. The file is binary and nobody would remember how it was made, so scripts/build-favicon.mjs regenerates it from public/logo.png and explains both constraints. What this does NOT change: the existing <link rel="icon" href="/icon"> stays exactly as it is. Google wants a stable favicon URL and that one has already been reset once this morning when icon.tsx was edited; it is not being touched again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope, honestly
The
noindexon/iconwas the cause of Google's globe and is fixed in #2771. This is not expected to be what flips the listing — Google documents therel="icon"link as sufficient, and we have it. But/favicon.icoreturned 404, and that is the single most-requested URL on any website. A file there is strictly better than a 404.What ships
A real multi-size ICO: 16, 32, 48 and 64 px, each a PNG payload, on the same
#f8f3ebbackground asicon.tsx, with 10 % padding so the mark is not flush to the edge at 16 px.Verified structurally before building: header
type=1, four entries, each payload a valid PNG whose dimensions match its declared size.Two things that cost an attempt each
Next's ICO decoder rejects non-RGBA payloads.
flatten()produces RGB, so the first build died onFormat error decoding Ico: The PNG is not in RGBA format!.ensureAlpha()afterflatten()is required. The generator now asserts four channels per size rather than trusting it.The file is binary and nobody would remember how it was made, so
scripts/build-favicon.mjsregenerates it frompublic/logo.pngand documents both constraints.What this does not change
The existing
<link rel="icon" href="/icon?…">is untouched. Google wants a stable favicon URL, and that one was already reset once this morning whenicon.tsxwas edited for the noindex fix. It is not being churned again.Next now emits both links;
/favicon.icoanswers 200image/x-iconwith exactly the generated bytes (confirmed from the build output's route meta).444 tests, 235 specs,
tscclean.