Canonical tag conflict silently erased English pages from Google Search index
Web developer Cody Wang discovered a critical SEO bug after launching a small audit tool built with SvelteKit and Next.js for international clients. Every English-language page on his site carried a canonical tag pointing to the Chinese-language URL, causing Google to treat all English content as duplicates of Chinese pages. The root cause was a head-builder function that constructed canonical URLs from the path alone, ignoring the language query parameter added later during development. Wang identified the issue by cross-referencing Google Search Console data, which showed that pages he had effectively told Google to ignore were receiving nearly all impressions and clicks. He resolved the problem by making each language version self-referencing in its canonical tag, updating the x-default hreflang target, and expanding the sitemap from 66 to 132 entries to include both language versions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in