Multiple Custom domains on API management service

WinTechie 286 Reputation points
2023-12-01T17:44:08.7233333+00:00

Hi

I am looking to configure 2 custom domains on API management service,

First custom domain will cater all API requests for few applications and other should cater for few other applications

However, I don't have option to pick intended base url while creating new API in apim

As only first custom domain is listed in the base url and can't be changed from settings tab of API

Would like to know if there's a way to segregate different APIs into different base custom domain urls

Note: my apim is running with "internal" networking option and all incoming requests from internet are received by external firewall which is further NATted and sent to private ip of apim

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,951 questions
{count} vote

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 23,881 Reputation points
    2023-12-11T09:05:27.2866667+00:00

    @WinTechie Thanks for reaching out. When you create an APIM with no custom domain, the base URL is the default hostname <apimname>.azure-api.net. And when you add custom domains to the API Management instance, the first custom domain added for the gateway endpoint represents the oldest one and will be the default base URL.

    However, you can manipulate the base URL with the feature Default SSL binding. If you have a custom domain with the Default SSL binding option marked, it will be the base URL on the APIM settings section. This does not mean that it is the only domain you can use, but instead, you can use all domains added to the APIM custom domains section as shown below

    User's image

    The default SSL binding is a way to move the base URL between the custom domains. If no SSL binding is clicked, then the first custom domain added for the gateway endpoint would return to be the base URL.

    Regarding segregating APIs based on the base URL, there is no way in the Azure portal to do that. If you are concerned about default certificates issues for the Gateway, you can check out the article How API Management proxy server responds with SSL certificates in the TLS handshake which describes more on that topic.

    For any other questions, feel free to reach out. Would be happy to answer any.