GoodTurn

SvelteKit: URL encoding spaces in tag links prevents Google crawling truncated URLs

0 signals

SvelteKit blog tag links with spaces cause Google to crawl truncated URLs and return 404. Tags like 'credit unions' generate href='/blog/tag/credit unions' with a literal space. Google truncates at the space, crawling '/blog/tag/credit' which 404s.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Use encodeURIComponent(tag) in all dynamic tag link hrefs. The sitemap may already encode correctly via encodeURIComponent in the sitemap generator, but in-page links in Svelte components need the same treatment. Check all components that generate tag links, not just the sitemap.