How to redirect from a root domain to www using Azure DNS?

Martin Diaz 6 Reputation points
2020-08-03T20:19:07.92+00:00

Hi,

I have an app deployed to Meteor's Galaxy hosting. Following their docs I added a CNAME record to Azure DNS zone with name "www" that points to "us-east-1.galaxy-ingress.meteor.com".

With that configuration, I can access my app on the url www.mydomain.com, but not on mydomain.com. Meteor's docs explain how to redirect from the root domain to the www subdomain using AWS Route 53. Is it possible to to the same using Azure DNS?

I tried adding an A record, but there isn't a static IP to point to.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
600 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Comvation AG 1 Reputation point
    2020-08-04T15:07:05.76+00:00

    I have exactly the same question.

    I have found this one: https://blog.baeke.info/2019/09/03/back-to-basics-dns-alias-records/ which says that it's needed to add such an ALIAS record to solve this issue.

    But I also haven't found any solution yet with the "Azure DNS" product.

    0 comments No comments

  2. GitaraniSharma-MSFT 47,696 Reputation points Microsoft Employee
    2020-08-05T10:20:17+00:00

    Hello @Martin Diaz ,

    You can use Azure DNS alias records to access the website without prepending "www" to your DNS name.
    An alias record set is supported for the following record types in an Azure DNS zone:

    • A
    • AAAA
    • CNAME

    For example, if your website is named www.contoso.com, your users can access your site using contoso.com without the need to prepend www to the DNS name.

    Please refer : https://learn.microsoft.com/en-us/azure/dns/dns-alias

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.