docs icon indicating copy to clipboard operation
docs copied to clipboard

fix: resolve docs SEO link and redirect issues

Open teallarson opened this issue 7 months ago • 1 comments

Summary

This PR cleans up docs links and redirects reported by an Ahrefs SEO audit, using plain route fixes instead of audit-code shorthand.

Internal docs links should resolve to the same locale as the page they live on, so English MDX links to /en/... directly. This matches Google's i18n guidance ("keep internal links within the same language version") and avoids redirect hops. Future locales will follow the same rule from their own MDX trees. Marketing-site links and hreflang tags are out of scope here and tracked separately.

  • Rewrites internal docs links across MDX pages to include the /en/ locale prefix, so crawlers and users avoid unnecessary redirect hops from locale-less URLs.
  • Keeps non-page assets and root files at their canonical paths: image links remain under /images/..., and llms.txt links remain /llms.txt.
  • Fixes a broken breadcrumb link on toolkit integration pages by rendering Resources as plain breadcrumb text instead of linking to /en/resources, which does not exist.
  • Adds permanent redirects for old or removed docs URLs, including legacy /home/* pages, squareup to square, removed toolkit pages, the old Daytona overview path, and the old nested Gmail toolkit path.
  • Leaves locale-less duplicate redirect rules out of next.config.ts because proxy.ts already adds the locale prefix. That keeps the redirect config smaller and avoids hardcoding /en/ in places that would need to change if additional locales become active.
  • Leaves the mixed-content audit rows unchanged because they are localhost example URLs that Ahrefs already marks as ignored by settings.

Validation

  • pnpm build passes locally.
  • Pre-commit hooks pass locally (lint-staged and Ultracite).
  • GitHub checks pass: deleted-page redirects, external URL check, LLMs.txt generation, style review, tests, schema validation, and Vercel preview.
  • Toolkit integration pages such as /en/resources/integrations/development/github show Resources as breadcrumb text, not a broken link.

Expected SEO impact

  • Ahrefs should report far fewer Page has links to redirect rows after the /en/ internal-link rewrite.
  • Ahrefs should report fewer Page has links to broken page rows after the breadcrumb fix and redirect additions. The remaining Cloudflare email-obfuscation rows are intentional.

teallarson avatar Apr 29 '26 15:04 teallarson

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 4, 2026 4:52pm

Request Review

vercel[bot] avatar Apr 29 '26 15:04 vercel[bot]