From 4e2473531f09ca74f866c5e48f1c1b87cd43f107 Mon Sep 17 00:00:00 2001 From: Richard Poelderl Date: Wed, 22 Mar 2023 15:43:59 +0100 Subject: [PATCH] fix: set canonical to https://cal.com on .dev as well (#7883) --- packages/ui/components/head-seo/HeadSeo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui/components/head-seo/HeadSeo.tsx b/packages/ui/components/head-seo/HeadSeo.tsx index 4d6a5e91bd..1cdb89da87 100644 --- a/packages/ui/components/head-seo/HeadSeo.tsx +++ b/packages/ui/components/head-seo/HeadSeo.tsx @@ -75,7 +75,8 @@ export const HeadSeo = (props: HeadSeoProps): JSX.Element => { // Get the current URL from the window object const url = getBrowserInfo()?.url; // Check if the URL is from cal.com - const isCalcom = url && new URL(url).hostname.endsWith("cal.com"); + const isCalcom = + url && (new URL(url).hostname.endsWith("cal.com") || new URL(url).hostname.endsWith("cal.dev")); // Get the router's path const path = useRouter().asPath; // Build the canonical URL using the router's path, without query parameters. Note: on homepage it omits the trailing slash