Static Web App, Custom Domain using Microsoft 365 admin center

Jimmy Briggs 1 Reputation point
2022-09-04T01:11:46.55+00:00

Trying to create a DNS record in the Microsoft admin center for my domain to point to a static azure web app seems problematic. Azure static web apps do not offer an IP address so I cannot setup and A record (host @). When I try to create a CNAME record with "@" I get the following error: "You can't use the at sign (@) or the domain name as the host name of a CNAME record."

Not sure what to do as I cannot get an IP address for the web app so creating an A record is also not an option. Trying to set the auto-generated domain for the static web app to an A record with host "@" give the following error: "The IP address is not valid. Type a valid IP address, following the standard format of ###.###.###.###"

Any ideas?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
754 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jimmy Briggs 1 Reputation point
    2022-09-04T01:33:25.843+00:00

    I figured I could ping the generated domain and use that ip, just worried it will change.

    0 comments No comments

  2. Luke Murray 10,526 Reputation points MVP
    2022-09-05T08:50:40.237+00:00

    That would work; but there is a likelihood it could change.

    What do you use for your Domain Name management?

    Cloudflare has CNAME flattening at the root level: https://developers.cloudflare.com/dns/additional-options/cname-flattening/

    You could leverage Azure Front Door and Azure DNS as well, for the APEX name to flatten: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-how-to-onboard-apex-domain?pivots=front-door-standard-premium&WT.mc_id=AZ-MVP-5004796#onboard-the-custom-domain-to-your-front-door

    0 comments No comments