After setting TheCodeUniverse.com with Let’s Encrypt SSL, I was able to access the website with both HTTP and HTTPS. I started looking around to find a way to turn off the HTTP. Then I found this web page here which showed two ways to do that. The first way, the developer’s way, is to edit the web.config. The second way is to log into the Azure portal and install the ‘Redirect HTTP to HTTPS’ extension. The second way seemed to be easy enough. However, I discovered the third way which I called it the “easiest way” to force redirect HTTP to HTTPS.
You can follow the four steps below to do it. It’s literally taken four clicks and you’re done after logging into the Azure portal:
- Click on “App Services”.
- Click on the web app that you want to force HTTPS. In my case, I clicked TheCodeUniverse.
- Click on Custom Domain.
- Click on HTTPS only.
You can refer to the images below for the four steps.