Add and manage TLS/SSL certificates - Azure App Service (2024)

  • Article

You can add digital security certificates to use in your application code or to secure custom DNS names in Azure App Service, which provides a highly scalable, self-patching web hosting service. Currently called Transport Layer Security (TLS) certificates, also previously known as Secure Socket Layer (SSL) certificates, these private or public certificates help you secure internet connections by encrypting data sent between your browser, websites that you visit, and the website server.

The following table lists the options for you to add certificates in App Service:

OptionDescription
Create a free App Service managed certificateA private certificate that's free of charge and easy to use if you just need to secure your custom domain in App Service.
Import an App Service certificateA private certificate that's managed by Azure. It combines the simplicity of automated certificate management and the flexibility of renewal and export options.
Import a certificate from Key VaultUseful if you use Azure Key Vault to manage your PKCS12 certificates. See Private certificate requirements.
Upload a private certificateIf you already have a private certificate from a third-party provider, you can upload it. See Private certificate requirements.
Upload a public certificatePublic certificates aren't used to secure custom domains, but you can load them into your code if you need them to access remote resources.

Prerequisites

  • Create an App Service app. The app's App Service plan must be in the Basic, Standard, Premium, or Isolated tier. See Scale up an app to update the tier.

  • For a private certificate, make sure that it satisfies all requirements from App Service.

  • Free certificate only:

    • Map the domain where you want the certificate to App Service. For information, see Tutorial: Map an existing custom DNS name to Azure App Service.

    • For a root domain (like contoso.com), make sure your app doesn't have any IP restrictions configured. Both certificate creation and its periodic renewal for a root domain depends on your app being reachable from the internet.

Private certificate requirements

The free App Service managed certificate and the App Service certificate already satisfy the requirements of App Service. If you choose to upload or import a private certificate to App Service, your certificate must meet the following requirements:

  • Exported as a password-protected PFX file, encrypted using triple DES.
  • Contains private key at least 2048 bits long
  • Contains all intermediate certificates and the root certificate in the certificate chain.

To secure a custom domain in a TLS binding, the certificate has more requirements:

  • Contains an Extended Key Usage for server authentication (OID = 1.3.6.1.5.5.7.3.1)
  • Signed by a trusted certificate authority

Note

Elliptic Curve Cryptography (ECC) certificates work with App Service but aren't covered by this article. For the exact steps to create ECC certificates, work with your certificate authority.

Note

After you upload a private certificate to an app, the certificate is stored in a deployment unit that's bound to the App Service plan's resource group, region, and operating system combination, internally called a webspace. That way, the certificate is accessible to other apps in the same resource group and region combination. Private certificates uploaded or imported to App Service are shared with App Services in the same deployment unit.

Create a free managed certificate

The free App Service managed certificate is a turn-key solution for securing your custom DNS name in App Service. Without any action from you, this TLS/SSL server certificate is fully managed by App Service and is automatically renewed continuously in six-month increments, 45 days before expiration, as long as the prerequisites that you set up stay the same. All the associated bindings are updated with the renewed certificate. You create and bind the certificate to a custom domain, and let App Service do the rest.

Important

Before you create a free managed certificate, make sure you have met the prerequisites for your app.

Free certificates are issued by DigiCert. For some domains, you must explicitly allow DigiCert as a certificate issuer by creating a CAA domain record with the value: 0 issue digicert.com.

Azure fully manages the certificates on your behalf, so any aspect of the managed certificate, including the root issuer, can change at anytime. These changes are outside your control. Make sure to avoid hard dependencies and "pinning" practice certificates to the managed certificate or any part of the certificate hierarchy. If you need the certificate pinning behavior, add a certificate to your custom domain using any other available method in this article.

The free certificate comes with the following limitations:

  • Doesn't support wildcard certificates.
  • Doesn't support usage as a client certificate by using certificate thumbprint, which is planned for deprecation and removal.
  • Doesn't support private DNS.
  • Isn't exportable.
  • Isn't supported in an App Service Environment (ASE).
  • Only supports alphanumeric characters, dashes (-), and periods (.).
  • Only custom domains of length up to 64 characters are supported.
  • Apex domain
  • Subdomain
  • Must have an A record pointing to your web app's IP address.
  • Isn't supported on apps that aren't publicly accessible.
  • Isn't supported with root domains that are integrated with Traffic Manager.
  • Must meet all the above for successful certificate issuances and renewals.
  1. In the Azure portal, from the left menu, select App Services > <app-name>.

  2. On your app's navigation menu, select Certificates. In the Managed certificates pane, select Add certificate.

    Add and manage TLS/SSL certificates - Azure App Service (1)

  3. Select the custom domain for the free certificate, and then select Validate. When validation completes, select Add. You can create only one managed certificate for each supported custom domain.

    When the operation completes, the certificate appears in the Managed certificates list.

    Add and manage TLS/SSL certificates - Azure App Service (2)

  4. To secure a custom domain with this certificate, you still have to create a certificate binding. Follow the steps in Secure a custom DNS name with a TLS/SSL binding in Azure App Service.

