Skip to content

fix: resolve docs SEO link and redirect issues#960

Draft
teallarson wants to merge 3 commits intomainfrom
claude/busy-wiles-61d98b
Draft

fix: resolve docs SEO link and redirect issues#960
teallarson wants to merge 3 commits intomainfrom
claude/busy-wiles-61d98b

Conversation

@teallarson
Copy link
Copy Markdown
Contributor

@teallarson teallarson commented Apr 29, 2026

Summary

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

  • 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.

- D-1: Add 163 locale-less sibling redirect rules to next.config.ts so
  locale-less inbound URLs (e.g. /home/auth/X) resolve in one hop instead
  of two (middleware locale-detection + path-restructure rule)
- D-2: Rewrite internal MDX links to include /en/ locale prefix across
  111 pages, eliminating 3,700+ redirect hits Ahrefs attributed to docs
- D-3: Fix 383 broken-link rows — remove clickable Resources breadcrumb
  in toolkit pages (href="/en/resources" was 404), add redirect rules for
  13 removed/renamed pages (squareup→square, home/*, toolkit pages)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

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

…prefix

The proxy.ts (renamed from middleware.ts in #752a7b54) already adds the
/en/ prefix for locale-less requests. The 163 sibling rules were
duplicating that work to save one hop on external inbound links.

Trade-off accepted: 47 redirect chains stay 2-hop (proxy + restructure),
but the diff shrinks by ~900 lines and the multi-locale story stays
honest (proxy can grow Accept-Language detection later without a
hardcoded /en/ destination in 163 places).

Also fix collateral damage: D-2's MDX bulk rewrite mangled image paths
(![alt](/images/foo) → ![alt](/en/images/foo)) — revert image-syntax
matches back to /images/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teallarson teallarson changed the title fix: resolve Ahrefs SEO audit issues (D-1 through D-3) fix: resolve docs SEO link and redirect issues May 4, 2026
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