Skip to content

Add discoverability redirects for ~130 guessable URL patterns#4337

Open
Swimburger wants to merge 1 commit intomainfrom
devin/1773793673-add-404-redirects
Open

Add discoverability redirects for ~130 guessable URL patterns#4337
Swimburger wants to merge 1 commit intomainfrom
devin/1773793673-add-404-redirects

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Mar 18, 2026

Summary

Adds redirects for URL patterns that users and crawlers commonly guess but currently return 404. These are "discoverability" redirects — they don't fix broken links, they catch logical URL guesses that miss intermediate path segments.

Categories of redirects added:

Category Example source → destination Count
SDK language shorthand /learn/sdks/typescript/quickstart/learn/sdks/generators/typescript/quickstart ~40
.NET/dotnet aliases /learn/sdks/net/... and /learn/sdks/dotnet/...generators/csharp/... 4
SDK top-level shortcuts /learn/sdks/quickstart/learn/sdks/overview/quickstart 8
API def shorthand /learn/openapi/overview/learn/api-definitions/openapi/overview 4 wildcards
CLI shorthand /learn/cli/commands/learn/cli-api-reference/cli-reference/commands 5
Docs shortcuts /learn/docs/quickstart, /learn/docs/ask-fern, /learn/docs/posthog, etc. ~60

All 160 source URLs were confirmed as 404 on production. All destination URLs were confirmed as 200.

Review & Testing Checklist for Human

  • Redirect ordering/precedence: These new wildcards are appended at the end of the redirects block. Verify that Fern's redirect engine uses first-match semantics so that existing specific redirects (e.g., /learn/sdks/capabilities/method-names) aren't overridden by new broad wildcards (e.g., /learn/sdks/typescript/:slug*). If Fern uses last-match, this PR could break existing redirects.
  • /learn/sdks/changelog destination: Currently points to /learn/sdks/generators/typescript/changelog since there's no unified SDK changelog page. Confirm this is an acceptable default or if it should point to /learn/sdks/overview/introduction instead.
  • Test a sample on preview deployment: After deploy, spot-check ~10 redirects across different categories (especially the wildcard patterns like /learn/sdks/typescript/quickstart and /learn/openapi/overview).

Notes

  • Redirects are purely additive (appended after all existing redirects) — no existing redirect rules were modified.
  • Wildcard redirects (:slug*) will also redirect paths where the destination doesn't exist (e.g., /learn/sdks/typescript/nonexistent/learn/sdks/generators/typescript/nonexistent, which will still 404). This is standard behavior and still moves the user closer to the right URL structure.

Link to Devin session: https://app.devin.ai/sessions/2dd15abd3d26412d9f73c60a6facb94d
Requested by: @Swimburger


Open with Devin

Add redirects for ~130 URL patterns that currently return 404 but are
logically guessable by users and crawlers:

- SDK language shorthand: /learn/sdks/<lang>/... → /learn/sdks/generators/<lang>/...
- .NET/dotnet aliases → csharp generator paths
- SDK top-level shortcuts: /learn/sdks/quickstart, introduction, etc.
- API definition shorthand: /learn/openapi/... → /learn/api-definitions/openapi/...
- CLI shorthand: /learn/cli/... → /learn/cli-api-reference/cli-reference/...
- Docs top-level shortcuts for components, features, auth, config, etc.
- Docs integration shortcuts: /learn/docs/posthog → analytics/posthog

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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