Import an App Service certificate

To import an App Service certificate, first buy and configure an App Service certificate, then follow the steps here.

  1. In the Azure portal, from the left menu, select App Services > <app-name>.

  2. From your app's navigation menu, select Certificates > Bring your own certificates (.pfx) > Add certificate.

  3. In Source, select Import App Service Certificate.

  4. In App Service certificate, select the certificate you just created.

  5. In Certificate friendly name, give the certificate a name in your app.

  6. Select Validate. When validation succeeds, select Add.

    Add and manage TLS/SSL certificates - Azure App Service (3)

    When the operation completes, the certificate appears in the Bring your own certificates list.

    Add and manage TLS/SSL certificates - Azure App Service (4)

  7. To secure a custom domain with this certificate, you still have to create a certificate binding. Follow the steps in Secure a custom DNS name with a TLS/SSL binding in Azure App Service.

Import a certificate from Key Vault

If you use Azure Key Vault to manage your certificates, you can import a PKCS12 certificate into App Service from Key Vault if you met the requirements.

Authorize App Service to read from the vault

By default, the App Service resource provider doesn't have access to your key vault. To use a key vault for a certificate deployment, you must authorize read access for the resource provider to the key vault.

Note

Currently, a Key Vault certificate supports only the Key Vault access policy, not RBAC model.

Resource providerService principal AppIdKey vault secret permissionsKey vault certificate permissions
Microsoft Azure App Service or Microsoft.Azure.WebSites- abfa0a7c-a6b6-4736-8310-5855508787cd, which is the same for all Azure subscriptions

- For Azure Government cloud environment, use 6a02c803-dafd-4136-b4c3-5a6f318b4714.

GetGet
Microsoft.Azure.CertificateRegistrationGet
List
Set
Delete
Get
List

Import a certificate from your vault to your app

  1. In the Azure portal, from the left menu, select App Services > <app-name>.

  2. From your app's navigation menu, select Certificates > Bring your own certificates (.pfx) > Add certificate.

  3. In Source, select Import from Key Vault.

  4. Select Select key vault certificate.

    Add and manage TLS/SSL certificates - Azure App Service (5)

  5. To help you select the certificate, use the following table:

    SettingDescription
    SubscriptionThe subscription associated with the key vault.
    Key vaultThe key vault that has the certificate you want to import.
    CertificateFrom this list, select a PKCS12 certificate that's in the vault. All PKCS12 certificates in the vault are listed with their thumbprints, but not all are supported in App Service.
  6. When finished with your selection, select Select, Validate, then Add.

    When the operation completes, the certificate appears in the Bring your own certificates list. If the import fails with an error, the certificate doesn't meet the requirements for App Service.

    Add and manage TLS/SSL certificates - Azure App Service (6)

    Note

    If you update your certificate in Key Vault with a new certificate, App Service automatically syncs your certificate within 24 hours.

  7. To secure a custom domain with this certificate, you still have to create a certificate binding. Follow the steps in Secure a custom DNS name with a TLS/SSL binding in Azure App Service.

Upload a private certificate

After you get a certificate from your certificate provider, make the certificate ready for App Service by following the steps in this section.

Merge intermediate certificates

If your certificate authority gives you multiple certificates in the certificate chain, you must merge the certificates following the same order.

  1. In a text editor, open each received certificate.

  2. To store the merged certificate, create a file named mergedcertificate.crt.

  3. Copy the content for each certificate into this file. Make sure to follow the certificate sequence specified by the certificate chain, starting with your certificate and ending with the root certificate, for example:

    -----BEGIN CERTIFICATE-----<your entire Base64 encoded SSL certificate>-----END CERTIFICATE----------BEGIN CERTIFICATE-----<The entire Base64 encoded intermediate certificate 1>-----END CERTIFICATE----------BEGIN CERTIFICATE-----<The entire Base64 encoded intermediate certificate 2>-----END CERTIFICATE----------BEGIN CERTIFICATE-----<The entire Base64 encoded root certificate>-----END CERTIFICATE-----

Export merged private certificate to PFX

Now, export your merged TLS/SSL certificate with the private key that was used to generate your certificate request. If you generated your certificate request using OpenSSL, then you created a private key file.

Note

OpenSSL v3 changed default cipher from 3DES to AES256, but this can be overridden on the command line -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -macalg SHA1.OpenSSL v1 uses 3DES as default, so the PFX files generated are supported without any special modifications.

  1. To export your certificate to a PFX file, run the following command, but replace the placeholders <private-key-file> and <merged-certificate-file> with the paths to your private key and your merged certificate file.

    openssl pkcs12 -export -out myserver.pfx -inkey <private-key-file> -in <merged-certificate-file> 
  2. When you're prompted, specify a password for the export operation. When you upload your TLS/SSL certificate to App Service later, you must provide this password.

  3. If you used IIS or Certreq.exe to generate your certificate request, install the certificate to your local computer, and then export the certificate to a PFX file.

Upload certificate to App Service

You're now ready upload the certificate to App Service.

  1. In the Azure portal, from the left menu, select App Services > <app-name>.

  2. From your app's navigation menu, select Certificates > Bring your own certificates (.pfx) > Upload Certificate.

    Add and manage TLS/SSL certificates - Azure App Service (7)

  3. To help you upload the .pfx certificate, use the following table:

    SettingDescription
    PFX certificate fileSelect your .pfx file.
    Certificate passwordEnter the password that you created when you exported the PFX file.
    Certificate friendly nameThe certificate name that will be shown in your web app.
  4. When finished with your selection, select Select, Validate, then Add.

    When the operation completes, the certificate appears in the Bring your own certificates list.

    Add and manage TLS/SSL certificates - Azure App Service (8)

  5. To secure a custom domain with this certificate, you still have to create a certificate binding. Follow the steps in Secure a custom DNS name with a TLS/SSL binding in Azure App Service.

Upload a public certificate

Public certificates are supported in the .cer format.

Note

After you upload a public certificate to an app, it is only accessible by the app it is uploaded to. Public certificates must be uploaded to each individual web app that needs access. For App Service Environment specific scenarios, refer to the documentation for certificates and the App Service Environment

You can upload up to 1000 public certificates per App Service Plan.

  1. In the Azure portal, from the left menu, select App Services > <app-name>.

  2. From your app's navigation menu, select Certificates > Public key certificates (.cer) > Add certificate.

  3. To help you upload the .cer certificate, use the following table:

    SettingDescription
    CER certificate fileSelect your .cer file.
    Certificate friendly nameThe certificate name that will be shown in your web app.
  4. When you're done, select Add.

    Add and manage TLS/SSL certificates - Azure App Service (9)

  5. After the certificate is uploaded, copy the certificate thumbprint, and then review Make the certificate accessible.

Renew an expiring certificate

Before a certificate expires, make sure to add the renewed certificate to App Service, and update any certificate bindings where the process depends on the certificate type. For example, a certificate imported from Key Vault, including an App Service certificate, automatically syncs to App Service every 24 hours and updates the TLS/SSL binding when you renew the certificate. For an uploaded certificate, there's no automatic binding update. Based on your scenario, review the corresponding section:

  • Renew an uploaded certificate
  • Renew an App Service certificate
  • Renew a certificate imported from Key Vault

Renew uploaded certificate

When you replace an expiring certificate, the way you update the certificate binding with the new certificate might adversely affect user experience. For example, your inbound IP address might change when you delete a binding, even if that binding is IP-based. This result is especially impactful when you renew a certificate that's already in an IP-based binding. To avoid a change in your app's IP address, and to avoid downtime for your app due to HTTPS errors, follow these steps in the specified sequence:

  1. Upload the new certificate.

  2. Go to the Custom domains page for your app, select the ... actions button, and select Update binding.

  3. Select the new certificate and select Update.

  4. Delete the existing certificate.

Renew a certificate imported from Key Vault

Note

To renew an App Service certificate, see Renew an App Service certificate.

To renew a certificate that you imported into App Service from Key Vault, review Renew your Azure Key Vault certificate.

After the certificate renews inside your key vault, App Service automatically syncs the new certificate, and updates any applicable certificate binding within 24 hours. To sync manually, follow these steps:

  1. Go to your app's Certificate page.

  2. Under Bring your own certificates (.pfx), select the ... details button for the imported key vault certificate, and then select Sync.

Frequently asked questions

  • How can I automate adding a bring-your-owncertificate to an app?
  • Frequently asked questions for App Service certificates

