How to Install SSL Certificate on Microsoft Azure for an Application

Steps to Install SSL on Microsoft Azure

Initial Checklist

microsoft azure logoThe following process must be completed before you start SSL certificate installation on your Microsoft Azure.

  • Buy/renew SSL Certificate
  • Generate CSR with SHA-2 algorithm
  • Save the CSR & Private key file on your server
  • Apply for SSL Certificate Issuance
  • Submit SSL Certificate issuance documents as per CA’s requirement (Only for Extended & Organization Validation)

Step 1: Download SSL Certificate Files

Once you send documents to CA (Certificate Authority), they will verify it and accepts if all documents are correct. After that, they will send you SSL certificate via email. Download that SSL certificate file and store it on your web server.

Step 2: Update the service definition and configuration files

To use the SSL successfully, your Azure App must add the HTTPS endpoint, and for that you need to update your service definition and configuration files.

  • Open the Service Defecation file (CSDEF) from the Development Environment.
  • Here, you need to add a new Certificate section under the WebRole section. Add following information to do the same.
<WebRole name="CertificateTesting" vmsize="Small">
        <Certificate name="SampleCertificate"
                     permissionLevel="limitedOrElevated" />
        <!-- Instruction - Here you also need to add the Intermediate SSL Certificate. -->

        <Certificate name="CAForSampleCertificate"
                     permissionLevel="limitedOrElevated" />


Here, the PermissionLevel attibute carries two values either limitedOrElevated or elevated, so select it carefully.

  • limitedOrElevated = Private key is accessible for all processes
  • elevated = Private key is accessible for elevated process.

Here, the certificate section displays the name and the path of the primary certificate file.

  • Add the InputEndpoint section within Endpoints section using following code.
<WebRole name="CertificateTesting" vmsize="Small">
        <InputEndpoint name="HttpsIn" protocol="https" port="443"
            certificate="SampleCertificate" />
  • Now add a new Binding section within the Sites section, this will add the HTTPS binding which maps the endpoint to your site.
<WebRole name="CertificateTesting" vmsize="Small">
        <Site name="Web">
                <Binding name="HttpsIn" endpointName="HttpsIn" />
  • Add the certificate section under the Role section using following code.
<Role name="Deployment">
        <Certificate name="SampleCertificate"
            thumbprintAlgorithm="sha2" />

Here you need to replace the thumbprint value with your SSL certificate data.

  • Save the Service configuration file.

Step 3: Uploading Deployment Package & Certificate

  • Login to your Microsoft Azure Account via here.
  • Click on New > Cloud Service > Custom Create one by one
  • Create a Cloud Service dialog will appear, here you need to add the URL, Region & subscription. Don’t forget to check Deploy a cloud service package now.
  • Click on Next button now.
  • In Publish your cloud service dialog, add the required details for the cloud service. For the environment select Production, please make sure Add certificates now is checked.
  • For single instance role check “Deploy even if one or more roles contain a single instance”.
  • Click on the Next
  • Add Certificate dialog will appear, here browse for your SSL certificate file & enter appropriate password and then click on attach certificate
  • Your SSL certificate file will appear under ATTACHED CERTIFICATES tab
  • To create the cloud service click on the Complete One the deployment reaches to ready status you can proceed to the next step.

Step 4: Role instance connection using HTTPS

Now your deployment is up to ready status, so you can connect Azure with HTTPS.

  • In your Azure Management Portal, select your deployment and then click on the website link under the SITE URL.
  • If your website link is without HTTP then modify it with HTTPS and run it again.

About SSL

AboutSSL was established with the sole purpose to provide an all-around SSL/TLS knowledge platform to everyone. It’s our dream to see every single website on the Internet securely encrypted, and we’re proud to contribute our bit to this grand vision. We understand that SSL can be a difficult thing to deal with, especially to users from a non-technical background.

Download Site Seal
SSL Checker

Pin It on Pinterest

Share This