DNS concepts
A registrar registers domain ownership. Authoritative nameservers serve DNS records; these may be GoDaddy or another provider. An A record maps a name to IPv4, AAAA to IPv6, CNAME aliases one name to another, MX routes email and TXT carries verification/policy text. A DNS record does not contain a URL path or port. TTL controls caching duration, not an exact global propagation stopwatch.
GoDaddy assignment steps
- Allocate/associate a stable EC2 Elastic IP if using a directly exposed single-server lab; review its price.
- Open your domain's DNS management in GoDaddy. Verify the domain actually uses GoDaddy authoritative nameservers. If it uses Route 53 or another provider, change records there instead.
- Add or edit the A record named
@to the EC2 public IPv4. - Add an A record named
learnto the same IP forlearn.your-domain.example, or a CNAMElearnto the root hostname when appropriate. - Remove only conflicting records for that same name/type. Do not delete mail records or unrelated verification records.
- Configure Apache ServerName or Nginx server_name with the exact hostname.
Verify without waiting blindly
# Replace the documentation domain with your owned domain:
dig +short A learn.example.com
dig NS example.com
curl -I --resolve learn.example.com:80:203.0.113.10 http://learn.example.com/The resolve option tests host routing at a chosen IP independently of public DNS. If it works but normal resolution does not, focus on DNS. If both reach the wrong page, inspect virtual-host matching.
Add TLS on Ubuntu
After DNS resolves correctly and 80/443 are reachable, use the installed web-server integration:
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d learn.example.com
sudo certbot renew --dry-runFor Apache use python3-certbot-apache and certbot --apache. On AL2023 follow the current Certbot installation instructions for a supported method; do not assume Ubuntu packages or snap installation applies. An ALB with ACM certificates is an alternative for either OS. Check current ACM export options before assuming a managed certificate can be installed directly on a host.
Validation and diagnosis
Request the HTTPS hostname and inspect expiry, trust chain and redirects. A certificate for example.com does not automatically include learn.example.com. If you publish AAAA, IPv6 must work too. Mixed-content errors occur when an HTTPS page loads insecure resources. HTTP-01 validation requires reachable HTTP challenge paths; DNS-01 requires control of DNS TXT records.
Assignment
Serve root and learn subdomain, document record types and TTL, and demonstrate certificate renewal testing. Remove temporary records only when no other application depends on them.
Official references
Ravindra’s Tip
Domain में port number या /folder नहीं डालते। DNS hostname resolve करता है; बाकी routing web server और application करते हैं।
Interview and revision check
What should you check if DNS resolves but HTTPS reports the wrong name?
Inspect the requested hostname, certificate subject alternative names, selected TLS virtual host and any CDN/ALB certificate association.
Ravindra Bagale · Cloud & DevOps Academy · Handbook and project downloads