How to add custom domain and SSL certificate to Azure App Service

Add Custom Domain

Make sure to use the domain which is under your own ownership.

  • Select A record or CNAME from the Hostname record type drop down. More about CNAME and A record can be found here.
  • Validate the domain ownership by adding TXT record and CNAME/A record (based on the selection above) in the domain registrar. Steps to edit/add CNAME/A record in GoDaddy can be found here.

Add SSL Binding

  • Obtain SSL certificate. More steps on generating free SSL certificate using ZeroSSL can be found here.
  • The certificate from ZeroSSL is not in .pfx format. To convert .crt to .pfx using OpenSSL, follow the answer given in this Stack Overflow question. Make sure to remember the password.
  • In Azure portal →App Service → Custom domains → Click Add binding on the domain added.
  • Upload the .pfx file and enter the password.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store