Home
Search

Start | Blogs | IT | Free ssl on Azure

2020-01-23

IT

Free SSL/HTTPS on Azure

Apparently all websites on Azure with <name>.azurewebsites.net gets a free wildcard certificate issued by Microsoft. This means that the website you create will automatically get https, for free and without you doing anything.

I have had my website for 6+ months without realizing this. I thought it was a paid feature for basic tier and above but apparently even free tiers gets HTTPS. I tested it out by appending "https://" before my site and lo and behold, https is activated. All I had to do now was to rewrite from HTTP to HTTPS.

My code for rewrite looks like this:

 <rewrite>
<rules>
<clear />
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>

Not only do you get 10 free web apps (permanently?) from Azure but HTTPS as well, automatically! And one year of free SQL database. I pay nothing for my website, web api and database. I almost feel bad for it.