locked
Best practice for custom subdomain redirection RRS feed

  • Question

  • Please consider this scenario. I have a live web site myservices.mysite.com and I want to send it to an Azure web app with a minimum interruption to my customers.

    This is possible only if I can just add awverify CNAME first and wait for its propagation before changing the subdomain A record.

    Question: Will Azure allow me to add the custom subdomain myservices.mysite.com only by verifying awverify propagation? Or, does it also wait for the main myservices CNAME or A record propagation too? If it waits then there should be a separate tool to verify that awverify has propagated so that I can take the risk of changing the main subdomain A record, hoping that some customers will see the old subdomain and some will see new which is OK. What I don't want is the Azure 404 page that comes up if you set up both subdomain and awverify records at the same time and it takes time to propagate.

    Thanks.

    Saturday, March 26, 2016 4:55 AM

Answers

  • Hello Sanjay,

    The Microsoft Azure Web Sites DNS verification logic has 2 steps:

    • First we try to validate using CNAME. That means we look whether the custom domain provided is a CNAME record. If it is, then it is expanded. If the next record in the chain is also a CNAME, it is further expanded. The expansion goes on until we get an A record or something ending with “azurewebsites.net“. If it is found that the custom domain is eventually pointing to <SITENAME>.azurewebsites.net, it is verified that the <SITENAME> is really the site for which the custom domain is being added and verification is done.

    • If for some reason the validation of the CNAME fails, it proceeds with the alternative validation. That is useful for users when they want to just test their sites, but not really point the record to AZURE, or if it is a naked domain (some DNS registrars don’t support a CNAME for such hostname). The alternative validation puts “awverify” in front of the provided hostname and follows up the similar logic as above. The only difference is that this time the target has to be the awverify.<SITENAME>.azurewebsites.net.

    For more information on this kindly check the following excellent blog by Kaushal.
    https://blogs.msdn.microsoft.com/kaushal/2013/07/05/microsoft-azure-web-sites-how-to-configure-a-custom-domain/

    Regards,
    Ajay

    Saturday, March 26, 2016 1:04 PM
    Owner
  • You can share your site name without posting it publicly by following the instructions here: https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly
    • Marked as answer by SanjaySk Tuesday, March 29, 2016 11:07 AM
    Monday, March 28, 2016 9:41 PM

All replies

  • Hello Sanjay,

    The Microsoft Azure Web Sites DNS verification logic has 2 steps:

    • First we try to validate using CNAME. That means we look whether the custom domain provided is a CNAME record. If it is, then it is expanded. If the next record in the chain is also a CNAME, it is further expanded. The expansion goes on until we get an A record or something ending with “azurewebsites.net“. If it is found that the custom domain is eventually pointing to <SITENAME>.azurewebsites.net, it is verified that the <SITENAME> is really the site for which the custom domain is being added and verification is done.

    • If for some reason the validation of the CNAME fails, it proceeds with the alternative validation. That is useful for users when they want to just test their sites, but not really point the record to AZURE, or if it is a naked domain (some DNS registrars don’t support a CNAME for such hostname). The alternative validation puts “awverify” in front of the provided hostname and follows up the similar logic as above. The only difference is that this time the target has to be the awverify.<SITENAME>.azurewebsites.net.

    For more information on this kindly check the following excellent blog by Kaushal.
    https://blogs.msdn.microsoft.com/kaushal/2013/07/05/microsoft-azure-web-sites-how-to-configure-a-custom-domain/

    Regards,
    Ajay

    Saturday, March 26, 2016 1:04 PM
    Owner
  • Hi Ajay,

    Thanks for responding. But what if there are bugs in your documentation or implementation? Do I have no option but to get paid support in order to report such bugs? I can't post exact addresses giving here, in public forums. For example, last time I found that contrary to what your docs and error message says, for a subdomain the awverify record target also has to have both subdomain and domain in the target. How can I report such problems and get them resolved?

    Thanks,

    Sanjay

    Saturday, March 26, 2016 6:02 PM
  • You can share your site name without posting it publicly by following the instructions here: https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly
    • Marked as answer by SanjaySk Tuesday, March 29, 2016 11:07 AM
    Monday, March 28, 2016 9:41 PM