Skip to content

Commit fe50a46

Browse files
committed
completed refactor
1 parent 82a70f9 commit fe50a46

File tree

5 files changed

+82
-63
lines changed

5 files changed

+82
-63
lines changed

articles/api-management/configure-custom-domain.md

Lines changed: 71 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -27,48 +27,46 @@ When you create an Azure API Management service instance in the Azure cloud, Azu
2727
- An active Azure subscription. [!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
2828
- An API Management instance. For more information, see [Create an Azure API Management instance](get-started-create-service-instance.md).
2929
- A custom domain name that is owned by you or your organization. This topic does not provide instructions on how to procure a custom domain name.
30-
- Optionally, a valid certificate with a public and private key (.PFX). Subject or subject alternative name (SAN) has to match the domain name (this enables API Management instance to securely expose URLs over TLS).
30+
- Optionally, a valid certificate with a public and private key (.PFX). The subject or subject alternative name (SAN) has to match the domain name (this enables API Management instance to securely expose URLs over TLS).
3131

3232
See [Domain certificate options](#domain-certificate-options).
3333

3434
- DNS records hosted on a DNS server to map the custom domain name to the default domain name of your API Management instance. This topic does not provide instructions on how to host the DNS records.
3535

36-
For more information about required records, see [Configure DNS records](#configure-dns-records), later in this article.
36+
For more information about required records, see [DNS configuration ](#dns-configuration), later in this article.
3737

38-
3938
## Endpoints for custom domains
4039

4140
There are several API Management service endpoints to which you can assign a custom domain name. Currently, the following endpoints are available:
4241

4342
| Endpoint | Default |
4443
| -------- | ----------- |
45-
| **Gateway** | Default is: `<apim-service-name>.azure-api.net`. Gateway is the only endpoint available for configuration in the Consumption tier.<br/><br/>The default Gateway endpoint configuration remains after a custom Gateway domain is added. |
44+
| **Gateway** | Default is: `<apim-service-name>.azure-api.net`. Gateway is the only endpoint available for configuration in the Consumption tier.<br/><br/>The default Gateway endpoint configuration remains available after a custom Gateway domain is added. |
4645
| **Developer portal (legacy)** | Default is: `<apim-service-name>.portal.azure-api.net` |
4746
| **Developer portal** | Default is: `<apim-service-name>.developer.azure-api.net` |
4847
| **Management** | Default is: `<apim-service-name>.management.azure-api.net` |
4948
| **SCM** | Default is: `<apim-service-name>.scm.azure-api.net` |
5049

51-
> [!NOTE]
52-
> You can update any of the endpoints supported in your service tier. Typically, customers update **Gateway** (this URL is used to call the API exposed through API Management) and **Portal** (the developer portal URL).
53-
>
54-
> Only API Management instance owners can use **Management** and **SCM** endpoints internally. These endpoints are less frequently assigned a custom domain name.
55-
>
56-
> The **Premium** and **Developer** tiers support setting multiple hostnames for the **Gateway** endpoint.
50+
### Considerations
51+
* You can update any of the endpoints supported in your service tier. Typically, customers update **Gateway** (this URL is used to call the API exposed through API Management) and **Developer portal** (the developer portal URL).
52+
* Only API Management instance owners can use **Management** and **SCM** endpoints internally. These endpoints are less frequently assigned a custom domain name.
53+
* The **Premium** and **Developer** tiers support setting multiple hostnames for the **Gateway** endpoint.
54+
* Wildcard domain names, like `*.contoso.com`, are supported in all tiers except the Consumption tier.
5755

5856
## Domain certificate options
5957

6058
The following table lists the options you have for adding domain certificates in API Management:
6159

6260
|Option|Description|
6361
|-|-|
64-
| Upload a [private certificate](#private-certificate) | If you already have a private certificate from a third-party provider, you can upload it to your API Management instance. |
62+
| Upload a [custom certificate](#custom-certificate) | If you already have a private certificate from a third-party provider, you can upload it to your API Management instance. |
6563
| Import a [certificate from Key Vault](#key-vault-certificate) | Useful if you use [Azure Key Vault](../key-vault/index.yml) to manage your PKCS12 certificates. |
6664
| Enable a free [managed TLS certificate](#managed-tls-certificate) (preview) | A certificate that's free of charge and easy to use if you just need to secure your Gateway domain in your API Management service. |
6765

6866
> [!WARNING]
6967
> If you wish to improve the security of your applications with certificate pinning, you should use a custom domain name and certificate that you manage, not the default certificate or the free managed certificate. We don't recommend taking a hard dependency on a certificate that you don't manage.
7068
71-
### Private certificate
69+
### Custom certificate
7270

7371
If you choose to upload or import a private certificate to API Management, your certificate must meet the following requirements. If you use a free certificate managed by API Management, it already meets these requirements.
7472

@@ -80,16 +78,15 @@ If you choose to upload or import a private certificate to API Management, your
8078

8179
When using [Azure Key Vault for managing certificates](../key-vault/certificates/about-certificates.md), set them to `autorenew`.
8280

83-
If you use Azure Key Vault to manage the custom domain TLS/SSL certificate, make sure the certificate is inserted into Key Vault [as a _certificate_](/rest/api/keyvault/createcertificate/createcertificate), not a _secret_.
81+
If you use Azure Key Vault to manage a custom domain TLS/SSL certificate, make sure the certificate is inserted into Key Vault [as a _certificate_](/rest/api/keyvault/createcertificate/createcertificate), not a _secret_.
8482

8583
To fetch a TLS/SSL certificate, API Management must have the list and get secrets permissions on the Azure Key Vault containing the certificate.
86-
8784
* When using the Azure portal to import the certificate, all the necessary configuration steps are completed automatically.
8885
* When using command line tools or management API, these permissions must be granted manually, in two steps:
89-
1. On the **Managed identities** page of your API Management instance, enable a system-assigned or user-assigned [managed identity](api-management-howto-use-managed-service-identity.md). Note the principal id on that page.
90-
1. Give the list and get secrets permissions to this principal id on the Azure Key Vault containing the certificate.
86+
1. On the **Managed identities** page of your API Management instance, enable a system-assigned or user-assigned [managed identity](api-management-howto-use-managed-service-identity.md). Note the principal Id on that page.
87+
1. Give the list and get secrets permissions to this principal Id on the Azure Key Vault containing the certificate.
9188

92-
If the certificate is set to `autorenew` and your API Management tier has an SLA (i.e., in all tiers except the Developer tier), API Management will pick up the latest version automatically, without any downtime to the service.
89+
If the certificate is set to `autorenew` and your API Management tier has an SLA (i.e., in all tiers except the Developer tier), API Management will pick up the latest version automatically, without downtime to the service.
9390

9491
### Managed TLS certificate
9592

@@ -107,65 +104,83 @@ API Management offers a free, managed TLS certificate for your domain, if you do
107104

108105
## Set a custom domain name - portal
109106

107+
Choose the steps according to the type of domain certificate you want to use.
108+
109+
# [Custom](#tab/custom)
110110
1. Navigate to your API Management instance in the [Azure portal](https://portal.azure.com/).
111111
1. In the left navigation, select **Custom domains**.
112112
1. Select **+Add**, or select an existing [endpoint](#endpoints-for-custom-domains) that you want to update.
113113
1. In the window on the right, select the **Type** of endpoint for the custom domain.
114114
1. In the **Hostname** field, specify the name you want to use. For example, `api.contoso.com`.
115-
1. Under **Certificate**, select one of the following:
116-
- **Key Vault**
117-
- Click **Select**.
118-
- Select the **Subscription** from the dropdown list.
119-
- Select the **Key vault** from the dropdown list.
120-
- Once the certificates have loaded, select the **Certificate** from the dropdown list.
121-
- Click **Select**.
122-
- **Custom**
123-
- Select **Certificate file** to select and upload a certificate.
124-
- Upload a valid .PFX file and provide its **Password**, if the certificate is protected with a password.
125-
- **Managed**
126-
- Select if you want to use a free certificate managed by API Management (available in preview for the Gateway endpoint only).
127-
128-
The DNS TXT record value to configure is displayed. Copy this value to use to [configure a DNS record](#configure-dns-records).
129-
1. When configuring a Gateway endpoint, select or deselect [other options as necessary](#clients-calling-with-server-name-indication-sni-header), like **Negotiate client certificate** or **Default SSL binding**.
130-
1. Select **Update**.
131-
132-
> [!NOTE]
133-
> Wildcard domain names, like `*.contoso.com`, are supported in all tiers except the Consumption tier.
115+
1. Under **Certificate**, select **Custom**
116+
1. Select **Certificate file** to select and upload a certificate.
117+
1. Upload a valid .PFX file and provide its **Password**, if the certificate is protected with a password.
118+
1. When configuring a Gateway endpoint, select or deselect [other options as necessary](#clients-calling-with-server-name-indication-sni-header), including **Negotiate client certificate** or **Default SSL binding**.
119+
:::image type="content" source="media/configure-custom-domain/gateway-domain-custom-certificate.png" alt-text="Configure gateway domain with custom certificate":::
120+
1. Select **Add**, or select **Update** for an existing endpoint.
121+
1. Select **Save**.
134122

135-
136-
1. Click **Apply**.
123+
# [Key vault](#tab/key-vault)
124+
125+
1. Navigate to your API Management instance in the [Azure portal](https://portal.azure.com/).
126+
1. In the left navigation, select **Custom domains**.
127+
1. Select **+Add**, or select an existing [endpoint](#endpoints-for-custom-domains) that you want to update.
128+
1. In the window on the right, select the **Type** of endpoint for the custom domain.
129+
1. In the **Hostname** field, specify the name you want to use. For example, `api.contoso.com`.
130+
1. Under **Certificate**, select **Key Vault** > **Select**.
131+
1. Select the **Subscription** from the dropdown list.
132+
1. Select the **Key vault** from the dropdown list.
133+
1. Once the certificates have loaded, select the **Certificate** from the dropdown list.
134+
1. Click **Select**.
135+
1. When configuring a Gateway endpoint, select or deselect [other options as necessary](#clients-calling-with-server-name-indication-sni-header), including **Negotiate client certificate** or **Default SSL binding**.
136+
:::image type="content" source="media/configure-custom-domain/gateway-domain-key-vault-certificate.png" alt-text="Configure gateway domain with Key Vault certificate":::
137+
1. Select **Add**, or select **Update** for an existing endpoint.
138+
1. Select **Save**.
139+
140+
# [Managed](#tab/managed)
137141

138-
> [!NOTE]
139-
> The process of assigning the certificate may take 15 minutes or more depending on size of deployment. Developer tier has downtime, while Basic and higher tiers do not.
142+
1. Navigate to your API Management instance in the [Azure portal](https://portal.azure.com/).
143+
1. In the left navigation, select **Custom domains**.
144+
1. Select **+Add**, or select an existing [endpoint](#endpoints-for-custom-domains) that you want to update.
145+
1. In the window on the right, select the **Type** of endpoint for the custom domain.
146+
1. In the **Hostname** field, specify the name you want to use. For example, `api.contoso.com`.
147+
1. Under **Certificate**, select **Managed** if you want to use a free certificate managed by API Management. THe managed certificate is available in preview for the Gateway endpoint only.
148+
149+
The **DNS TXT record value** you must [configure in DNS](#dns-configuration) is displayed. Copy this value.
150+
1. When configuring a Gateway endpoint, select or deselect [other options as necessary](#clients-calling-with-server-name-indication-sni-header), including **Negotiate client certificate** or **Default SSL binding**.
151+
:::image type="content" source="media/configure-custom-domain/gateway-domain-free-certifcate.png" alt-text="Configure gateway domain with free certificate":::
152+
153+
1. Select **Add**, or select **Update** for an existing endpoint.
154+
1. Select **Save**.
155+
---
156+
157+
> [!NOTE]
158+
> The process of assigning the certificate may take 15 minutes or more depending on size of deployment. Developer tier has downtime, while Basic and higher tiers do not.
140159
141160
[!INCLUDE [api-management-custom-domain](../../includes/api-management-custom-domain.md)]
142161

143-
## Configure DNS records
162+
## DNS configuration
144163

145-
Configure DNS records for your custom domain in your DNS zone.
164+
Configure a CNAME record for your custom domain.
146165

147-
* [DNS configuration for private certificate](#dns-configuration-for-private-certificate)
148-
* [DNS configuration for managed TLS certificate](#dns-configuration-for-managed-tls-certificate)
166+
When using the API Management's free, managed certificate, also configure a TXT record.
149167

150-
### DNS configuration for private certificate
168+
### CNAME record
151169

152-
When using a private certificate for your custom domain name, it's recommended to configure a CNAME-record that points to the endpoint of your configured custom domain name. A CNAME-record is more stable than an A-record in case the IP changes. Read more in [IP addresses of Azure API Management](api-management-howto-ip-addresses.md#changes-to-the-ip-addresses) and the [API Management FAQ](./api-management-faq.yml#how-can-i-secure-the-connection-between-the-api-management-gateway-and-my-back-end-services-).
170+
Configure a CNAME record that points from your custom domain name (for example, `api.contoso.com`) to your API Management service hostname (for example, `<apim-service-name>.azure-api.net`). A CNAME record is more stable than an A-record in case the IP address changes. For more information, see [IP addresses of Azure API Management](api-management-howto-ip-addresses.md#changes-to-the-ip-addresses) and the [API Management FAQ](./api-management-faq.yml#how-can-i-secure-the-connection-between-the-api-management-gateway-and-my-back-end-services-).
153171

154172
> [!NOTE]
155-
> Some domain registrars only allow you to map subdomains when using a CNAME-record, such as `www.contoso.com`, and not root names, such as `contoso.com`. For more information on CNAME-records, see the documentation provided by your registrar or the [IETF Domain Names - Implementation and Specification](https://tools.ietf.org/html/rfc1035) document.
173+
> Some domain registrars only allow you to map subdomains when using a CNAME record, such as `www.contoso.com`, and not root names, such as `contoso.com`. For more information on CNAME records, see the documentation provided by your registrar or [IETF Domain Names - Implementation and Specification](https://tools.ietf.org/html/rfc1035).
156174
157-
### DNS configuration for managed TLS certificate
175+
### TXT record
158176

159-
When enabling the free, managed certificate for API Management, configure the following required DNS records in your DNS zone. In the following example, the custom domain name is `api.contoso.com`.
177+
When enabling the free, managed certificate for API Management, also configure a TXT record in your DNS zone.
160178

161-
1. Create a TXT record
162-
1. Get a domain ownership identifier by calling the [Get Domain Ownership Identifier](/rest/api/apimanagement/2021-08-01/api-management-service/get-domain-ownership-identifier) REST API.
179+
1. Get a domain ownership identifier by calling the [Get Domain Ownership Identifier](/rest/api/apimanagement/current-ga/api-management-service/get-domain-ownership-identifier) REST API.
163180

164-
This identifier is also displayed in the portal when you select to configure a managed certificate for your Gateway endpoint.
165-
1. Create a TXT record with the name of you custom domain prefixed by `apimuid`. Example name: `apimuid.api.contoso.com`.
166-
1. Assign the domain ownership identifier as the record value.
167-
1. Create a CNAME record
168-
* Point from your custom domain name (`api.contoso.com`) to your API Management service hostname (for example, `<apim-service-name>.azure-api.net`).
181+
This identifier is also displayed in the portal when you select to configure a managed certificate for your Gateway endpoint.
182+
1. Create a TXT record with the name of your custom domain prefixed by `apimuid`. Example name: `apimuid.api.contoso.com`.
183+
1. Assign the domain ownership identifier as the TXT record's value.
169184

170185
## Next steps
171186

50.3 KB
Loading
64 KB
Loading
52.8 KB
Loading

0 commit comments

Comments
 (0)