What DNS record do I need to point a domain to EC2?
Create an A record: Type A, Name (api for subdomain or @ for root), Value (your EC2 Elastic IP address), TTL 300 for testing or 3600 for production. This maps the domain name to your server's IP address.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in What Is a Domain Name and How DNS Works A Guide for Node.js Developers
A domain name is a human-readable address for a website (e.g., yourdomain.com) that maps to an IP address. It consists of a TLD (.com), domain (yourdomain), and optional subdomain (api, www). Domain names are memorable, professional, required for SSL, and stable even when IP addresses change.
DNS translates domain names to IP addresses. When you visit a domain, your browser checks cache, then the recursive DNS server, then root nameserver, TLD nameserver, and domain nameserver to get the A record (IP address). This takes milliseconds and is cached at each level.
TTL (Time to Live) is how long DNS servers cache a record before checking for changes. Use 300 seconds (5 min) for testing, 3600 seconds (1 hour) for production, and 86400 seconds (24 hours) for stable records. Shorter TTL means faster propagation but more DNS queries.
Still have questions?
Browse all our FAQs or reach out to our support team
