diff --git a/src/plugins/custom_integrations/server/language_clients/index.ts b/src/plugins/custom_integrations/server/language_clients/index.ts index 0ce45dbcfcd87..d18eddaf08627 100644 --- a/src/plugins/custom_integrations/server/language_clients/index.ts +++ b/src/plugins/custom_integrations/server/language_clients/index.ts @@ -151,7 +151,11 @@ export function registerLanguageClients( description: integration.description, type: 'ui_link', shipper: 'language_clients', - uiInternalPath: integration.docUrlTemplate.replace('{branch}', branch), + // Documentation for `main` branches is still published at a `master` URL. + uiInternalPath: integration.docUrlTemplate.replace( + '{branch}', + branch === 'main' ? 'master' : branch + ), isBeta: false, icons, categories: ['elastic_stack', 'custom', 'language_client'],