Skip to content

redirects: remove 84 rules whose destination is a 404 - #2037

Draft
marcleblanc2 wants to merge 1 commit into
mainfrom
marc/redirects/batch-4
Draft

marcleblanc2 wants to merge 1 commit into
mainfrom
marc/redirects/batch-4

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

Fourth cleanup after #1966. Behaviour change, and this one needs a human eye, hence draft.

Each of these 84 rules fires and sends the visitor to a page that does not exist: probed every destination live, following up to 10 redirects, and kept only those whose final status is 404. A redirect into a 404 is no better than the 404 itself, so this PR deletes them all.

71 had zero hits in the 90 days to 2026-09-11 (per viewership-metrics/reports/redirect-rules.md on #1939). 13 still get traffic and probably deserve a fixed destination instead of a delete; likely targets where one exists:

Source Broken destination Hits Likely fix
/admin/external_services/postgres /self-hosted/external_services/postgres 60 /self-hosted/external-services/postgres exists
/dev/documentation /dev/how-to/documentation_implementation 30 dev docs left this site; delete
/code_search/how-to/exhaustive /code-search/types/exhaustive 30 /code-search/types/search-jobs
/integration/google_gsuite /integration/google_workspace 20 /integration/browser-extension/how-tos/google-workspace
/admin/install/kubernetes/update /admin/deploy/kubernetes/update 20 /self-hosted/deploy/kubernetes/upgrade
/code_intelligence/explanations /code_navigation/explanations 20 /code-navigation
/code_intelligence/how-to/index_other_languages /code_navigation/how-to/index_other_languages 20 /code-navigation/how-to/index-other-languages exists
/cody/core-concepts/embeddings/configure-embeddings /cody/embeddings/configure-embeddings 20 /cody (embeddings removed)
/code_navigation/how-to/adding_lsif_to_workflows /code-search/code-navigation/how-to/adding_lsif_to_workflows 20 /admin/how-to/lsif-scip-migration?
/admin/config/critical_config /admin/migration/3_11 10 /admin/migration or delete
/app /cody/clients/app 10 Cody App is gone; /cody or delete
/cody/explanations/indexing /cody/embeddings/embedding-index 10 /cody
/cody/explanations/policies /cody/embeddings/configure-embeddings#policies 10 /cody

Also /admin/external_services/redis → /self-hosted/external_services/redis (0 hits) has the same underscore/hyphen typo as postgres and an obvious fix.

All 84 removed rules with hits
Source Destination (404) Hits, 90 days
/admin/external_services/postgres /self-hosted/external_services/postgres 60
/dev/documentation /dev/how-to/documentation_implementation 30
/code_search/how-to/exhaustive /code-search/types/exhaustive 30
/integration/google_gsuite /integration/google_workspace 20
/admin/install/kubernetes/update /admin/deploy/kubernetes/update 20
/code_intelligence/explanations /code_navigation/explanations 20
/code_intelligence/how-to/index_other_languages /code_navigation/how-to/index_other_languages 20
/cody/core-concepts/embeddings/configure-embeddings /cody/embeddings/configure-embeddings 20
/code_navigation/how-to/adding_lsif_to_workflows /code-search/code-navigation/how-to/adding_lsif_to_workflows 20
/admin/config/critical_config /admin/migration/3_11 10
/app /cody/clients/app 10
/cody/explanations/indexing /cody/embeddings/embedding-index 10
/cody/explanations/policies /cody/embeddings/configure-embeddings#policies 10
/admin/monitoring/metrics_reference /admin/observability/metrics_guide 0
/dev/architecture/life-of-a-search-query /dev/background-information/architecture/life-of-a-search-query 0
/dev/architecture/architecture.dot /dev/background-information/architecture/architecture.dot 0
/dev/architecture/life-of-a-ping /dev/background-information/architecture/life-of-a-ping 0
/dev/architecture/life-of-a-repository /dev/background-information/architecture/life-of-a-repository 0
/dev/architecture/search-pagination /dev/background-information/architecture/search-pagination 0
/dev/codeintel/architecture /dev/background-information/codeintel/architecture 0
/dev/codeintel/deployment /dev/background-information/codeintel/deployment 0
/dev/codeintel/diagrams/architecture.dot /dev/background-information/codeintel/diagrams/architecture.dot 0
/dev/codeintel/diagrams/definitions.mermaid /dev/background-information/codeintel/diagrams/definitions.mermaid 0
/dev/codeintel/diagrams/extension-definitions.mermaid /dev/background-information/codeintel/diagrams/extension-definitions.mermaid 0
/dev/codeintel/diagrams/extension-hover.mermaid /dev/background-information/codeintel/diagrams/extension-hover.mermaid 0
/dev/codeintel/diagrams/extension-references.mermaid /dev/background-information/codeintel/diagrams/extension-references.mermaid 0
/dev/codeintel/diagrams/hover.mermaid /dev/background-information/codeintel/diagrams/hover.mermaid 0
/dev/codeintel/diagrams/references.mermaid /dev/background-information/codeintel/diagrams/references.mermaid 0
/dev/codeintel/diagrams/resolve-page.mermaid /dev/background-information/codeintel/diagrams/resolve-page.mermaid 0
/dev/codeintel/diagrams/upload.mermaid /dev/background-information/codeintel/diagrams/upload.mermaid 0
/dev/codeintel/extensions /dev/background-information/codeintel/extensions 0
/dev/codeintel/index /dev/background-information/codeintel/index 0
/dev/codeintel/queries /dev/background-information/codeintel/queries 0
/dev/codeintel/uploads /dev/background-information/codeintel/uploads 0
/dev/graphql_api /dev/background-information/graphql_api 0
/dev/observability /dev/background-information/observability 0
/dev/postgresql /dev/background-information/postgresql 0
/dev/renovate /dev/background-information/renovate 0
/dev/tech_stack /dev/background-information/tech_stack 0
/dev/telemetry /dev/background-information/telemetry 0
/dev/testing /dev/background-information/testing 0
/dev/web/build /dev/background-information/web/build 0
/dev/code_host_integrations /dev/background-information/web/code_host_integrations 0
/dev/web/graphql /dev/background-information/web/graphql 0
/dev/web/index /dev/background-information/web/index 0
/dev/web/web_app /dev/background-information/web/web_app 0
/dev/phabricator_gitolite /dev/how-to/configure_phabricator_gitolite 0
/dev/zoekt /dev/how-to/zoekt_local_dev 0
/user/search/structural /code_search/reference/structural 0
/user/search/opengrok /code_search/how-to/opengrok 0
/user/search/scopes /code_search/how-to/scopes 0
/user/code_intelligence/lsif_quickstart /user/code_intelligence/how-to/index_other_languages 0
/user/code_intelligence/basic_code_intelligence /user/code_intelligence/explanations/search_based_code_intelligence 0
/user/repository/badges /user/personalization/badges 0
/user/quick_links /user/personalization/quick_links 0
/user/themes /user/personalization/themes 0
/dev/campaigns_database_layout.dot /dev/background-information/batch_changes/batch_changes_database_layout.dot 0
/dev/campaigns_design /dev/background-information/batch_changes/batch_changes_design 0
/dev/campaigns_development /dev/background-information/batch_changes/index 0
/dev/automation_development /dev/background-information/batch_changes/index 0
/dev/background-information/campaigns/campaigns_database_layout.dot /dev/background-information/batch_changes/batch_changes_database_layout.dot 0
/campaigns/references/name-change /batch_changes/references/name-change 0
/campaigns/references /batch_changes/references 0
/campaigns/how-tos /batch_changes/how-tos 0
/cli/references/campaigns/index /cli/references/batch/index 0
/dev/background-information/continuous_integration /dev/background-information/ci 0
/dev/how-to/add_and_use_logging /dev/how-to/add_logging 0
/admin/install/kubernetes/helm /admin/deploy/kubernetes/helm 0
/code_intelligence/explanations/diagrams /code_navigation/explanations/diagrams 0
/code_intelligence/explanations/diagrams/index-states.mermaid /code_navigation/explanations/diagrams/index-states.mermaid 0
/code_intelligence/explanations/diagrams/upload-states.mermaid /code_navigation/explanations/diagrams/upload-states.mermaid 0
/code_intelligence/apidocs /code_navigation/apidocs 0
/code_intelligence/how-to /code_navigation/how-to 0
/code_intelligence/how-to/img/CodeReview.gif /code_navigation/how-to/img/CodeReview.gif 0
/code_intelligence/how-to/img/extension-example.gif /code_navigation/how-to/img/extension-example.gif 0
/code_intelligence/how-to/img /code_navigation/how-to/img 0
/code_intelligence/references/faq /code_navigation/references/faq 0
/code_intelligence/references/requirements /code_navigation/references/requirements 0
/code_intelligence/references /code_navigation/references 0
/cody/overview/app /cody/clients/app 0
/cody/core-concepts/embeddings/embedding-index /cody/embeddings/embedding-index 0
/cody/explanations/schedule_one_off_embeddings_jobs /cody/embeddings/configure-embeddings#schedule-embeddings-jobs 0
/admin/external_services/redis /self-hosted/external_services/redis 0
/admin/observability/.gitattributes /self-hosted/observability/.gitattributes 0

Verified: first-match table changes on exactly these 84 paths (rule → none); file parses to 879 rules. Independent of the batch 2 and batch 3 PRs.

Each of these rules fires, and sends the visitor to a page that does not
exist (probed live, following redirects, final status 404). A redirect
into a 404 is no better than the 404 itself; 71 of the 84 had no traffic
in the 90 days to 2026-09-11. The 13 that did are listed in the pull
request for a fix instead of a delete.
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 25, 2026 1:51am UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

❌ This PR breaks 1 redirect(s)

Redirects are used so inbound traffic from external sources (links inside old versions of our product, bookmarks, search results, etc.) to old doc pages still reaches a relevant page.

A correct entry maps the old page path, exactly as the browser requests it, straight to a page that exists today, with an optional #heading that exists on the destination page:

{
	source: '/old/section/page',
	destination: '/new/section/page#heading-slug'
},

Each section below explains how to fix the entries listed under it.

Do not use redirects for broken internal links, internal links must be fixed properly to tame the tech debt snowball no one wants to deal with; the "Check links" PR check comment lists the links this PR broke, if any.

src/data/redirects.ts

Destination page does not exist

Set the redirect destination to the page that replaced it, or remove the rule if there is no replacement page; visitors then get our fancy 404 page, with links they can click to find where they're trying to go, and the search bar.

  • line 909
    source: '/code_intelligence/how-to/adding_lsif_to_workflows',
    destination: '/code_navigation/how-to/adding_lsif_to_workflows'

Reproduce locally with node dev/check-redirects.mjs

This branch was successfully deployed

1 active deployment
Preview — a5bcf562 Deployed Sep 25, 2026 by vercel[bot]
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