Connecting DNS Zone and Azure Static Web apps

Joona Martinkauppi 21 Reputation points
2022-04-11T08:25:42.247+00:00

I have control of domain www.kempeleenpyöräpaja.fi, and I'd like to host my static web apps there. I'v made DNS Zone named "xn--kempeleenpyrpaja-6nb63a.fi" in azure, and changed name servers of domain to match DNS Zones name servers. DNS lookup tools now show Azure as my DNS hosting provider, as it should be.
191815-dns-lookup.png

But when I'm trying to add record set for my DNS Zone, Static Web Apps is unable to validate my DNS Zone. Using DNS name gives error "Name xn--kempeleenpyrpaja-6nb63a.fi is not valid.", and after changing to "www.kempeleenpyöräpaja.fi" it first gives green text "validated", but after refresh it changes to "unknown error".
191825-not-valid.png191816-validated.png191783-failed.png

I tried to add record sets from DNS Zone as alias records, and found my swa under Azure resources. I added both a and www record sets, but navigating to my home page still gives 404 error. Feels like I'm missing something important, pls help :D
191784-recordsets.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,209 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 19,511 Reputation points
    2022-04-20T09:41:16.537+00:00

    Update: The issue is resolved, sharing resolution here for wider community.

    Resolution: Its recommended to avoid domains with special characters as they often confuse the algorithms not only in your hosting or registrar settings, but also those related to searches on a global scale.
    Hosting a site with a new domain, without special characters resolved the issue.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Joona Martinkauppi 21 Reputation points
    2022-04-13T09:32:16.743+00:00

    Some updates:

    Looks like problem is Static web app failing to convert my IDN to punycode. I changed "www.kempeleenpyöräpaja.fi" to my default domain in swa, and now navigating to original url https://icy-pebble-087498103.1.azurestaticapps.net/ redirects to https://www.xn--kempeleenpyrpaja-3ra63an3ac.fi/. Converting it back to text with online tools gives result "https://www.kempeleenpyã¶rã¤paja.fi/".

    (changed default url back to original, if someone is wondering why there's no redirect any more)

    Is there anything I can do to fix it? Trying to add domain as punycode results an error. Problem might be related to encoding used to read original url, but I'm way too incompetent to know for sure :D

    0 comments No comments

  2. SnehaAgrawal-MSFT 19,511 Reputation points
    2022-04-13T09:34:50.03+00:00

    Thanks for asking question! If I am understanding right you are using Azure DNS to host your DNS domain and manage your DNS records.

    Suggest you to refer this guide which demonstrates how to configure your domain name with the www subdomain. Once this procedure is complete, you can set up an apex domain.

    It seems Value is missing in your DNS record set. you need add Alias icy-pebble-087498103.1.azurestaticsapp.net

    Could you please Create DNS records in Azure DNS by confirming below values and then Configure static web app custom domain.

    192634-staticwebapp.png

    Please let us know if further query or issue remains.

    0 comments No comments

  3. Joona Martinkauppi 21 Reputation points
    2022-04-13T09:57:41.717+00:00

    Hi, thanks for answering!

    Yes, I am using DNS Zones. I Changed my CNAME Record back to non-alias, tried it earlier as well but hoped alias record would work better. Is it ok now? https://mxtoolbox.com/SuperTool.aspx?action=a%3awww.kempeleenpy%c3%b6r%c3%a4paja.fi&run=toolpage

    Looks like I'm getting new error while trying to configure swa
    192628-cname-record-invalid.png

    0 comments No comments

  4. PK 0 Reputation points
    2023-01-17T11:21:08.76+00:00

    Any updates on this? The accepted answer is not a solution, it's a bit biased due to what seems to be lacking support for following the specifications in Static Web apps

    0 comments No comments