diff --git a/src/docfx/build/link/LinkResolver.cs b/src/docfx/build/link/LinkResolver.cs index 3ed9a07d7ee..386a28fef48 100644 --- a/src/docfx/build/link/LinkResolver.cs +++ b/src/docfx/build/link/LinkResolver.cs @@ -155,7 +155,7 @@ public LinkResolver( return (errors, "", fragment, LinkType.AbsolutePath, null, false); } var resolvedHref = _config.RemoveHostName ? UrlUtility.RemoveLeadingHostName(href, _config.HostName) : href; - resolvedHref = _config.RemoveHostName ? UrlUtility.RemoveLeadingHostName(resolvedHref, _config.AlternativeHostName) : resolvedHref; + resolvedHref = UrlUtility.RemoveLeadingHostName(resolvedHref, _config.AlternativeHostName); return (errors, resolvedHref, fragment, LinkType.AbsolutePath, null, false); }