diff --git a/public/editor/editor.tsx b/public/editor/editor.tsx index b133e1c..a11661e 100644 --- a/public/editor/editor.tsx +++ b/public/editor/editor.tsx @@ -661,6 +661,20 @@ function Dashboard() { )} + +
+
+ +
+

+ Note about sites.wisp.place URLs +

+

+ Complex sites hosted on sites.wisp.place may have broken assets if they use absolute paths (e.g., /folder/script.js) in CSS or JavaScript files. While HTML paths are automatically rewritten, CSS and JS files are served as-is. For best results, use a wisp.place subdomain or custom domain, or ensure your site uses relative paths. +

+
+
+
{/* Domains Tab */} @@ -1604,7 +1618,7 @@ steps:

- Some DNS providers may require you to use @ or leave it blank for the root domain + Note: Some DNS providers (like Cloudflare) flatten CNAMEs to A records - this is fine and won't affect verification.

diff --git a/src/lib/dns-verify.ts b/src/lib/dns-verify.ts index 5b66c21..9eca333 100644 --- a/src/lib/dns-verify.ts +++ b/src/lib/dns-verify.ts @@ -135,22 +135,38 @@ export const verifyCNAME = async ( } /** - * Verify both TXT and CNAME records for a custom domain + * Verify custom domain using TXT record as authoritative proof + * CNAME check is optional/advisory - TXT record is sufficient for verification + * + * This approach works with CNAME flattening (e.g., Cloudflare) where the CNAME + * is resolved to A/AAAA records and won't be visible in DNS queries. */ export const verifyCustomDomain = async ( domain: string, expectedDid: string, expectedHash: string ): Promise => { + // TXT record is authoritative - it proves ownership const txtResult = await verifyDomainOwnership(domain, expectedDid) if (!txtResult.verified) { return txtResult } + // CNAME check is advisory only - we still check it for logging/debugging + // but don't fail verification if it's missing (could be flattened) const cnameResult = await verifyCNAME(domain, expectedHash) + + // Log CNAME status for debugging, but don't fail on it if (!cnameResult.verified) { - return cnameResult + console.log(`[DNS Verify] ⚠️ CNAME verification failed (may be flattened):`, cnameResult.error) } - return { verified: true } + // TXT verification is sufficient + return { + verified: true, + found: { + txt: txtResult.found?.txt, + cname: cnameResult.found?.cname + } + } }