1import{d as Ce,g as Te,r as d,j as e,L as se}from"./vendor-DG7D-edB.js";import{a as Ie,n as Ae,b as Re,o as A,i as k,aS as te,B as i,v as Le,ah as ae,a7 as N,a8 as y,a9 as b,aa as I,ab as v,ap as Ee,aF as U,h as n,aM as ne,aZ as C,a2 as w,aJ as F,L as Me,I as Pe,aX as re,aj as ie,a0 as oe}from"./index-FIaEtjBH.js";import{u as Fe,F as Ve}from"./use-plan-features-CuhgPqSQ.js";import{A as m,b as T,a as u}from"./alert-BcSjTgv4.js";import{A as ce}from"./arrow-left-vTYID-Ji.js";import{C as f}from"./copy-BuWtaAVh.js";import{R as M}from"./refresh-cw-DgKlWK0g.js";import{T as qe}from"./trash-2-BeX74tkQ.js";import{I as R}from"./info-1Hu7jf57.js";import{C as Ye}from"./circle-question-mark-B_BZVylk.js";import"./ui-BYpPUPUG.js";function P({registrar:r,steps:g}){return e.jsxs("details",{className:"group border rounded-lg","data-testid":`registrar-guide-${r.toLowerCase().replace(/\s+/g,"-")}`,children:[e.jsxs("summary",{className:"flex items-center justify-between cursor-pointer p-3 hover:bg-muted/50 transition-colors rounded-lg",children:[e.jsx("span",{className:"font-medium text-sm",children:r}),e.jsx(F,{className:"w-4 h-4 text-muted-foreground transition-transform group-open:rotate-90"})]}),e.jsx("div",{className:"px-3 pb-3 pt-1",children:e.jsx("ol",{className:"list-decimal list-inside space-y-1.5 text-sm text-muted-foreground",children:g.map((S,L)=>e.jsx("li",{children:S},L))})})]})}function p({question:r,answer:g}){return e.jsxs("details",{className:"group border-b last:border-b-0","data-testid":`faq-${r.slice(0,30).replace(/[^a-zA-Z0-9]/g,"-").toLowerCase()}`,children:[e.jsxs("summary",{className:"flex items-center justify-between cursor-pointer py-3 hover:text-primary transition-colors",children:[e.jsx("span",{className:"text-sm font-medium pr-4",children:r}),e.jsx(F,{className:"w-4 h-4 text-muted-foreground shrink-0 transition-transform group-open:rotate-90"})]}),e.jsx("p",{className:"text-sm text-muted-foreground pb-3 pr-8",children:g})]})}function Be(){const{toast:r}=Ie(),g=Ae(),[,S]=Ce(),L=Te(),{hasFeature:de,isLoading:le}=Fe(),[x,_]=d.useState(""),[j,V]=d.useState(null),[me,Q]=d.useState(!1),[ue,q]=d.useState(!1),[o,Y]=d.useState(null),[xe,K]=d.useState(!1),[l,he]=d.useState(null),[X,B]=d.useState(!1),D=d.useRef(null),[J,O]=d.useState(!1),{data:t,isLoading:H}=Re({queryKey:["/api/admin/domain"],queryFn:async()=>{const s=await fetch("/api/admin/domain");if(!s.ok)throw new Error("Failed to fetch domain info");return s.json()}});d.useEffect(()=>{if(H||!t)return;const s=t.dnsMode==="managed",a=!t.customDomain;(s||a)&&S("/admin/domain-setup")},[H,t,S]);const W=A({mutationFn:async s=>{const a=await fetch("/api/admin/domain/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customDomain:s})});if(!a.ok){const c=await a.json();throw new Error(c.message||"Failed to request domain")}return a.json()},onSuccess:()=>{g.invalidateQueries({queryKey:["/api/admin/domain"]}),_(""),r({title:"Domain request submitted! Follow the DNS instructions below."})},onError:s=>{r({title:s.message,variant:"destructive"})}}),$=A({mutationFn:async()=>{const s=await fetch("/api/admin/domain/verify",{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const a=await s.json();throw new Error(a.message||"Failed to verify domain")}return s.json()},onSuccess:s=>{g.invalidateQueries({queryKey:["/api/admin/domain"]}),s.isActive?r({title:"Domain verified and active! Your custom domain is now live."}):r({title:`Domain status: ${s.domainStatus}. SSL: ${s.sslStatus||"pending"}`})},onError:s=>{r({title:s.message,variant:"destructive"})}}),Z=A({mutationFn:async()=>{const s=await fetch("/api/admin/domain",{method:"DELETE"});if(!s.ok){const a=await s.json();throw new Error(a.message||"Failed to remove domain")}return s.json()},onSuccess:()=>{g.invalidateQueries({queryKey:["/api/admin/domain"]}
1),r({title:"Custom domain removed"})},onError:s=>{r({title:s.message,variant:"destructive"})}}),fe=async s=>{Q(!0),V(null);try{const a=await fetch("/api/admin/domain/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:s})});if(a.ok){const c=await a.json();V(c)}}catch{}finally{Q(!1)}},pe=async s=>{K(!0),Y(null);try{const a=await fetch("/api/admin/domain/preflight",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:s})});if(a.ok){const c=await a.json();Y(c)}}catch{}finally{K(!1)}},E=d.useCallback(async()=>{B(!0);try{const s=await fetch("/api/admin/domain/dns-check",{method:"POST",headers:{"Content-Type":"application/json"}});if(s.ok){const a=await s.json();he(a),a.allRecordsFound&&D.current&&(clearInterval(D.current),D.current=null,O(!1))}}catch{r({title:"Failed to check DNS records. Will retry automatically.",variant:"destructive"})}finally{B(!1)}},[]),G=d.useCallback(()=>{D.current&&(clearInterval(D.current),D.current=null),O(!1)},[]),ge=d.useCallback(()=>{G(),E(),D.current=setInterval(()=>{E()},3e4),O(!0)},[E,G]);d.useEffect(()=>(t?.customDomain&&t.domainStatus!=="active"&&ge(),()=>G()),[t?.customDomain,t?.domainStatus]);const z=A({mutationFn:async s=>{const a=await fetch("/api/admin/domain/connect-redirect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customDomain:s})});if(!a.ok){const c=await a.json();throw new Error(c.message||"Failed to initiate Domain Connect")}return a.json()},onSuccess:s=>{window.location.href=s.redirectUrl},onError:s=>{r({title:s.message,variant:"destructive"})}}),je=A({mutationFn:async s=>{const a=await fetch("/api/admin/domain/connect-complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customDomain:s})});if(!a.ok){const c=await a.json();throw new Error(c.message||"Failed to complete domain connection")}return a.json()},onSuccess:()=>{g.invalidateQueries({queryKey:["/api/admin/domain"]}
1),r({title:"Domain connected automatically! SSL provisioning will begin shortly."}),Ne()},onError:s=>{r({title:s.message,variant:"destructive"})}}),Ne=()=>{q(!0);let s=0;const a=30,c=setInterval(async()=>{s++;try{const ee=await fetch("/api/admin/domain/verify",{method:"POST",headers:{"Content-Type":"application/json"}});if(ee.ok){const De=await ee.json();g.invalidateQueries({queryKey:["/api/admin/domain"]}),De.isActive&&(clearInterval(c),q(!1),r({title:"Domain is active! Your custom domain is now live."}))}}catch{}s>=a&&(clearInterval(c),q(!1),r({title:"Domain setup is still processing. You can check status manually."}))},1e4)};d.useEffect(()=>{const s=new URLSearchParams(L),a=s.get("dc_status");if(a==="success"){const c=s.get("dc_domain");c&&je.mutate(c),S("/admin/domain",{replace:!0})}else if(a==="error"){const c=s.get("dc_message")||"Domain Connect setup was cancelled or failed";r({title:c,variant:"destructive"}),S("/admin/domain",{replace:!0})}},[L]),d.useEffect(()=>{if(x&&x.includes(".")){const s=setTimeout(()=>{fe(x),pe(x)},800);return()=>clearTimeout(s)}else V(null),Y(null)},[x]);const h=s=>{navigator.clipboard.writeText(s),r({title:"Copied to clipboard"})},ye=s=>{switch(s){case"active":return e.jsx(w,{className:"w-5 h-5 text-green-500"});case"pending_ssl":return e.jsx(oe,{className:"w-5 h-5 text-yellow-500"});case"pending_dns":return e.jsx(oe,{className:"w-5 h-5 text-orange-500"});case"error":return e.jsx(U,{className:"w-5 h-5 text-red-500"});default:return null}},be=s=>{switch(s){case"active":return"Active - Your domain is live!";case"pending_ssl":return"Pending SSL - Certificate being issued (usually 1-5 minutes)";case"pending_dns":return"Pending DNS - Waiting for DNS record verification";case"error":return"Error - Please check your DNS configuration";default:return"Unknown status"}};if(H||le)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx(k,{className:"w-8 h-8 animate-spin text-primary"})});if(!de("customDomain")){const s=Ve.customDomain;return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-4",children:e.jsxs("div",{className:"text-center max-w-lg",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(te,{className:"w-8 h-8 text-gray-400"})}),e.jsx("h1",{className:"text-3xl font-display font-bold mb-4",children:s.name}),e.jsx("p",{className:"text-muted-foreground mb-2",children:s.description}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-8",children:["Available on: ",e.jsx("span",{className:"font-medium text-primary",children:s.availableOn})]}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsxs(i,{variant:"outline",onClick:()=>S("/admin"),children:[e.jsx(ce,{className:"w-4 h-4 mr-2"}),"Back to Admin"]}),e.jsxs(i,{onClick:()=>S("/admin/billing"),children:[e.jsx(Le,{className:"w-4 h-4 mr-2"}),"View Plans"]})]})]})})}const ve=["Log in to your GoDaddy account at godaddy.com",'Click "My Products" in the top menu','Find your domain and click "DNS" (or "Manage DNS")',"FIRST: Delete any existing A records for @ that point to your old hosting provider (e.g., Squarespace, Wix). These must be removed before adding new records.",'Click "Add New Record"','Set Type to "CNAME"','In the "Name" field, enter "@" (for root domain) or your subdomain (e.g., "community")','In the "Value" field, enter "subscriberly.ai"','Set TTL to "1 Hour" (or the lowest available)','Click "Save"'],we=["Log in to your Namecheap account at namecheap.com",'Go to "Domain List" in the left sidebar','Click "Manage" next to your domain','Click the "Advanced DNS" tab',"FIRST: Delete any existing A records for @ that point to your old hosting provider (e.g., Squarespace, Wix). These must be removed before adding new records.",'Click "Add New Record"','Set Type to "CNAME Record"','In the "Host" field, enter "@" (for root domain) or your subdomain (e.g., "community")','In the "Value" field, enter "subscriberly.ai"','Set TTL to "Automatic"',"Click the green checkmark to save"],Se=["Log in to Google Domains (now Squarespace Domains) at domains.google.com","Click on your domain name",'Click "DNS" in the left sidebar','Scroll to "Custom records" and click "Manage custom records"',"FIRST: Delete any existing A records for @ that point to your old hosting provider. These must be removed before adding new records.",'Click "Create new record"','Set Type to "CNAME"','In the "Host name" field, enter "@" (for root domain) or your subdomain (e.g., "community")','In the "Data" field, enter "subscriberly.ai"','Set TTL to "3600" (1 hour)','Click "Save"'],ke=["Log in to your Cloudflare dashboard at dash.cloudflare.com","Select your domain from the list",'Click "DNS" in the left sidebar then "Records"',"FIRST: Delete any existing A records for @ that point to your old hosting provider. These must be removed before adding new records.",'Click "Add record"','Set Type to "CNAME"','In the "Name" field, enter "@" (for root domain) or your subdomain (e.g., "community")','In the "Target" field, enter "subscriberly.ai"','Turn OFF the orange cloud (Proxy) toggle â set it to "DNS only" (gray cloud)','Click "Save"'];return e.jsx("div",{className:"min-h-screen bg-muted/30",children:e.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[e.jsx("div",{className:"flex items-center justify-between mb-8",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{href:"/admin",children:e.jsx(i,{variant:"ghost",size:"icon","data-testid":"back-button",children:e.jsx(ce,{className:"w-5 h-5"})})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[e.jsx(ae,{className:"w-6 h-6"}),"Domain Settings"]}),e.jsx("p",{className:"text-muted-foreground",children:"Manage your community's web address"})]})]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(N,{children:[e.jsxs(y,{children:[e.jsx(b,{children:"Subscriberly Subdomain"}),e.jsx(I,{children:"Your free subdomain on Subscriberly - always available, even after connecting a custom domain"})]}),e.jsx(v,{children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"flex-1 p-3 bg-muted rounded-lg font-mono text-sm",children:t?.subdomainUrl||"Not configured"}),t?.subdomainUrl&&e.jsxs(e.Fragment,{children:[e.jsx(i,{variant:"outline",size:"icon",onClick:()=>h(t.subdomainUrl),"data-testid":"copy-subdomain",children:e.jsx(f,{className:"w-4 h-4"})}),e.jsx("a",{href:t.subdomainUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i,{variant:"outline",size:"icon","data-testid":"visit-subdomain",children:e.jsx(Ee,{className:"w-4 h-4"})})})]})]})})]}),e.jsxs(N,{children:[e.jsxs(y,{children:[e.jsx(b,{children:"Custom Domain"}),e.jsx(I,{children:"Connect your own domain (e.g., events.yourtown.com)"})]}),e.jsx(v,{className:"space-y-6",children:t?.customDomain?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[ye(t.domainStatus),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:t.customDomain}),e.jsx("p",{className:"text-sm text-muted-foreground",children:be(t.domainStatus)}),ue&&t.domainStatus!=="active"&&e.jsxs("p",{className:"text-xs text-blue-600 flex items-center gap-1 mt-1","data-testid":"text-polling-status",children:[e.jsx(k,{className:"w-3 h-3 animate-spin"}),"Checking activation status automatically..."]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(i,{variant:"outline",size:"sm",onClick:()=>$.mutate(),disabled:$.isPending,"data-testid":"verify-domain",children:[$.isPending?e.jsx(k,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(M,{className:"w-4 h-4 mr-2"}),"Check Status"]}),e.jsx(i,{variant:"destructive",size:"sm",onClick:()=>{confirm("Are you sure you want to remove this custom domain?")&&Z.mutate()},disabled:Z.isPending,"data-testid":"remove-domain",children:e.jsx(qe,{className:"w-4 h-4"})})]})]}),t.domainStatus!=="active"&&t.dnsInstructions&&e.jsxs(e.Fragment,{children:[e.jsxs(m,{children:[e.jsx(U,{className:"h-4 w-4"}),e.jsx(T,{children:t.dnsInstructions.isRootDomain?"Step 1: Add These DNS Records":"Step 1: Add This DNS Record"}),e.jsxs(u,{className:"mt-4",children:[e.jsxs("p",{className:"mb-4 text-sm",children:["Log in to your domain registrar (where you purchased ",e.jsx("strong",{children:t.customDomain}),") and add ",t.dnsInstructions.isRootDomain?"these DNS records":"this DNS re
1cord",":"]}),t.dnsInstructions.isRootDomain&&t.dnsInstructions.aRecordIPs?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:"A Records (for root domain)"}),e.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-3 font-mono text-sm",children:[t.dnsInstructions.aRecordIPs.map((s,a)=>e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-muted-foreground",children:[e.jsx(n,{variant:"secondary",className:"font-mono mr-2",children:"A"}),"Name: ",e.jsx(n,{variant:"secondary",className:"font-mono mx-1",children:"@"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"secondary",className:"font-mono",children:s}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(s),"data-testid":`copy-a-record-${a}`,children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]})]},a)),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:"1 Hour"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:"CNAME Record (for www)"}),e.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-3 font-mono text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-muted-foreground",children:[e.jsx(n,{variant:"secondary",className:"font-mono mr-2",children:"CNAME"}),"Name: ",e.jsx(n,{variant:"secondary",className:"font-mono mx-1",children:"www"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"secondary",className:"font-mono",children:t.dnsInstructions.wwwCnameValue}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(t.dnsInstructions.wwwCnameValue||""),"data-testid":"copy-www-cname",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:"1 Hour"})]})]})]}),t.dnsInstructions.ownershipVerification&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide flex items-center gap-1",children:[e.jsx(ne,{className:"w-3 h-3"}),"Domain Verification Record (Required)"]}),e.jsxs(m,{className:"border-blue-200 bg-blue-50/50 mb-3",children:[e.jsx(R,{className:"h-4 w-4 text-blue-600"}),e.jsx(u,{className:"text-blue-800 text-sm",children:"Since root domains use A records instead of CNAME, this TXT record is needed to verify you own this domain. Without it, SSL certificate provisioning will fail."})]}),e.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-3 font-mono text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-muted-foreground",children:[e.jsx(n,{variant:"secondary",className:"font-mono mr-2",children:"TXT"}),"Name: ",e.jsx(n,{variant:"secondary",className:"font-mono mx-1",children:t.dnsInstructions.ownershipVerification.txtName.replace(`.${t.customDomain}`,"")})]}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(t.dnsInstructions.ownershipVerification.txtName.replace(`.${t.customDomain}`,"")),"data-testid":"copy-txt-name",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]}),e.jsxs("div",{className:"flex justify-between items-center gap-2",children:[e.jsxs("span",{className:"text-muted-foreground text-xs break-all",children:["Value: ",t.dnsInstructions.ownershipVerification.txtValue]}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1 shrink-0",onClick:()=>h(t.dnsInstructions.ownershipVerification.txtValue),"data-testid":"copy-txt-value",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:"1 Hour"})]})]})]}),t.dnsInstructions.dcvDelegation&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide flex items-center gap-1",children:[e.jsx(te,{className:"w-3 h-3"}),"SSL Certificate Verification (Required)"]}),e.jsxs(m,{className:"border-blue-200 bg-blue-50/50 mb-3",children:[e.jsx(R,{className:"h-4 w-4 text-blue-600"}),e.jsx(u,{className:"text-blue-800 text-sm",children:"This record allows your SSL certificate to be issued and renewed automatically. Without it, your site won't load securely over HTTPS."})]}),e.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-3 font-mono text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-muted-foreground",children:[e.jsx(n,{variant:"secondary",className:"font-mono mr-2",children:"CNAME"}),"Name: ",e.jsx(n,{variant:"secondary",className:"font-mono mx-1",children:t.dnsInstructions.dcvDelegation.cnameName})]}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(t.dnsInstructions.dcvDelegation.cnameName),"data-testid":"copy-dcv-name",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]}),e.jsxs("div",{className:"flex justify-between items-center gap-2",children:[e.jsxs("span",{className:"text-muted-foreground text-xs break-all",children:["Value: ",t.dnsInstructions.dcvDelegation.cnameValue]}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1 shrink-0",onClick:()=>h(t.dnsInstructions.dcvDelegation.cnameValue),"data-testid":"copy-dcv-value",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:"1 Hour"})]})]})]}),e.jsxs(i,{variant:"outline",className:"w-full",onClick:()=>{const s=[];if(s.push(`DNS Records for ${t.customDomain}`),s.push("=".repeat(40)),t.dnsInstructions.aRecordIPs)for(const a of t.dnsInstructions.aRecordIPs)s.push(`Type: A | Name: @ | Value: ${a} | TTL: 1 Hour`);if(t.dnsInstructions.wwwCnameValue&&s.push(`Type: CNAME | Name: www | Value: ${t.dnsInstructions.wwwCnameValue} | TTL: 1 Hour`),t.dnsInstructions.ownershipVerification){const a=t.dnsInstructions.ownershipVerification;s.push(`Type: TXT | Name: ${a.txtName.replace(`.${t.customDomain}`,"")} | Value: ${a.txtValue} | TTL: 1 Hour`)}if(t.dnsInstructions.dcvDelegation){const a=t.dnsInstructions.dcvDelegation;s.push(`Type: CNAME | Name: ${a.cnameName} | Value: ${a.cnameValue} | TTL: 1 Hour`)}h(s.join(` 2`))},"data-testid":"copy-all-dns-records",children:[e.jsx(f,{className:"w-4 h-4 mr-2"}),"Copy All DNS Records"]}),e.jsxs(m,{className:"border-amber-200 bg-amber-50/50",children:[e.jsx(C,{className:"h-4 w-4 text-amber-600"}),e.jsxs(u,{className:"text-amber-800 text-sm space-y-2",children:[e.jsx("p",{children:e.jsx("strong",{children:"Important: Remove old DNS re
2cords first"})}),e.jsxs("p",{children:["If your domain is currently hosted elsewhere (Squarespace, Wix, GoDaddy, etc.), you must ",e.jsx("strong",{children:"delete all existing A records"})," for @ before adding the new ones above. Leaving old A records in place will cause your domain to point to the wrong server."]}),e.jsxs("p",{children:["If you have an existing ",e.jsx("strong",{children:"www CNAME"})," record, edit it to point to ",e.jsx("strong",{children:t.dnsInstructions.wwwCnameValue})," instead of adding a new one."]}),e.jsx("p",{className:"text-xs text-amber-700 mt-1",children:"DNS changes usually take effect within a few minutes, but can take up to 24 hours in rare cases."})]})]})]}):e.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-3 font-mono text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"Type:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:t.dnsInstructions.recordType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"Name / Host:"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"secondary",className:"font-mono",children:t.dnsInstructions.recordName}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(t.dnsInstructions.recordName),"data-testid":"copy-dns-name",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"Value / Points to:"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"secondary",className:"font-mono",children:t.dnsInstructions.recordValue}),e.jsxs(i,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>h(t.dnsInstructions.recordValue),"data-testid":"copy-dns-value",children:[e.jsx(f,{className:"w-3 h-3"}),"Copy"]})]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"TTL:"}),e.jsx(n,{variant:"secondary",className:"font-mono",children:"Auto / 1 Hour"})]})]})]})]}),l&&e.jsxs(N,{className:"border-2","data-testid":"dns-verification-panel",children:[e.jsxs(y,{className:"pb-3",children:[e.jsxs(b,{className:"text-base flex items-center gap-2",children:[l.allRecordsFound?e.jsx(w,{className:"w-4 h-4 text-green-600"}):e.jsx(M,{className:`w-4 h-4 text-blue-600 ${J?"animate-spin":""}`}),"DNS Record Verification",J&&!l.allRecordsFound&&e.jsx(n,{variant:"outline",className:"text-xs text-blue-600 border-blue-300 ml-2",children:"Checking every 30s"})]}),e.jsx(I,{children:l.allRecordsFound?"All DNS records are configured correctly!":"We're checking each DNS record in real time. Green means it's detected."})]}),e.jsxs(v,{className:"space-y-2",children:[l.requiredRecords.map((s,a)=>e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${s.found?"border-green-200 bg-green-50":"border-red-200 bg-red-50/50"}`,"data-testid":`dns-record-status-${s.type.toLowerCase()}-${s.name}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[s.found?e.jsx(w,{className:"w-5 h-5 text-green-600 shrink-0"}):e.jsx(U,{className:"w-5 h-5 text-red-400 shrink-0"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"secondary",className:"font-mono text-xs",children:s.type}),e.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 font-mono truncate max-w-[300px]",children:s.expectedValue})]})]}),e.jsx(n,{variant:s.found?"default":"destructive",className:"text-xs",children:s.found?"Detected":"Not found"})]},a)),l.workerRouteStatus&&e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${l.workerRouteStatus.exists?"border-green-200 bg-green-50":"border-amber-200 bg-amber-50"}`,"data-testid":"worker-route-status",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[l.workerRouteStatus.exists?e.jsx(w,{className:"w-5 h-5 text-green-600 shrink-0"}):e.jsx(C,{className:"w-5 h-5 text-amber-500 shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-medium",children:"Traffic Routing"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:l.workerRouteStatus.message})]})]}),e.jsx(n,{variant:l.workerRouteStatus.exists?"default":"outline",className:"text-xs",children:l.workerRouteStatus.exists?"Active":"Pending"})]}),l.existingRecords.some(s=>s.status==="wrong")&&e.jsxs(m,{className:"border-red-200 bg-red-50 mt-3",children:[e.jsx(C,{className:"h-4 w-4 text-red-600"}),e.jsx(T,{className:"text-red-800 text-sm",children:"Conflicting records detected"}),e.jsx(u,{className:"text-red-700 text-xs space-y-1 mt-1",children:l.existingRecords.filter(s=>s.status==="wrong").map((s,a)=>e.jsxs("div",{className:"font-mono flex items-center gap-2",children:[e.jsx(n,{variant:"destructive",className:"text-xs",children:s.type}),e.jsxs("span",{children:[s.name," â ",s.value]}),e.jsx("span",{className:"text-red-500 font-sans font-medium",children:"â Remove this"})]},a))})]}),e.jsxs("div",{className:"flex justify-between items-center pt-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:l.allRecordsFound?"Click 'Check Status' above to activate your domain.":"DNS changes usually take 5-15 minutes to propagate."}),e.jsxs(i,{variant:"outline",size:"sm",onClick:()=>E(),disabled:X,"data-testid":"refresh-dns-check",children:[X?e.jsx(k,{className:"w-3 h-3 animate-spin mr-1"}):e.jsx(M,{className:"w-3 h-3 mr-1"}),"Check Now"]})]})]})]}),e.jsxs(N,{className:"border-dashed",children:[e.jsxs(y,{className:"pb-3",children:[e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-blue-500"}
2),"Step 2: Where to Add the DNS Record"]}),e.jsx(I,{children:"Select your domain registrar below for step-by-step instructions"})]}),e.jsxs(v,{className:"space-y-2","data-testid":"registrar-guides",children:[e.jsx(P,{registrar:"GoDaddy",steps:ve}),e.jsx(P,{registrar:"Namecheap",steps:we}),e.jsx(P,{registrar:"Google Domains (Squarespace)",steps:Se}),e.jsx(P,{registrar:"Cloudflare",steps:ke}),e.jsx("div",{className:"pt-2",children:e.jsx("p",{className:"text-xs text-muted-foreground",children:'Using a different registrar? Look for "DNS Management", "DNS Settings", or "DNS Records" in your account dashboard. Add a CNAME record with the values shown above.'})})]})]}),e.jsxs(m,{className:"border-blue-200 bg-blue-50",children:[e.jsx(M,{className:"h-4 w-4 text-blue-600"}),e.jsx(T,{className:"text-blue-800",children:"Step 3: Verify Your Domain"}),e.jsxs(u,{className:"text-blue-700 text-sm",children:["After adding the DNS record, click the ",e.jsx("strong",{children:'"Check Status"'})," button above. DNS changes typically take effect within a few minutes, but can take up to 24 hours in rare cases. Once verified, your SSL certificate will be issued automatically (1-5 minutes) and your domain will be live."]})]}),e.jsxs("details",{className:"group","data-testid":"troubleshooting-section",children:[e.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(C,{className:"w-4 h-4"}),"Still not working? Troubleshooting tips",e.jsx(F,{className:"w-4 h-4 transition-transform group-open:rotate-90"})]}),e.jsxs("div",{className:"mt-3 space-y-3 text-sm text-muted-foreground pl-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"DNS hasn't propagated yet"}),e.jsx("p",{children:'DNS changes can take anywhere from 2 minutes to 24 hours. Try clicking "Check Status" again in 15-30 minutes.'})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"Root domain (e.g., yourdomain.com) not working"}),e.jsx("p",{children:`Some registrars don't support CNAME records on the root domain (@). Try using a subdomain instead (e.g., www.yourdomain.com or community.yourdomain.com), or check if your registrar supports "CNAME flattening" or "ALIAS" records.`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"Cloudflare proxy is enabled"}),e.jsx("p",{children:"If you use Cloudflare, make sure the orange cloud (Proxy) toggle is OFF for this record. It should show a gray cloud (DNS only)."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"Existing A record conflict"}),e.jsx("p",{children:"If your domain already has an A record pointing somewhere else, you may need to delete it before the CNAME will work. A records and CNAME records for the same name conflict with each other."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"Wrong DNS record values"}),e.jsxs("p",{children:["Double-check that the Name/Host field matches exactly what's shown above, and the Value/Points to field is exactly ",e.jsx("strong",{children:"subscriberly.ai"})," (no trailing period, no https://)."]})]})]})]})]}),t.domainStatus==="active"&&e.jsxs(m,{className:"border-green-200 bg-green-50",children:[e.jsx(w,{className:"h-4 w-4 text-green-600"}),e.jsx(T,{className:"text-green-800",children:"Domain Active!"}),e.jsxs(u,{className:"text-green-700",children:["Your custom domain is fully configured and serving your community hub.",e.jsx("a",{href:`https://${t.customDomain}`,target:"_blank",rel:"noopener noreferrer",className:"ml-2 underline","data-testid":"link-visit-custom-domain",children:"Visit your site"})]})]})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Me,{htmlFor:"customDomain",children:"Enter your domain"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Pe,{id:"customDomain",placeholder:"events.yourtown.com",value:x,onChange:s=>_(s.target.value.toLowerCase()),"data-testid":"input-custom-domain"}),e.jsxs(i,{onClick:()=>W.mutate(x),disabled:!x||W.isPending,variant:j?.supported?"outline":"default","data-testid":"request-domain",children:[W.isPending?e.jsx(k,{className:"w-4 h-4 animate-spin mr-2"}):null,j?.supported?"Setup Manually":"Connect Domain"]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter the domain you own (without https://). You'll need access to your DNS settings."})]}),xe&&e.jsxs(m,{className:"border-blue-200 bg-blue-50/50",children:[e.jsx(re,{className:"h-4 w-4 text-blue-600 animate-pulse"}),e.jsxs(u,{className:"text-blue-700 text-sm flex items-center gap-2",children:[e.jsx(k,{className:"w-3 h-3 animate-spin"}),"Scanning current DNS records..."]})]}),o&&o.currentHost&&e.jsxs(m,{className:"border-amber-200 bg-amber-50","data-testid":"preflight-warning",children:[e.jsx(C,{className:"h-4 w-4 text-amber-600"}),e.jsxs(T,{className:"text-amber-800",children:["Currently hosted on ",o.currentHost]}),e.jsxs(u,{className:"text-amber-700 text-sm space-y-3 mt-2",children:[e.jsxs("p",{children:["We detected that ",e.jsx("strong",{children:o.domain})," is currently pointing to ",e.jsx("strong",{children:o.currentHost}),". You'll need to remove these existing records before connecting:"]}),o.recordsToDelete.length>0&&e.jsx("div",{className:"bg-amber-100 rounded-lg p-3 space-y-1 font-mono text-xs",children:o.recordsToDelete.map((s,a)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"destructive",className:"text-xs font-mono",children:s.type}),e.jsx("span",{children:s.name}),e.jsx("span",{className:"text-amber-600",children:"â"}),e.jsx("span",{className:"text-amber-800",children:s.value}),e.jsx(n,{variant:"outline",className:"text-xs text-red-600 border-red-300",children:"Delete this"})]},a))}),o.emailWarning&&e.jsxs("p",{className:"text-xs bg-blue-50 border border-blue-200 rounded p-2 text-blue-800",children:[e.jsx("strong",{children:"Email records detected:"})," Your domain has email records (MX). Do NOT delete those â only remove the A and CNAME records shown above."]})]})]}),o&&!o.currentHost&&o.recordsToDelete.length>0&&e.jsxs(m,{className:"border-amber-200 bg-amber-50","data-testid":"preflight-records-found",children:[e.jsx(C,{className:"h-4 w-4 text-amber-600"}),e.jsx(T,{className:"text-amber-800",children:"Existing DNS records foun
2d"}),e.jsxs(u,{className:"text-amber-700 text-sm space-y-3 mt-2",children:[e.jsxs("p",{children:["We found existing DNS records for ",e.jsx("strong",{children:o.domain})," that will need to be removed:"]}),e.jsx("div",{className:"bg-amber-100 rounded-lg p-3 space-y-1 font-mono text-xs",children:o.recordsToDelete.map((s,a)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{variant:"destructive",className:"text-xs font-mono",children:s.type}),e.jsx("span",{children:s.name}),e.jsx("span",{className:"text-amber-600",children:"â"}),e.jsx("span",{className:"text-amber-800",children:s.value}),e.jsx(n,{variant:"outline",className:"text-xs text-red-600 border-red-300",children:"Delete this"})]},a))}),o.emailWarning&&e.jsxs("p",{className:"text-xs bg-blue-50 border border-blue-200 rounded p-2 text-blue-800",children:[e.jsx("strong",{children:"Email records detected:"})," Your domain has email records (MX). Do NOT delete those â only remove the A and CNAME records shown above."]})]})]}),o&&!o.currentHost&&o.recordsToDelete.length===0&&e.jsxs(m,{className:"border-green-200 bg-green-50/50","data-testid":"preflight-clean",children:[e.jsx(w,{className:"h-4 w-4 text-green-600"}),e.jsxs(u,{className:"text-green-700 text-sm",children:[e.jsx("strong",{children:o.domain})," has no conflicting DNS records â you're good to connect!"]})]}),me&&e.jsxs(m,{className:"border-blue-200 bg-blue-50/50",children:[e.jsx(re,{className:"h-4 w-4 text-blue-600 animate-pulse"}),e.jsxs(u,{className:"text-blue-700 text-sm flex items-center gap-2",children:[e.jsx(k,{className:"w-3 h-3 animate-spin"}),"Checking if your registrar supports one-click setup..."]})]}),j?.supported&&j.providerUrl&&e.jsxs(N,{className:"border-green-200 bg-green-50/50","data-testid":"domain-connect-card",children:[e.jsxs(y,{className:"pb-3",children:[e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(ie,{className:"w-4 h-4 text-green-600"}),"One-Click Setup Available"]}),e.jsxs(I,{children:[j.providerName||"Your registrar"," supports automatic DNS configuration"]})]}),e.jsxs(v,{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Instead of manually copying DNS records, you can connect your domain with one click. You'll be redirected to ",j.providerName||"your registrar"," to approve the DNS changes, then sent back here automatically."]}),e.jsxs(i,{className:"w-full",onClick:()=>z.mutate(x),disabled:z.isPending||!x,"data-testid":"button-auto-connect",children:[z.isPending?e.jsx(k,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(ie,{className:"w-4 h-4 mr-2"}),"Connect Automatically via ",j.providerName||"Domain Connect"]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:'Or use the "Setup Manually" button above to copy DNS records yourself'})]})]}),j&&!j.supported&&e.jsxs(m,{className:"border-amber-200 bg-amber-50/50","data-testid":"domain-connect-unsupported",children:[e.jsx(R,{className:"h-4 w-4 text-amber-600"}),e.jsx(u,{className:"text-amber-700 text-sm",children:`Your registrar doesn't support one-click DNS setup. No worries â you can still connect your domain manually using the instructions below after clicking "Connect Domain".`})]}),e.jsxs(N,{className:"border-blue-200 bg-blue-50/50",children:[e.jsx(y,{className:"pb-3",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-blue-500"}),"How to Connect Your Domain"]})}),e.jsx(v,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Enter your domain above"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Type the domain you want to use (e.g., yourbusiness.com or community.yourbusiness.com)"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"2"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"We generate a DNS re
2cord for you"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"You'll see the exact record type, name, and value to copy"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"3"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Log in to your domain registrar"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Go to where you purchased your domain â GoDaddy, Namecheap, Google Domains, Cloudflare, or another provider"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"4"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Navigate to your DNS settings"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:`Usually found under "DNS Management", "Advanced DNS", or "DNS Records" in your registrar's dashboard`})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Add the CNAME record we provide"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Create a new DNS record using the type, name, and value we show you. We'll provide step-by-step instructions for your specific registrar."})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-blue-100 text-blue-700 text-xs font-bold shrink-0 mt-0.5",children:"6"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:'Come back here and click "Check Status"'}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"DNS changes usually take effect within a few minutes, but can take up to 24 hours in rare cases"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-full bg-green-100 text-green-700 text-xs font-bold shrink-0 mt-0.5",children:"7"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Your SSL certificate is issued automatically"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Once DNS is verified, we provision a free SSL certificate in 1-5 minutes. Your domain goes live with HTTPS â no extra setup needed."})]})]})]})})]}),e.jsxs(N,{className:"border-dashed",children:[e.jsx(y,{className:"pb-3",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(w,{className:"w-4 h-4 text-green-500"}),"Before You Start"]})}),e.jsx(v,{children:e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(w,{className:"w-4 h-4 text-green-500 shrink-0 mt-0.5"}),e.jsxs("span",{children:[e.jsx("strong",{children:"You own the domain"})," and can log in to your registrar account (GoDaddy, Namecheap, etc.)"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(w,{className:"w-4 h-4 text-green-500 shrink-0 mt-0.5"}),e.jsxs("span",{children:[e.jsx("strong",{children:"You have access to DNS settings"}),' for that domain (usually under "DNS Management" or "Advanced DNS")']})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(C,{className:"w-4 h-4 text-amber-500 shrink-0 mt-0.5"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Root domain vs. subdomain:"})," If you use your root domain (e.g., yourbusiness.com), it will replace any existing website at that address. To keep an existing site, use a subdomain instead (e.g., community.yourbusiness.com or events.yourbusiness.com)"]})]})]})})]}),e.jsxs(m,{className:"border-emerald-200 bg-emerald-50",children:[e.jsx(ne,{className:"h-4 w-4 text-emerald-600"}),e.jsx(T,{className:"text-emerald-800",children:"Good to Know"}),e.jsxs(u,{className:"text-emerald-700 space-y-1.5 text-sm",children:[e.jsxs("p",{children:["Your ",e.jsx("strong",{children:"subscriberly.ai subdomain will continue to work"})," even after you connect a custom domain. It's always available as a backup."]}),e.jsxs("p",{children:["Connecting a custom domain ",e.jsx("strong",{children:"does not affect your email"}),". Your existing email setup (Gmail, Outlook, etc.) on this domain is completely separate from the web DNS record."]})]})]})]})})]}),e.jsxs(N,{"data-testid":"card-redirects",children:[e.jsxs(y,{children:[e.jsx(b,{className:"text-base",children:"301 Redirects"}),e.jsx(I,{children:"Prevent broken links when migrating from your old website"})]}),e.jsx(v,{children:e.jsx(se,{href:"/admin/redirects",children:e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg hover:bg-muted/50 cursor-pointer transition-colors border","data-testid":"link-redirects",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ae,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Manage Redirects"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Scan your old
2site and set up 301 redirects to preserve SEO and prevent broken links"})]})]}),e.jsx(F,{className:"w-4 h-4 text-muted-foreground"})]})})})]}),e.jsxs(N,{children:[e.jsx(y,{className:"pb-3",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Ye,{className:"w-5 h-5 text-muted-foreground"}),"Frequently Asked Questions"]})}),e.jsxs(v,{"data-testid":"domain-faq-section",children:[e.jsx(p,{question:"Will my subscriberly.ai address still work?",answer:"Yes, always. Your free Subscriberly subdomain (e.g., yourname.subscriberly.ai) continues to work even after you connect a custom domain. Visitors can reach your site from either address."}),e.jsx(p,{question:"Can I use my root domain (e.g., mybusiness.com) instead of a subdomain?",answer:"Yes, you can. However, if you already have a website at that address, connecting it to Subscriberly will replace it. If you want to keep your existing website, use a subdomain like community.mybusiness.com or events.mybusiness.com instead."}),e.jsx(p,{question:"Will connecting my domain affect my email?",answer:"No. The DNS record you add (a CNAME record) only controls where your website traffic goes. It has no effect on your email. Your Gmail, Outlook, or any other email service will continue to work normally. Email uses separate MX records, which are not touched by this setup."}),e.jsx(p,{question:"How long does it take for the domain to go live?",answer:"Usually just a few minutes. After you add the DNS record at your registrar, it typically takes 2-15 minutes for changes to propagate. In rare cases, it can take up to 24 hours. Once verified, the SSL certificate is issued automatically in 1-5 minutes and your domain goes live."}),e.jsx(p,{question:"Can I switch back to my subscriberly.ai address?",answer:"Yes, at any time. Click the remove button next to your custom domain and your site will immediately be available at your subscriberly.ai subdomain again. You can always reconnect a custom domain later."}),e.jsx(p,{question:"Where do I find DNS settings in GoDaddy?",answer:'Log in to GoDaddy, click "My Products" in the top menu, find your domain, and click "DNS" or "Manage DNS". From there, click "Add New Record" to add the CNAME record. Set the Type to CNAME, the Name to @ (or your subdomain), and the Value to subscriberly.ai.'}),e.jsx(p,{question:"Where do I find DNS settings in Namecheap?",answer:'Log in to Namecheap, go to "Domain List" in the left sidebar, click "Manage" next to your domain, then click the "Advanced DNS" tab. Click "Add New Record", set Type to "CNAME Record", Host to @ (or your subdomain), and Value to subscriberly.ai.'}),e.jsx(p,{question:"I added the DNS record but Check Status says it's still pending",answer:"DNS changes can take anywhere from 2 minutes to 24 hours to propagate across the internet. Wait 15-30 minutes and try clicking Check Status again. If it's still pending after 24 hours, double-check that the DNS record values are exactly correct and that there isn't a conflicting A record on the same domain."}),e.jsx(p,{question:"What is a CNAME record?",answer:`A CNAME (Canonical Name) record is a type of DNS record that points your domain to another domain. In this case, it tells the internet "when someone visits mybusiness.com, serve the content from subscriberly.ai." It's one of the most common and safe DNS record types to add.`}),e.jsx(p,{question:"Do I need to set up SSL separately?",answer:"No. Once your domain is verified, we automatically provision a free SSL certificate for your custom domain. Your site will be served over HTTPS with no additional setup required."})]})]})]})]})})}export{Be as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.