Skip to content

Chonker, fixing links in docs/site missing a trailing slash, that 304…#1174

Merged
ericgregory merged 1 commit into
mainfrom
fix-redirect-links-304
May 30, 2026
Merged

Chonker, fixing links in docs/site missing a trailing slash, that 304…#1174
ericgregory merged 1 commit into
mainfrom
fix-redirect-links-304

Conversation

@LiamRandall
Copy link
Copy Markdown
Member

Lots of pages impacted here; the essential problem is that Netlify adds the trailing / to pretty print the URLs; much of our legacy content did not include the trailing slash, meaning that pages immediately 304 to the correct url

What's changed here

  • 337 files changed, 1033 internal links rewritten to add the trailing slash (matches the site's trailingSlash: true canonical form, so no more 301 redirect hops).
  • Re-scan shows 0 remaining redirect-prone internal links across docs/, blog/, community/, versioned_docs/, and src/.
  • The two URLs you cited are gone in their no-slash form; /docs/installation/ now appears in 56 source files, /docs/quickstart/ in 5.
  • npm run build is green (exit 0). Since onBrokenLinks: 'throw' is on, this confirms every rewritten link resolves at its trailing-slash form.

Ahrefs's Reported 186: Why so many more?

Ahrefs reported ~107 pages / ~186 redirect links — but that's roughly what an SEO crawler sees from the indexed surface. The bulk of mine was in versioned_docs/ (664) — the archived v1 and 0.82 docs
that are noindex'd / largely uncrawled by Ahrefs but still serve users who land on them. Breakdown of links fixed:

┌─────────────────────────────┬─────────────┐
│ Top-level dir │ links fixed │
├─────────────────────────────┼─────────────┤
│ versioned_docs/ (v1 + 0.82) │ 664 │
├─────────────────────────────┼─────────────┤
│ blog/ │ 191 │
├─────────────────────────────┼─────────────┤
│ community/ │ 162 │
├─────────────────────────────┼─────────────┤
│ docs/ (v2) │ 10 │
├─────────────────────────────┼─────────────┤
│ src/ │ 6 │
└─────────────────────────────┴─────────────┘

Scope safety

  • Markdown link ]( … ), HTML href=" … ", and JSX to=" … " attributes only.
  • Skipped fenced code blocks, file-extension URLs (images/PDFs/etc.), external links, anchors, mailto:/tel:, and any URL already trailing-slashed.
  • Anchors and query strings preserved (e.g., /docs/foo#bar → /docs/foo/#bar).

… to netlify pretty links

Signed-off-by: Liam Randall <liam@cosmonic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 30, 2026

Deploy Preview for dreamy-golick-5f201e ready!

Name Link
🔨 Latest commit f2a7bbd
🔍 Latest deploy log https://app.netlify.com/projects/dreamy-golick-5f201e/deploys/6a1ad56d336f3300087841b2
😎 Deploy Preview https://deploy-preview-1174--dreamy-golick-5f201e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Copy Markdown
Member Author

@LiamRandall LiamRandall left a comment

Choose a reason for hiding this comment

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

Manually reviewed all 337 changes and tested a few different patterns to make sure they still worked.

LGTM.

@LiamRandall LiamRandall marked this pull request as ready for review May 30, 2026 12:38
@LiamRandall LiamRandall requested a review from a team as a code owner May 30, 2026 12:38
@ericgregory ericgregory merged commit af84946 into main May 30, 2026
7 checks passed
@ericgregory ericgregory deleted the fix-redirect-links-304 branch May 30, 2026 16:50
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.

2 participants