import { Copy, HelpCircle, Server } from "lucide-react"; import { toast } from "sonner"; import { AlertBlock } from "@/components/shared/alert-block"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; interface Props { domain: { host: string; https: boolean; path?: string; }; serverIp?: string; } export const DnsHelperModal = ({ domain, serverIp }: Props) => { const copyToClipboard = (text: string) => { navigator.clipboard.writeText(text); toast.success("Copied to clipboard!"); }; return ( DNS Configuration Guide Follow these steps to configure your DNS records for {domain.host}
To make your domain accessible, you need to configure your DNS records with your domain provider (e.g., Cloudflare, GoDaddy, NameCheap).

1. Add A Record

Create an A record that points your domain to the server's IP address:

Type: A

Name: @ or {domain.host.split(".")[0]}

Value: {serverIp || "Your server IP"}

2. Verify Configuration

After configuring your DNS records:

  • Wait for DNS propagation (usually 15-30 minutes)
  • Test your domain by visiting:{" "} {domain.https ? "https://" : "http://"} {domain.host} {domain.path || "/"}
  • Use a DNS lookup tool to verify your records
); };