<p>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.</p>

<p>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.</p>

<p>See <a href="https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serve-static-website/" rel="nofollow noreferrer">How do I use CloudFront to serve a static website hosted on Amazon S3?</a>  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.</p>

CC BY-SA 4.0
2019-07-28T22:23:49.890Z
2019-07-28T22:23:49.890Z
Michael - sqlbot
<p>I followed these instructions to redirect:</p>

<pre><code>platform.demo.interos.net
</code></pre>

<p>to</p>

<pre><code>platform.demo.interos.io
</code></pre>

<p>The instructions use s3 for static site hosting and use the redirect option:  <a href="https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/" rel="nofollow noreferrer">https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/</a></p>

<p>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:</p>

<pre><code>curl -I platform.demo.interos.net
</code></pre>

<p>I get:</p>

<pre><code>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
</code></pre>

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

<p><strong>UPDATE</strong>:</p>

<p>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? </p>

<p>For example: </p>

<pre><code>curl -I https://platform.demo.interos.net
</code></pre>

<p>will not resolve. but this will resolve:</p>

<pre><code>curl -I platform.demo.interos.net
</code></pre>

<amazon-web-services><amazon-s3>
s3 static hosting not redirecting my request
Alexander Mills
# s3 static hosting not redirecting my request

(Asked by: username_0 on 2019-07-28)

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

**Tags:** amazon-web-services, amazon-s3


---

## 1 answers

### Answer by username_1 on 2019-07-28. Score: 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?](https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serve-static-website/) 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.


---

