Skip to content

App TLD with S3 bucket and CNAME

0

Hello,

I have a simple page at the following bucket endpoint: http://www.manger.app.s3-website-us-east-1.amazonaws.com

Works fine, no problems there.

I have a CNAME record www.manger.app. Dig tool gives me the following: ;; ANSWER SECTION: www.manger.app. 3600 IN CNAME www.manger.app.s3-website-us-east-1.amazonaws.com. www.manger.app.s3-website-us-east-1.amazonaws.com. 293 IN CNAME s3-website.us-east-1.amazonaws.com.

If I try to load www.manger.app in my browser, nothing loads. What gives?

asked 2 years ago286 views

2 Answers
1
Accepted Answer

Is your browser trying to force the use of https? My browser is fine for http://www.manger.app but https://www.manger.app times out.

I can also curl the http page, but https similarly times out.

$ curl www.manger.app
<!doctype html>
<html lang="en">
.
[ deleted]
.
</html>
$ curl https://www.manger.app
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.manger.app:443
$

Enter image description here

EXPERT

answered 2 years ago

EXPERT

reviewed 3 months ago

-2

The issue you're experiencing is likely due to a mismatch between your S3 bucket name and your domain name. For S3 static website hosting to work correctly with a custom domain, the bucket name must exactly match the full domain name you're using.

In your case, the S3 bucket is named "www.manger.app", but you're trying to access it via "manger.app". This mismatch is causing the problem.

To resolve this, you have two options:

  1. Create a new S3 bucket named exactly "manger.app" (without the "www"), move your content there, and update your CNAME record to point to "manger.app.s3-website-us-east-1.amazonaws.com".

  2. Keep your current setup, but add a redirect at the domain level. Create a new S3 bucket named "manger.app" (without the "www"), enable website hosting on it, and set up a redirect to "www.manger.app". Then, create an additional DNS record for the apex domain "manger.app" pointing to this new bucket.

Remember to ensure that your bucket policy allows public read access to your objects. Also, make sure that your CNAME record in Route 53 (or your DNS provider) is set up correctly to point to the S3 website endpoint.

If you've recently made these changes, keep in mind that DNS changes can take some time to propagate, sometimes up to 48 hours, although it's usually much quicker.
Sources
Public S3 bucket (web server) returns 404 | AWS re:Post
Website endpoints - Amazon Simple Storage Service

answered 2 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.