- Newest
- Most votes
- Most comments
I would expect A record to work as you described, but for some reason this exact case (www.example.com -> example.com) is implemented with CNAME in Lightsail DNS documentation. If you haven't tested this yet, give it a try.
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-dns-in-amazon-lightsail
For example, in the Lightsail DNS zone, you want to direct web traffic for www.example.com to example.com. You would create an alias CNAME record for www with a "resolves to" address of example.com.
PS. You didn't say what is the actual DNS name, but I assumed it sufirestaurant.com you would want to answer also at www.sufirestaurant.com. This could be helpful in finding your problem.
Google DNS says there is something wrong with your configuration of nameservers. Here is a similar problem and solution to it. https://repost.aws/questions/QUIFrDzqQ9QnCDMNBSk-625w/problem-with-lame-delegation-in-my-dns-records
$ dig @8.8.8.8 www.sufirestaurant.com
; <<>> DiG 9.10.6 <<>> @8.8.8.8 www.sufirestaurant.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 28264
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
; OPT=15: 00 00 5b 32 30 35 2e 32 35 31 2e 31 39 35 2e 31 38 30 5d 20 4c 61 6d 65 20 64 65 6c 65 67 61 74 69 6f 6e 20 61 74 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 20 66 6f 72 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 2f 61 ("..[205.251.195.180] Lame delegation at www.sufirestaurant.com for www.sufirestaurant.com/a")
; OPT=15: 00 00 5b 32 36 30 30 3a 39 30 30 30 3a 35 33 30 30 3a 37 36 30 30 3a 3a 31 5d 20 4c 61 6d 65 20 64 65 6c 65 67 61 74 69 6f 6e 20 61 74 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 20 66 6f 72 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 2f 61 ("..[2600:9000:5300:7600::1] Lame delegation at www.sufirestaurant.com for www.sufirestaurant.com/a")
; OPT=15: 00 00 5b 32 30 35 2e 32 35 31 2e 31 39 39 2e 31 39 36 5d 20 4c 61 6d 65 20 64 65 6c 65 67 61 74 69 6f 6e 20 61 74 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 20 66 6f 72 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 2f 61 ("..[205.251.199.196] Lame delegation at www.sufirestaurant.com for www.sufirestaurant.com/a")
; OPT=15: 00 00 5b 32 30 35 2e 32 35 31 2e 31 39 37 2e 31 39 35 5d 20 4c 61 6d 65 20 64 65 6c 65 67 61 74 69 6f 6e 20 61 74 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 20 66 6f 72 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 2f 61 ("..[205.251.197.195] Lame delegation at www.sufirestaurant.com for www.sufirestaurant.com/a")
; OPT=15: 00 16 41 74 20 64 65 6c 65 67 61 74 69 6f 6e 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 20 66 6f 72 20 77 77 77 2e 73 75 66 69 72 65 73 74 61 75 72 61 6e 74 2e 63 6f 6d 2f 61 ("..At delegation www.sufirestaurant.com for www.sufirestaurant.com/a")
;; QUESTION SECTION:
;www.sufirestaurant.com. IN A
;; Query time: 187 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Oct 09 23:42:18 EEST 2023
;; MSG SIZE rcvd: 505
Thank you Kallu, As a last resort I tried to setup the Route 53 and point it to the IP address used thinking that may resolve the WWW issue but it is not so I deleted the zone and all the records are on the Lightsail Zones.. ! I have A record with WWW subdomain point the the ip address but it seems it is not resolving !
Dear Kallu, Thank you so much for the help in this matter. The issue is fixed ! I think I made a mistake of adding unnecessary NS server records to the DNS zone ! once I removed them all works very well. Thank you
That makes perfect sense (extra server causing issues you saw). If you feel this is was helpful in finding that, please consider accepting the answer ;-)
Relevant content
- asked 10 months ago
- asked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
Thank you Kallu, It wont let me to add CNAME, the A record is there but it does not replicate !
What if you would first remove the A record for www and then add www.example.com CNAME example.com ?
Hi KalLu, I have tried that but it give an error >>Input error: CNAME record can't co-exist with other records in this subdomain www.example.com !! also there was A record for WWW , I removed it so that DNS accept CNAME but still gives error ! do you think it is DNS cache causing this ?