Skip to content

fix(seo): filter unresolvable compare pairs out of search index#759

Merged
Flotapponnier merged 1 commit into
mainfrom
fix/search-index-skip-unresolved-compare
Jun 26, 2026
Merged

fix(seo): filter unresolvable compare pairs out of search index#759
Flotapponnier merged 1 commit into
mainfrom
fix/search-index-skip-unresolved-compare

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

Ahrefs flagged `/compare → /compare/jupiter-vs-raydium` as a dead internal link, even though PR #749 stopped /compare from rendering that pair. Cause: `buildSearchIndex` iterates `COMPARE_PAIRS` raw and embeds every pair in the search payload JSON. Ahrefs reads embedded JSON as crawlable links.

Fix

Same `getProvider()` probe as `compare/page.tsx` — skip pairs where either side is unresolved. The two surfaces now stay in lockstep.

PR #749 stopped /compare from rendering pairs where either provider
is unresolved (e.g. jupiter-vs-raydium), but the search index built
in buildSearchIndex iterated COMPARE_PAIRS directly. Ahrefs crawls
the embedded JSON and flagged /compare → /compare/jupiter-vs-raydium
as a dead internal link.

Same getProvider() probe as /compare/page.tsx, so the two surfaces
stay in lockstep.
@Flotapponnier
Flotapponnier merged commit 5a2e82c into main Jun 26, 2026
1 check passed
@Flotapponnier
Flotapponnier deleted the fix/search-index-skip-unresolved-compare branch July 17, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant