Secure an Azure App Service with an App Service Managed Certificate
Tags: azure, tutorial, cloud, wordpress
Published: 2021-02-24 10:32:34

###### Originally published at [www.foteinisavvidou.codes](https://www.foteinisavvidou.codes/secure-an-azure-app-service-with-an-app-service-managed-certificate/)

In the previous tutorial, you mapped a custom domain name to your website by using a CNAME record. In the last tutorial of “Host WordPress on Microsoft Azure” tutorial series, you will protect your custom domain with a free App Service Managed Certificate.

To complete the exercise, you will need:
* An Azure subscription.
* A WordPress website running on Azure or another Azure App Service app with a valid custom domain connected to it. Note that the App Service Managed Certificate can only protect subdomains.

### Check the pricing tier of the App Service plan
To protect a custom domain with an SSL certificate, your App Service plan must be in **Basic** tier or higher.
1. Sign in to [Azure Portal](https://portal.azure.com/), expand the left navigation panel and select **All resources**.
2. Select the **App Service** that you have created in the part 1.
3. In the left pane, select **Scale Up (App Service Plan)** in the Settings section.
4. If the app is in the **F1** or **D1** tier, select one of the **Basic**, **Standard**, **Premium**, or **Isolated** tiers and click **Apply**. If your app isn’t in the **F1** or **D1** tier, skip this step.

### Create a free certificate
In Azure App Service you can easily protect your domain names with SSL certificates. You can either upload your own certificate, buy a certificate, or use the free App Service Managed Certificate.

**App Service Managed Certificate** is a fully functional TLS/SSL certificate that is managed by App Service. It does not support wildcard certificates and naked domains and it is not exportable.

1. In the left pane, select **TLS/SSL Settings**.
2. Click on **Private Key Certificates (.pfx)** and then select **Create App Service Managed Certificate** to create a new certificate.
![Create App Service Managed Certificate](https://www.foteinisavvidou.codes/wp-content/uploads/2021/01/1-SSL-settings-1024x427.png)
3. In the new tab, select your domain name and click **Create** to create the certificate.
![Create App Service Managed Certificate](https://www.foteinisavvidou.codes/wp-content/uploads/2021/01/2-create-certificate.png)
4. Go to the **Bindings** tab and select **Add TLS/SSL Binding**.
![Add binding](https://www.foteinisavvidou.codes/wp-content/uploads/2021/01/3-bindings-1024x429.png)
5. Select the domain name and the certificate you have just created and click **Add Binding**.
![Add binding](https://www.foteinisavvidou.codes/wp-content/uploads/2021/01/4-add-binding.png)

You can learn more about [App Service Managed Certificate](https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificate#create-a-free-certificate-preview) on Microsoft Docs.

### Next steps
That’s it! You have successfully created a WordPress website running on Microsoft Azure, connected a custom domain to it and protected the app with an SSL certificate. You are now ready to launch your new website!