0

I followed these instructions to redirect:

platform.demo.interos.net

to

platform.demo.interos.io

The instructions use s3 for static site hosting and use the redirect option: https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/

But when I use the browser, the browser won't actually redirect me from the .net to the .io page, it just hangs. But when I run this:

curl -I platform.demo.interos.net

I get:

HTTP/1.1 301 Moved Permanently
x-amz-id-2: E4VM/vr+1HtO6Q0vvCNL16nxxxxxxFDvvgPW+EjI4g9Zk=
x-amz-request-id: 175E9039358ECD1B
Date: Sun, 28 Jul 2019 19:30:09 GMT
Location: https://platform.demo.interos.io/
Content-Length: 0
Server: AmazonS3

So what's not working here - why doesn't the browser recognize the 301 and do the redirection?

UPDATE:

I now realize it's because in the browser address bar it often adds an https:// in front, and with the protocol in front, it will not redirect. Anyone know why?

For example:

curl -I https://platform.demo.interos.net

will not resolve. but this will resolve:

curl -I platform.demo.interos.net
1

The blog post you're following is somewhat obsolete, or at least incomplete in today's environment, because S3's web site hosting endpoints don't support HTTPS at all. The request will time out.

To enable HTTPS on a custom domain pointing to a bucket, you need a certificate issued in the us-east-1 region of Amazon Certificate Manager (or you can purchase one from a third party and load it into ACM there) and then a CloudFront distribution to handle the HTTPS and forward the request to S3.

See How do I use CloudFront to serve a static website hosted on Amazon S3? Note that these instructions are still applicable even though you aren't, strictly speaking, "hosting a static web site" on S3. You're still using the static hosting feature and this is how you enable HTTPS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.