Using SSL on an Azure AppService website

Certificate request

Generate a certification request using IIS:

Request a certificate from a certificate signing authority

I used GoDaddy – their certificates were pretty cheap for the first year. I will see who to renew through after a year.

Confirm certificate request

Export certificate

Configure custom domain on Azure


Add the certificate to Azure and create a certificate binding


Finally, add a transform to the release configuration of the web.config file (this forces the entire site to use SSL):

    <rewrite xdt:Transform="Insert">
        <rule name="RedirectToHTTPS">
          <match url="(.*)" />
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
            <add input="{URL}" pattern="/$" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="SeeOther" />





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by

Up ↑

%d bloggers like this: