The following forum(s) have migrated to Microsoft Q&A (Preview): Azure App Service - Web Apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

Trouble hosting custom domain with emojis RRS feed

  • Question

  • I was able to successfully add my custom domain containing emojis to my list of assigned custom domains. The web app shows that it is running on the custom domain and the underlying azurewebsites domain works, but when I visit my site on the custom domain I get a 404 error message from Azure.

    If I try to add the punycode url to my custom domains, the validation is not successful.  Seems like Azure is treating the punycode domain and non-encoded emoji domain as different pages.

    This person was having the same problem on StackOverflow, "404 on custom IDN (internationalized domain name) on Azure site", but I do not understand their solution.

    Any suggestions would be appreciated. Thank you

    Thursday, September 12, 2019 12:59 AM

All replies

  • Hi,

    I have a few queries.

    If you browse the URL, does it work fine? Could you share with us your site name or subscription ID indirectly here

    Thursday, September 12, 2019 11:28 AM
  • Thank you for your response. 

    Yes, the site name is bitcoinhistory, and it is working as expected.

    Friday, September 13, 2019 7:48 PM
  • Hi,

    Thanks for your response.

    The custom domain ( might not be pointing to the correct IP address. Have we configured the A- record and C-Name records correctly?

    Please refer this article to update the mappings. This section speaks of adding the CNAME record in your DNS provider.

    Please let me know if this helps.

    Saturday, September 14, 2019 3:52 AM
  • I believe I have added the A and CName records correctly.  The IP address for my A record matches the IP address provided in Azure Portal.

    The custom domain,, shows up in my list of "Assigned Custom Domains".  I am not able to add the punycode version of the URL,, to the "Assigned Custom Domains".

    Note: I could not submit to this form with an emoji in my response, so I replaced the emojis in my URL with the text "emojiEmoji".

    Saturday, September 14, 2019 5:09 AM
  • Thank you for your time on this issue. Please advice if you have further suggestions on how to troubleshoot this problem.

    I can post screenshots from GoDaddy and Azure Portal to show my that my A and CName records are set up correctly when my account gets verified.

    Monday, September 16, 2019 7:24 PM
  • Hi,

    I am investigating the issue. Please allow me sometime and I will update here.

    Tuesday, September 17, 2019 3:29 AM
  • Hi,

    You can achieve this using PowerShell using the following commands

    $webApp = Get-AzureRmWebApp -Name mytestapp -ResourceGroupName myresourcegroup  
    $hostNames = $webApp.HostNames  
    Set-AzureRmWebApp -Name mytestapp -ResourceGroupName myresourcegroup -HostNames $HostNames

    Please let me know if this works.

    Tuesday, September 17, 2019 5:23 AM
  • Unfortunately using PowerShell did not solve the problem, but it was pretty cool and I enjoyed using it from within Azure.

    I retried the entire process of creating a site and connecting it to an emoji URL, but had the same problem that it seems Azure is not handling the punycode URL and the equivalent emoji URL correctly. Azure portal shows site is running on custom domain,, but when page is visited and redirected to punycode URL, Azure throws a 404 error page.

    Below is the PowerShell attempt:

    PS Azure:\> $webApp = Get-AzureRmWebApp -Name whenmoon -ResourceGroupName howmanybitcoinsareleft
    PS Azure:\> $hostNames = $webApp.HostNames
    PS Azure:\> $hostNames.Add("")
    PS Azure:\> Set-AzureRmWebApp -Name whenmoon -ResourceGroupName howmanybitcoinsareleft -HostNames $hostNames

    WARNING: 1:09:23 AM - Could not set custom hostname ''. Details: Microsoft.Azure.Management.WebSites.Models.DefaultErrorResponseException: Operation returned an invalid status code 'BadRequest'...

    Name     State    ResourceGroup        EnabledHostNames        Location
    ----         -----    -------------         ----------------                  --------
    whenmoon Running howmanybitcoinsareleft {,, whenmoon.azurewebsites… Central US
    PS Azure:\>

    (Note: the actual custom domain is 'when"NewMoonEmoji".ws' but this form will not allow emojis in the response)

    Below is Azure Diagnostics showing correct DNS setup

    Diagnose and solve problems>SSL and Domains>Custom Domain Add Operations 

    Current DNS Configuration -1 A

    Current TXT records
    `` TXT ``

    Thursday, September 19, 2019 12:00 AM
  • Hi, 

    Thanks for the update. I will go ahead and investigate this further. I will update you soon

    Thursday, September 19, 2019 7:10 AM
  • Hi

    The custom domain you are trying to add was

    What is used in PS script?

    Thursday, October 3, 2019 5:07 AM

    Is this the hostname we are trying to add ?

    Thursday, October 3, 2019 5:08 AM