How can I automate adding a bring-your-owncertificate to an app?

  • Azure CLI: BindacustomTLS/SSLcertificatetoawebapp
  • Azure PowerShell Bind a custom TLS/SSL certificate to a web app using PowerShell

Can I configure a private CA certificate on my app?

App Service has a list of Trusted Root Certificates which you cannot modify in the multi-tenant variant version of App Service, but you can load your own CA certificate in the Trusted Root Store in an App Service Environment (ASE), which is a single-tenant environment in App Service. (The Free, Basic, Standard, and Premium App Service Plans are all multi-tenant, and the Isolated Plans are single-tenant.)

  • Private client certificate

More resources

  • Secure a custom DNS name with a TLS/SSL binding in Azure App Service
  • Enforce HTTPS
  • Enforce TLS 1.1/1.2
  • Use a TLS/SSL certificate in your code in Azure App Service
  • FAQ : App Service Certificates
Add and manage TLS/SSL certificates - Azure App Service (2024)

FAQs

How to enable TLS 1.2 in Azure App Service? ›

Follow these steps:
  1. In the Azure portal, search for and select Microsoft Entra ID.
  2. In the Overview page menu, select Sign-in logs.
  3. Select a sign-in log entry for a user.
  4. Select the Additional details tab. ...
  5. Check for a Legacy TLS (TLS 1.0, 1.1, or 3DES) value that's set to True.
Apr 11, 2024

How to add certificate in app service in Azure? ›

In the Azure portal, from the left menu, select App Services > <app-name>. On your app's navigation menu, select Certificates. In the Managed certificates pane, select Add certificate. Select the custom domain for the free certificate, and then select Validate.

How do I add SSL certificate to Azure function app? ›

In the Azure portal, from the left menu, select App Services > <app-name>. From the left navigation of your app, select Certificates, then select Bring your own certificates (. pfx) or Public key certificates (. cer).

How to disable TLS 1.0 and 1.1 on Azure App Service? ›

