CNAME not working in Lightsail Custom Domain

0

I have a domain named 'xyz.com'. Custom domain has the domain in it. It is registered outside AWS and Name Server is pointed to AWS Custom Domain in Lightsail. Here is the setup for it.

  1. Lightsail container hosts NextJS.
  2. AWS Cloudfront CDN in Lightsail points to Lightsail container. AWS ACM has certificate for 'xyz.com' and 'www.xyz.com' and is assigned to it.
  3. Custom domain has A record entry for @.xyz.com pointed to CDN custom domain name. And a CNAME record for 'www.xyz.com' to '@.xyz.com'.

However, when I try to check for CNAME record in DNS checker, I get the error that no CNAME record exists. Also, www.xyz.com does not redirect to xyz.com. I am using SEMRUSH for SEO and I kept getting the duplicate meta tag errors that state that 'www.xyz.com' and 'xyz.com' both have same meta tags.

1 Answer
0

Hello,

I'm sorry to hear about your challenge with using custom domain and a distribution. It sounds like you have a domain that is registered externally but have setup a Hosted Zone inside Lightsail.

  1. Have you confirmed that the ns records for the Lightsail Hosted Zone are setup with the original registrar, making the LS Hosted Zone the active/authoritative one? Lightsail provides guidance here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry
  2. Have you followed the guidance found in this "how to?" https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-point-domain-to-distribution.

The creation of a CNAME record but then DNS checking and not seeing it makes it sound like the original registrar's hosted zone is still the active one. If that's the case, that is issue #1 above, and the linked guidance should help.

Please let us know if you remain blocked and we can try to assist further.

-Andy

AWS
MODERATOR
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions