A production-grade AWS setup using Route 53, ACM, and an Application Load Balancer to serve every request over encrypted HTTPS — with zero-cost certificates and automatic renewal.
dig devops.punedevs.in +trace # traces full DNS path
nslookup devops.punedevs.in # quick lookup
https:// it defaults to port 443. Port 80 (HTTP) is also open on the ALB but exists only to send a 301 Moved Permanently redirect back to the HTTPS URL. This happens before any application data is sent — the redirect itself is unencrypted but contains no sensitive information.devops.punedevs.in A ALIAS my-alb.us-east-1.elb.amazonaws.com
NS records (auto-created):
ns-1234.awsdns-12.com
ns-5678.awsdns-34.co.uk
ns-9012.awsdns-56.net
ns-3456.awsdns-78.org
Action: Redirect
Protocol: HTTPS
Port: 443
Status: 301 (Moved Permanently)
URL: https://#{host}/#{path}?#{query}
Health Check Config:
Protocol: HTTP
Path: /health
Port: traffic-port
Interval: 30 seconds
Threshold: 3 consecutive successes
ACM provides:
Name: _abc123def.devops.punedevs.in
Value: _xyz789ghi.acm-validations.aws.
Add as CNAME in Route 53 → validation complete
*.punedevs.in) covers all subdomains — devops, api, www, staging, etc. — with a single certificate. Combine with a Subject Alternative Name (SAN) for the apex domain to cover everything. Wildcard certs require DNS validation (email validation not supported).Domains covered by one cert:
*.punedevs.in (all subdomains)
punedevs.in (apex domain via SAN)
X-Forwarded-Proto in your app to enforce HTTPS-only logic (e.g. secure cookie flags).Headers added by ALB:
X-Forwarded-For: 203.0.113.45 (original client IP)
X-Forwarded-Proto: https (original protocol)
X-Forwarded-Port: 443 (original port)
EC2 Security Group Inbound Rule:
Type: Custom TCP
Port: 8080 (or your app port)
Source: sg-xxxxxxxx (ALB Security Group ID)
NOT: 0.0.0.0/0 ← never expose directly
https://devops.punedevs.in → browser queries DNS, Route 53 returns ALB DNS name80 → ALB responds with 301 Redirect → :443443 → TLS handshake using ACM certificate completesHTTP to healthy EC2 target with X-Forwarded-* headers