Export SSL certificate to PFX and add to Azure Web Apps

The article is a short guide or even a small cheat sheet for activating your SSL certificate to Azure Web Apps.

The article is not about what SSL certificates are for assuming that you already know. Also for more detail tutorial, you can check out Microsoft article called Bind an existing custom SSL certificate to Azure Web Apps.

When you purchase SSL certificate from a Certificate authority (CA), you are receiving the certificate and the private key. They could be and just plain text within an email or files that can open with any text editor for example Notepad.

The certificate or a chain of certificates begin and end with the following format:

-----BEGIN CERTIFICATE-----
<longstring>
-----END CERTIFICATE-----

Additionally, you are receiving a private key in a separate file or email with a similar format:

-----BEGIN PRIVATE KEY-----
<longstring>
-----END PRIVATE KEY-----

Different platforms support different formats for SSL certificates like .cer, .pfx, .pvk or in plain text. In this case Azure requires PFX.