From eeebf6f8a313b5456355f7a5e675943b5bb1a90e Mon Sep 17 00:00:00 2001 From: Khushboo Verma Date: Tue, 9 Sep 2025 15:57:37 +0530 Subject: [PATCH 1/2] Update flow for apex domains --- src/lib/components/domains/cnameTable.svelte | 16 ++++++- src/lib/components/domains/recordTable.svelte | 48 ++++++++++++++----- .../domains/domain-[domain]/+page.svelte | 2 +- .../add-domain/verify-[domain]/+page.svelte | 12 +++-- .../add-domain/verify-[domain]/+page.svelte | 12 +++-- .../add-domain/verify-[domain]/+page.svelte | 9 ++-- .../domains/retryDomainModal.svelte | 3 +- 7 files changed, 70 insertions(+), 32 deletions(-) diff --git a/src/lib/components/domains/cnameTable.svelte b/src/lib/components/domains/cnameTable.svelte index b198524da2..9648202761 100644 --- a/src/lib/components/domains/cnameTable.svelte +++ b/src/lib/components/domains/cnameTable.svelte @@ -30,8 +30,8 @@ {/if} - Add the following record on your DNS provider. Note that DNS changes may take time to - propagate fully. + Add the following record on your DNS provider. Note that DNS changes may take up to 48 + hours to propagate fully. @@ -51,6 +51,18 @@ text={$regionalConsoleVariables._APP_DOMAIN_TARGET_CNAME} /> + + + + CAA + + + + @ + + + + diff --git a/src/lib/components/domains/recordTable.svelte b/src/lib/components/domains/recordTable.svelte index 14683b7218..5fb7775d0f 100644 --- a/src/lib/components/domains/recordTable.svelte +++ b/src/lib/components/domains/recordTable.svelte @@ -9,13 +9,26 @@ Alert } from '@appwrite.io/pink-svelte'; import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store'; + import { isASubdomain } from '$lib/helpers/tlds'; - export let domain: string; - export let verified = undefined; - export let variant: 'cname' | 'a' | 'aaaa'; - export let service: 'sites' | 'general' = 'general'; + interface Props { + domain: string; + verified?: boolean; + variant: 'cname' | 'a' | 'aaaa'; + service?: 'sites' | 'general'; + onNavigateToNameservers?: () => void; + } + + let { + domain, + verified = undefined, + variant, + service = 'general', + onNavigateToNameservers = undefined + }: Props = $props(); let subdomain = domain?.split('.')?.slice(0, -2)?.join('.'); + const isSubDomain = $derived.by(() => isASubdomain(domain)); function setTarget() { switch (variant) { @@ -44,8 +57,8 @@ {/if} - Add the following record on your DNS provider. Note that DNS changes may take time to - propagate fully. + Add the following record on your DNS provider. Note that DNS changes may take up to 48 + hours to propagate fully. @@ -62,16 +75,25 @@ + + + + CAA + + + + @ + + + + - {#if variant === 'cname'} + {#if variant === 'cname' && !isSubDomain} - If your domain uses CAA records, ensure certainly.com is authorized — otherwise, SSL - setup may fail. A list of all domain providers and their DNS setting is available here. + Since is an apex domain, CNAME + record is only supported by certain providers. If yours doesn't, please verify using + nameservers instead. {:else} diff --git a/src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.svelte b/src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.svelte index d6ce25571b..b24836bad7 100644 --- a/src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.svelte @@ -118,7 +118,7 @@ Navigate to your domain provider and update the nameservers to and . - Note that DNS changes may take time to propagate fully. + Note that DNS changes may take up to 48 hours to propagate fully.