Typically 5 minutes to 1 hour for new records. Changes to existing records depend on the TTL (5 min for testing, 1 hour for production). Full global propagation can take up to 24 hours. Check with dnschecker.org or whatsmydns.net.
How long does DNS propagation take?
More FAQs in Configuring DNS Records for AWS EC2 A Records, CNAME, and Subdomains
First allocate an Elastic IP and associate it with your instance. Then create an A record in your DNS provider: Type A, Name @ (for root) or api (for subdomain), Value (your Elastic IP). Verify with dig yourdomain.com A +short.
The default public IP changes when you stop and start the EC2 instance. An Elastic IP is a static IP that persists across stop/start cycles. Without it, your DNS A record would point to the wrong IP after a restart.
Create an A record: Type A, Name api, Value (your Elastic IP). Then add an Nginx server block with server_name api.yourdomain.com and the appropriate proxy_pass or root. Finally, get SSL with sudo certbot --nginx -d api.yourdomain.com.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.