Skip to content

fix: resolve Ahrefs SEO audit issues (D-1 through D-3)#960

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

fix: resolve Ahrefs SEO audit issues (D-1 through D-3)#960
teallarson wants to merge 2 commits intomainfrom
claude/busy-wiles-61d98b

Conversation

@teallarson
Copy link
Copy Markdown
Contributor

@teallarson teallarson commented Apr 29, 2026

Summary

  • D-2: Rewrote internal links across 111 MDX pages to include the /en/ locale prefix, eliminating ~3,700 redirect hits Ahrefs tracks against docs (image paths preserved — they don't take a locale prefix)
  • D-3: Fixed 383 broken-link rows — removed the clickable "Resources" breadcrumb on toolkit pages (was linking to href="/en/resources" which 404s), and added 13 redirect rules in next.config.ts for removed/renamed pages (squareup→square, old home/* paths, removed toolkits, old daytona/gmail paths)
  • D-1 deferred: The original D-1 added 163 locale-less sibling redirect rules to single-hop the path-restructure chains. Dropped here because (a) proxy.ts already adds /en/ for locale-less requests, and (b) hardcoding /en/ as the destination in 163 places would break if other locales ever ship. Trade-off: 47 redirect chains stay 2-hop (proxy + restructure), but the diff stays small and the multi-locale story stays honest.
  • D-4: No action needed — all 34 mixed-content rows are localhost dev example URLs already marked "Ignored by settings" in Ahrefs.

Test plan

  • pnpm build passes (verified locally)
  • Pre-commit hooks pass (lint-staged + ultracite ran clean)
  • Toolkit integration pages (e.g. /en/resources/integrations/development/github) show "Resources" as plain text in breadcrumb, not a broken link
  • After Ahrefs recrawl: "Page has links to redirect" drops by ~3,700 (D-2), "Page has links to broken page" drops by ~135 (D-3, minus 248 Cloudflare email-obfuscation rows that are intentional)

🤖 Generated with Claude Code

- 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 Apr 29, 2026 3:50pm

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