diff --git a/src/components/Link/index.tsx b/src/components/Link/index.tsx index 68ac003db1..378ddca47a 100644 --- a/src/components/Link/index.tsx +++ b/src/components/Link/index.tsx @@ -89,12 +89,15 @@ const Link: React.FC = ({ href, ...restProps }) => { href = currentLocation.pathname + href } - // Replace link href with redirect if it exists - const [, redirectUrl] = getRedirect(location.host, location.pathname) - if (redirectUrl) { - href = isRelative(redirectUrl) - ? redirectUrl + currentLocation.search - : redirectUrl + if (location.host === currentLocation.host) { + // Replace link href with redirect if it exists + const [, redirectUrl] = getRedirect(location.host, location.pathname) + + if (redirectUrl) { + href = isRelative(redirectUrl) + ? redirectUrl + currentLocation.search + : redirectUrl + } } return