Hacker News new | ask | show | jobs
by dontwordle 1475 days ago
So you can do this, but it won't support TLS to my knowledge. At least in my testing, it will work to navigate to www.dontwordle.com (you will get redirected to https://dontwordle.com). However, if you tried navigating _directly_ to https://www.dontwordle.com, that would not work. In fact, you can try clicking on https://www.dontwordle.com right now, and it won't work :) To be fair, currently I do not have it implemented exactly the way you described, but I encountered this exact same behavior when I tried it that way
3 comments

Yup, been there. Have a look to see if cloudflare will do what you need within the free plan. You just point it at the bucket, add a rule for the redirect and all the tls is handled for you. It’s pretty painless. Feel free to ping me if you want to run through the steps.
I use the setup described.

It was some tinkering around with bucket name (has to match the subdomain.domain.tld) and the cloudfront origin settings. But it works flawlessly. Feel free to ping me if you need details.

See links below.

coindex.de www.coindex.de

Could try serving a client side redirect. Just an index.html page that has a script that redirects the browser to the https version

    <script>document.location.href = https://dontwordle.com</script>
Assuming that works, I don't see the need for Javascript when a meta refresh achieves the same with just HTML.
Well the game needs JavaScript to run anyway so...

Haven't heard of meta refresh though, thanks for sharing