Ravindra BagaleCourses & study guides

12. Domains and DNS: GoDaddy, Elastic IP, A/CNAME and Subdomains

12.3 Buying a Domain on GoDaddy and Pointing It to EC2

GoDaddy chi website vela-velela badalte, tyamule buttons chi naave thodi vegli asu shaktat – flow matra tach rahto. Kontyahi prices ithe dile nahit – official site var check kara.

  1. Go to godaddy.com and sign in (or create an account and verify your e-mail/mobile).
  2. Search for the name you want, e.g. yourdomain.com, and compare extensions such as .com, .in and .online.
  3. Add the domain to the cart and review the add-ons carefully: e-mail plans, website builders, SSL certificates and hosting are not needed for EC2 hosting (we use free Let's Encrypt certificates). Remove what you don't need.
  4. Check the registration period and the renewal terms, and enable domain privacy if offered.
  5. Complete the purchase and click the verification e-mail for the registrant contact, or the domain can be suspended.
  6. Open My Products (or Domain Portfolio) – your domain appears with GoDaddy's default name servers.

Point it to EC2 (GoDaddy DNS):

  1. My Products → Domains → click your domain → DNS (or Manage DNS).
  2. In the DNS Records list, find the A record with name @. A new domain usually points it to GoDaddy's "Parked" page. Click Edit (pencil icon).
  3. Set Value / Points to = your Elastic IP 203.0.113.10, TTL = 600 seconds (or Custom → 600) → Save.
  4. Find the CNAME record www. Make sure its value is @ (meaning example.com). If it is missing, Add New Record → CNAME, Name www, Value @.
  5. Delete any extra A records for @ that still point to parking/forwarding IPs, and turn off Forwarding if it was enabled. Two different A records for the same name make visitors randomly land on the wrong server.
  6. Leave NS, SOA and any MX/TXT records (email, verification) as they are.

The DNS table should look like this:

Type Name Value TTL
A @ 203.0.113.10 600 seconds
CNAME www @ 1 hour
A blog 203.0.113.10 600 seconds
NS @ ns51.​domaincontrol.​com (do not edit) 1 hour

Usually the new A record works within minutes. Verify with dig (Chapter 12) before blaming the web server.

Using another registrar?

Namecheap: Domain List → Manage → Advanced DNS. Hostinger: Domains → DNS / Nameservers. The same records apply: A @ → Elastic IP, CNAME www → root domain.

Why this matters for security

Your registrar account controls where your whole domain points. If an attacker takes it over, they can redirect your site and e-mail. Enable two-step verification on the GoDaddy (or any registrar) account and keep the registrant e-mail secure.

Ravindra Bagale's Tip

A new domain already has GoDaddy's "parked" A record. Many students add a new A record but don't delete the old one – then visitors sometimes reach your server and sometimes the parking page. Keep only one A record for @.

Lab

If you own a domain, point @ to your Elastic IP and www to @. If you don't, add 203.0.113.10 yourdomain.com style entries to your laptop's hosts file with your Elastic IP and continue with the same steps.