If you want to disable all inbound TLS 1.0 and TLS 1.1 traffic for all of the apps in an App Service Environment, you can set the following clusterSettings entry: "clusterSettings": [ { "name": "DisableTls1.

Should app service apps use the latest TLS version? ›

App Service uses TLS 1.2 by default, which is the recommended TLS level by industry standards, such as PCI DSS. App Service currently allows web apps to set TLS versions 1.0, 1.1 and 1.2. It is highly recommended to use the latest TLS 1.2 version for a secure connection.

Where can I see if TLS 1.2 is enabled? ›

In the Windows menu search box, type Internet options. Under Best match, click Internet Options. In the Internet Properties window, on the Advanced tab, scroll down to the Security section. Check the User TLS 1.2 checkbox.

How to configure TLS certificate? ›

Go to Security > TLS management > Self-managed certificates. From the Upload key or certificate menu, select Add a new key or certificate. We recommend generating a new key for the new certificate. Drag and drop the key file into the drag and drop area for key files.

How do I add Auth to Azure App Service? ›

In Overview, select your app's management page. On your app's left menu, select Authentication, and then select Add identity provider. In the Add an identity provider page, select Microsoft as the Identity provider to sign in Microsoft and Microsoft Entra identities.

Which Azure service should you use to store certificates? ›

Key Vault is an Azure service that helps safeguard cryptographic keys and secrets used by cloud applications and services. For App Service certificates, the storage of choice is Key Vault.

What is an SSL certificate in Azure? ›

To secure web servers, a Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), certificate can be used to encrypt web traffic. These TLS/SSL certificates can be stored in Azure Key Vault, and allow secure deployments of certificates to Linux virtual machines (VMs) in Azure.

How to check if certificate pinning is enabled in Azure? ›

Unfortunately, there is no way to see certificate pinning from Azure. This is more of an internal application configuration. "Typically, an application contains a list of authorized certificates or properties of certificates including Subject Distinguished Names, thumbprints, serial numbers, and public keys.

How to install SSL certificate in was app server? ›

Apply custom keystore and truststore to the server
  1. In WebSphere Administrative Console, select Security > SSL certificate and key management.
  2. Click Manage endpoint security configuration. ...
  3. Under Inbound, select direct child of nodes.
  4. Under Related items, select SSL configurations.
  5. Select NodeDeafultSSLSetting.
May 21, 2024

What is the minimum inbound TLS version for Azure App Service? ›

It's generally recommended for customers to use TLS 1.2 or above as the minimum TLS version. When creating a web app, the default minimum TLS version would be TLS 1.2. To ensure backward compatibility for TLS 1.0 and TLS 1.1, App Service will continue to support TLS 1.0 and 1.1 for incoming requests to your web app.

How do I turn off TLS 1.0 and 1.1 registry? ›

Disable TLS 1.0 or 1.1 via Registry

Create a new subkey called "TLS 1.0 or 1.1" under Protocols. Create a new subkey called "Server" under TLS 1.0 or 1.1. In the Server key, create a DWORD DisabledByDefault entry, set the value to 1. Reboot the server.

How do I disable TLS 1.0 on Client? ›

To disable TLS 1.0 for client or server, change the DWORD value to 0. If an SSPI app requests to use TLS 1.0, it will be denied. To disable TLS 1.0 by default, create a DisabledByDefault entry and change the DWORD value to 1. If an SSPI app explicitly requests to use TLS 1.0, it may be negotiated.

How do I enable TLS 1.2 protocol? ›

Google Chrome
  1. Open Google Chrome.
  2. Click Alt F and select Settings.
  3. Scroll down and select Show advanced settings...
  4. Scroll down to the Network section and click on Change proxy settings...
  5. Select the Advanced tab.
  6. Scroll down to Security category, manually check the option box for Use TLS 1.1 and Use TLS 1.2.
  7. Click OK.
Nov 1, 2023

How do I enable TLS 1.2 in Azure Devops? ›

Use the following steps to configure TLS 1.2 on your client.
  1. Run PowerShell as administrator.
  2. To set TLS 1.2 for the current PowerShell session, type: Azure PowerShell Copy. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12.
May 24, 2023

How do I enable HTTP 2.0 in Azure App Service? ›

Scroll down the selected "App Services" left navigation panel and under "Settings" click on the "Configuration" option. On the "Configuration" page select the "General settings" tab, scroll down and under the "HTTP version" check the value. It's recommended to use version 2.0 to improve performance.

How do I enable HTTPS in Azure App Service? ›

To enable HTTPS on a custom domain, follow these steps:
  1. Go to the Azure portal to find a certificate managed by your Azure CDN. ...
  2. Choose your profile: ...
  3. In the list of CDN endpoints, select the endpoint containing your custom domain. ...
  4. In the list of custom domains, select the custom domain for which you want to enable HTTPS.
Jun 21, 2024

Top Articles
Food Storage for One Year
Supply And Demand In Currency Markets
Mchoul Funeral Home Of Fishkill Inc. Services
Netr Aerial Viewer
Promotional Code For Spades Royale
Dte Outage Map Woodhaven
Ups Dropoff Location Near Me
South Park Season 26 Kisscartoon
Ds Cuts Saugus
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
877-668-5260 | 18776685260 - Robocaller Warning!
DL1678 (DAL1678) Delta Historial y rastreo de vuelos - FlightAware
Walgreens Alma School And Dynamite
Clafi Arab
Baseball-Reference Com
The Binding of Isaac
Scholarships | New Mexico State University
10 Best Places to Go and Things to Know for a Trip to the Hickory M...
Inside the life of 17-year-old Charli D'Amelio, the most popular TikTok star in the world who now has her own TV show and clothing line
Swgoh Turn Meter Reduction Teams
Bank Of America Financial Center Irvington Photos
Timeforce Choctaw
Downtown Dispensary Promo Code
Umn Biology
Neteller Kasiinod
Emuaid Max First Aid Ointment 2 Ounce Fake Review Analysis
Noaa Marine Forecast Florida By Zone
Nacogdoches, Texas: Step Back in Time in Texas' Oldest Town
Black Adam Showtimes Near Amc Deptford 8
Felix Mallard Lpsg
Ross Dress For Less Hiring Near Me
Ferguson Showroom West Chester Pa
The Angel Next Door Spoils Me Rotten Gogoanime
All-New Webkinz FAQ | WKN: Webkinz Newz
Gamestop Store Manager Pay
Tinfoil Unable To Start Software 2022
[Teen Titans] Starfire In Heat - Chapter 1 - Umbrelloid - Teen Titans
Trending mods at Kenshi Nexus
Dragon Ball Super Card Game Announces Next Set: Realm Of The Gods
Hello – Cornerstone Chapel
Dying Light Mother's Day Roof
Best Restaurant In Glendale Az
Suppress Spell Damage Poe
Gear Bicycle Sales Butler Pa
Zom 100 Mbti
Black Adam Showtimes Near Cinemark Texarkana 14
Att Corporate Store Location
Intuitive Astrology with Molly McCord
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 6299

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.