Engine Room
Engine Room

Reputation: 63

How to host subdomain only in Azure while hosting main domain elsewhere?

I currently have a domain name, lets call it contoso.com, whose registrar is Go Daddy and the DNS is currently managed by (for the sake of discussion) Super WordPress Provider where the main website lives (i.e. the domain name at Go Daddy points to the nameservers at Super WordPress Provider). I'd like to create an API on Azure that lives at 'api.contoso.com' but also keep my WP site at Super WordPress Provider for the main domain. Is there a way to set up just api.contoso.com on Azure while leaving the main domain unchanged?

I tried creating an 'A' record at Super WordPress Provider for api.contoso.com but it wants me to enter an IP address but when I created a DNS Zone in Azure for api.contoso.com, it doesn't seem to provide an IP address.

Upvotes: 1

Views: 694

Answers (2)

Luis Rivera
Luis Rivera

Reputation: 54

If you need the IP address of the App Service, you should find the IP address under Your App Service> Custom domains: click here to see image

You can set the A record, however you will also set the TXT as follows:

Host :ASUID.SUBDOMAIN Value: Verification ID

Keep in mind that it is recommended to use a CNAME

Upvotes: 1

Noah Stahl
Noah Stahl

Reputation: 7623

You shouldn't need to use Azure's DNS if you already have the DNS elsewhere. For Azure App Service as an example, just use your current DNS provider to map api.contoso.com to the service URL (your-azure-app.azurewebsites.net) using a CNAME, as described here.

Upvotes: 3

Related Questions