Skip to content

fix: normalize developer tool URLs to prevent ~950 SEO 404s#17853

Merged
pettinarip merged 3 commits into
devfrom
fix/dev-tools-url-normalization
Mar 27, 2026
Merged

fix: normalize developer tool URLs to prevent ~950 SEO 404s#17853
pettinarip merged 3 commits into
devfrom
fix/dev-tools-url-normalization

Conversation

@pettinarip
Copy link
Copy Markdown
Member

@pettinarip pettinarip commented Mar 25, 2026

Summary

  • Normalize website and twitter fields from BuidlGuidl developer tools data at the fetch boundary
  • BuidlGuidl data contains bare domains (bonadocs.com), partial URLs (x.com/rv_inc, twitter.com/alchemy), and bare handles (@thirdweb, dexkit) that fail isExternal() and get rendered as relative internal paths — producing ~950 broken 404 URLs across 25 locales
  • Adds normalizeUrl() (prepends https:// to bare domains) and normalizeTwitter() (converts handles and partial URLs to full https://x.com/ URLs) in fetchBuidlGuidl.ts

Context

This is the highest-leverage fix from the March 2026 SEO audit — eliminates 93% of all internal 4xx errors (950 of 1,024). See docs/seo-audit-action-items.md for full audit breakdown.

Examples of broken URLs this fixes:

BuidlGuidl value Crawled as (404) After fix
bonadocs.com ethereum.org/content/developers/tools/education/bonadocs.com https://bonadocs.com
@thirdweb ethereum.org/ur/developers/tools/sdks/@thirdweb https://x.com/thirdweb
x.com/rv_inc ethereum.org/pl/developers/tools/security/x.com/rv_inc https://x.com/rv_inc

Test plan

  • Verify dev tools modal links open correct external URLs (spot-check a few tools)
  • Confirm no TypeScript errors (npx tsc --noEmit passes)
  • Lint passes (verified via pre-commit hook)

BuidlGuidl data contains bare domains (e.g. "bonadocs.com"), partial
URLs ("x.com/rv_inc"), and bare handles ("@thirdweb") in website and
twitter fields. These fail the isExternal() check and get rendered as
relative internal paths, producing ~950 broken 404 URLs across locales.

Normalize URLs at the fetch boundary: prepend https:// to bare domains,
and convert twitter handles/partial URLs to full https://x.com/ URLs.
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 25, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit cc93881
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69c5581dcdece400081f7bb9
😎 Deploy Preview https://deploy-preview-17853.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 52 (no change from production)
Accessibility: 94 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (🔴 down 1 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the tooling 🔧 Changes related to tooling of the project label Mar 26, 2026
Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix, good call normalizing at the fetch boundary.

Edge cases to consider:

  1. Non-http protocols in normalizeUrl() -- A value like ftp://something would become https://ftp://something. Could guard with /^\w+:\/\// instead of /^https?:\/\// to pass through any protocol-prefixed string.

  2. normalizeTwitter() fallback -- Any unrecognized string becomes https://x.com/<value>. If a Twitter field ever held a non-Twitter URL (e.g. a Mastodon link), it'd produce a broken x.com URL. Low risk given the data source, but worth noting.

  3. Optional: export to src/lib/utils/url.ts -- normalizeUrl() is generic enough to be useful for other fetchers that ingest messy third-party data (apps/dapps). Keeping it private is fine for now, but centralizing could prevent duplication later.


Reviewed by Claude Opus 4.6

@pettinarip pettinarip merged commit 80242ec into dev Mar 27, 2026
9 checks passed
@pettinarip pettinarip deleted the fix/dev-tools-url-normalization branch March 27, 2026 08:01
@pettinarip pettinarip mentioned this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants