Adding SSL to our Azure Node app

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
No comments yet. Be the first to comment.
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

So far, we had some cool introductions to Azure, exploring the following topics.
In this article, we will learn how to bind an SSL to our custom domain in the Azure App.
Having an SSL on a domain is very important. Most browsers are even blocking non-secure websites, so it's a no-go not to have a SSL.
Note: Like the custom domain, this is not available on the free tier!
There are quite a few options when it comes to adding an SSL to a domain.
The simplest way you can go is by buying an SSL from an authority like Comodo, or your domain provider.
For me, I'm going with a free alternative 💸.
We can go for Let's Encrypt, but it's a bit difficult to get that working on Azure, so in our instance, we are using ZeroSSL.
Let's start by getting our actual certificate from ZeroSSL. Visit the Zero SSL website and fill out your domain in the header section.

We can then create a free account.

In the following section, we can finalise the details for our SSL certificate. In the first section, we select the 90-day option since that's free.
We do have to re-enter every 90 days (us cheapskates)

In step two, we check the option to generate the CSR automatically. We don't want to do this ourselves.

In step three, we select the free option.

In the next step, we select our verification method. For me, using the DNS option is the quickest way, so I'm choosing that one.

At this point, we need to go to our domain registrar (Netlify for me) and visit our DNS section.
Add a new DNS record that will have the following setup.

Once we added this, head back to ZeroSSL and click "Verify Domain".
You can then download the default ZIP from here.

Now that we have our SSL, we can go ahead and add it to our Azure App Service.
Go to your App Service in Azure and click the "Custom Domains" option.

If you do not already have a custom domain, view this article on adding an Azure custom domain).
We can then click on the "Add Binding" option. A side-draw will open up.

As you can see, in the above screenshot, it's asking for a PFX Certificate.
We did not receive that from ZeroSSL, so we need to convert our existing certificate.
Visit SSL Shopper Converted and upload the received documents.
As output, you can choose PFX.
We need to provide the following details:
You must use a password to make it valid for Azure.

Now head back to Azure and click Upload PFX Certificate.
Choose the PFX certificate and password you used above.

Be aware; It might take some time before it's valid (5-10 minutes)
On the next step, select the options from the dropdown.

Now, if we click Finish, we have a secure domain!

And if we visit our secure domain, we can inspect our certificate to see it works.

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter