Yesterday, I published an article on how to setup SSL on AWS. But, it's become weird when awcodify.com accessed through http://awcodify.com. Seems not consistent. After reading and finding the documentation about how to force HTTP to HTTPS in AWS documentation, finally, I got the answer. And now, I'll share it to you!
Redirect HTTP Using Load Balancer
There are some different ways to force HTTP to HTTPS. Most favourite one is using Nginx configuration. If you're gonna use that approach, go to this article. But if you're following my tutorial before (which is using Load Balancer), I have a solid way to force https because now AWS Load Balancer support for redirection (https://aws.amazon.com/about-aws/whats-new/2018/07/elastic-load-balancing-announces-support-for-redirects-and-fixed-responses-for-application-load-balancer/)
Let's go to the tutorial:
- Go to Load Balancers page
- Select your load balancer and go to
- Check listener for
:80, click edit.
- Now change the configuration like below
SAVAGE! Your website now forced to use HTTPS instead of HTTP 😎