I have an NGINX ubuntu server hosted on AWS LightSail. it correctly resolves with http(s)://yourdomain.com domain names, but will not work with www.yourdomain.com.
I have tried setting an A type record pointed at the IP and a CNAME record pointing at the subdomain yourdomain.com. -> following this documentation https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-route-53-to-point-a-domain-to-an-instance (as well as just CNAME)
I have tried setting the A record to www pointing to the IP. -> using this documentation https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started-s3.html#getting-started-create-alias
I don't get any errors, looking in my NGINX logs there is nothing so the DNS is not resolving the name as far as I can tell.
I have heard conflicting information on how long it take this record to show up.
I am wondering if I need to go back into the server to make changes to the configuration file. I know that when I request the SSL certificate I only used the non www domain because of issues getting the www one running at that point.
anyway, help is always appreciated!
Same issue happened to me. I was trying to create new A and CNAME records in Route 53 in hosted zone. But heres how i resolved it: Go to Lightsail. Domains and DNS. Select your Domain Name. Go to advanced and create a new A record point to your static IP address.