https:// to https://www does not work

0

I created a distribution and in DNS section created A record pointing @klionsky.org to my Destribution

so, https://klionsky.org and http://klionsky.org do work.
However, https://WWW.klionsky.org does not work.
403 ERROR
The request could not be satisfied.
I tried to add CNAME record for www.klionsky.org to resolve to klionsky.org but that did not help.
How can I fix this?
thank you!

Edited by: DanielAT2021 on Jul 14, 2021 11:42 PM

Edited by: DanielAT2021 on Jul 14, 2021 11:43 PM

asked 3 years ago198 views
9 Answers
0

Check your cname...

$ host www.klionsky.org
Host www.klionsky.org not found: 3(NXDOMAIN)

Also, your klionsky.org dns entry is pointing directly to cloudfront / distribution IP addresses. You should use CNAME's for host entries that are using distributions. That way the AWS infrastructure can find the best node to serve the content.

profile picture
David G
answered 3 years ago
0

David,
I probably don't understand your answer.

(A) record has my bare domain name, klionsky.org, that points to the name of my cloudfront / distribution. Is that correct or not?
+
I added CNAME www.klionsky.org pointing to my distribution... However, I'm still getting an error when trying to access www.klionsky.org.

I'm following this article
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-point-domain-to-distribution:

Complete one of the following steps depending on the type of domain that you want to point to your distribution:
Choose an address (A) record to point an apex domain (e.g., example.com) to your distribution.
If an A record for the apex of your domain is already present in your DNS zone, then you will need to edit that existing record instead of adding another A record.
Choose a canonical name (CNAME) to point a sub domain (e.g., website.example.com) to your distribution.

answered 3 years ago
0

I found a problem with my setup:
In my certificate I have had only my bare domain name, klionsky.org. Once I added www.klionsky.org it started to work.
I have had to delete the old certificate and create a new one with both klionsky.org & www.klionsky.org.

answered 3 years ago
0

Could you instead use A entries for the www and non-www versions of the domain and point them to the Cloudfront default domain (eg sjn12b18snb1.cloudfront.net). Please see here: https://i.imgur.com/OFVGKCv.png

I do this and the CDN seems to function correctly.

answered 3 years ago
0

noobnoob wrote:
Could you instead use A entries for the www and non-www versions of the domain and point them to the Cloudfront default domain (eg sjn12b18snb1.cloudfront.net). Please see here: https://i.imgur.com/OFVGKCv.png

Is that route53?

"A" records point to a specific IP address.

"CNAME" records are alias's that point to other records ("A" or "CNAME").

You should always create a CNAME to point to a Lightsail distribution. That way the AWS Cloudfront infrastructure can find the best end point to connect the request to.

profile picture
David G
answered 3 years ago
0

Hi yes it is Route 53.

In the screenshot you can see it is an A record but the option selected is "Alias to Cloudfront distribution", so it is not pointing to a specific IP address.

Therefore I guess the infrastructure is working as intended?

Edited by: noobnoob on Jul 21, 2021 2:11 PM

answered 3 years ago
0

True, it works.
However, the terminology is wrong and will probably lead to confusion and misunderstanding when interacting with people who use the more common terms.

profile picture
David G
answered 3 years ago
0

Yes I only worked it out after some playing around.

answered 3 years ago
0

Yes I only worked it out after some playing around.

answered 3 years 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