Error adding www subdomain to Static Web App

MK 0 Reputation points
2023-01-11T23:52:06.8766667+00:00

I have an Azure Static Web App that is functioning fine on one domain that is registered with GoDaddy. The DNS zones are managed in Azure.

We need to add a different domain name as well. This one is registered with AWS (Route 53 domain service). We do not manage the AWS domain. However, the owners have changed the DNS servers to point to the Azure DNS zone we set up for it. This has been verified with NS lookups.

However, when we try to Add custom domain on Azure DNS and enter www./domainname/.tld (real name redacted), we get the following error:

"Failed to add custom domain to SWA with error message: CNAME Record is invalid. Please ensure the CNAME record has been created."

Considering that this process worked fine for the GoDaddy registered domain, is there a problem with this process for AWS registered domains? Or another step we are missing in this case?

Thank you

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

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,301 Reputation points Moderator
    2023-01-12T04:15:17.6266667+00:00

    Hi MK, based on this Github thread it seems like this is a known scenario. Below is the workaround that was suggested:

    "So we believe the problem is caused by the presence of CAA records in your custom domain's parent domain, which prevents the SWA platform from provisioning a certificate. For example, if you are trying to add yoursite.mydomain.com to the SWA and you have incompatible CAA records at mydomain.com (the parent domain), we will be unable to issue a certificate and the overall custom domain add process will fail.

    You can either

    1. remove these CAA records, or
    2. add a new CAA record to enable our certificate provider, DigiCert, to issue certificates for your domain. this would be of the form mydomain.com CAA 0 issue "digicert.com"

    After the record changes propagate, you should be able to try again. "

    Hope that helps. Please let us know if you have further questions

    Thanks,

    Grace


    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.