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.
- Go to godaddy.com and sign in (or create an account and verify your e-mail/mobile).
- Search for the name you want, e.g.
yourdomain.com, and compare extensions such as.com,.inand.online. - 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.
- Check the registration period and the renewal terms, and enable domain privacy if offered.
- Complete the purchase and click the verification e-mail for the registrant contact, or the domain can be suspended.
- Open My Products (or Domain Portfolio) – your domain appears with GoDaddy's default name servers.
Point it to EC2 (GoDaddy DNS):
- My Products → Domains → click your domain → DNS (or Manage DNS).
- 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). - Set Value / Points to = your Elastic IP
203.0.113.10, TTL = 600 seconds (or Custom → 600) → Save. - Find the CNAME record
www. Make sure its value is@(meaningexample.com). If it is missing, Add New Record → CNAME, Namewww, Value@. - 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. - 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 @.
Ravindra Bagale's Tip – मराठी
नवीन domain वर GoDaddy चा "parked" A record आधीपासूनच असतो. बरेच students नवीन A record जोडतात पण जुना delete करत नाहीत – मग visitors कधी तुमच्या server वर, कधी parking page वर जातात. @ साठी एकच A record ठेवा.
Ravindra Bagale's Tip – हिंदी
नए domain पर GoDaddy का "parked" A record पहले से होता है. बहुत से students नया A record जोड़ते हैं पर पुराना delete नहीं करते – फिर visitors कभी तुम्हारे server पर, कभी parking page पर पहुँचते हैं. @ के लिए एक ही A record रखो.
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.