Add custom domain to Azure web app without validation - azure

I am on a project that is re-platforming a site from a web server to an Azure PaaS web app, in addition the site will have all new content and in some cases new URLs. We have some redirects in place to handle the mapping of old URL's to new ones. I would like to test that these redirects work correctly on my new azure web app. Normally I would update my hosts file to point at the new server, add an IIS binding so the correct website picks it up and go from there. However I don't seem to be able to bind a new hostname ("custom domain") without verifying that I own the new host name. It will just be my internal DNS that I will be altering to re-route my requests. Does anyone know how to add a custom domain in the azure web apps without validating? This doesn't sound like a big ask to me.
Thanks
Will

You can't do it without any verification, but you can do it without pointing traffic away from your existing site to your new site.
To verify you own the domain without redirecting traffic to it yet, create a DNS record called a TXT record with your domain registrar.
the "TXT host" should be
awverify.mysubdomain.mydomain.com
or
awverify.mydomain.com
The "value" should be
myapp.azurewebsites.net
just replace "mysubdomain" and "mydomain" and "myapp" with your specific info.
After you do this, the verification should succeed and you can add the custom hostname.
Here is more info about this: https://learn.microsoft.com/en-us/azure/app-service/manage-custom-dns-migrate-domain

You can use either a CNAME record or an A record to map a custom DNS name to App Service.
We recommend that you use a CNAME for all custom DNS names except a root domain.
If you missed a step or made a typo somewhere earlier, you see a verification error at the bottom of the page.
If you will use A record, you can create a TXT record to map to the app's default hostname .azurewebsites.net. App Service uses this record only at configuration time, to verify that you own the custom domain. After your custom domain is validated and configured in App Service, you can delete this TXT record.
Reference: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain.

Related

Azure app service wrong redirection for new domain

I acquired a new domain name in Azure (let's say mynewdomain.net), assigned it to my app service, bought a certificate also in Azure and made the bindings. Apparently both the domain and certificate are properly configured.
When I invoke the domain in any browser like https://mynewdomain.net, I get redirected to https://mynewdomain.net/mynewdomain.net, and of course fails.
The problem must be very simple, but I have no clue! Can anyone point me in the right direction here?
Thanks!
To create a CNAME mapping for the www subdomain, create two records: CNAME and TXT records.
After you add the CNAME and TXT records, the DNS records page looks like the following example:
To map an A record, you need the app's external IP address. You can find this IP address on the app's Custom Domains page in the Azure portal.
After the records are added, the DNS records page looks like the following example:
For more details, you could refer to this article about mapping an existing custom DNS name to Azure App Service.

Azure CDN connect custom domain

I have static website on azure storage, it's connected to azure cdn to have https, and i have my custom domain folla.com.pl I want this domain to point to https://companywebsitecdn.azureedge.net/ which is address of my website on azure cdn. I chose custom domain on cdn configuration site, it asks me to make dns mapping to verify ownership, so i make CNAME cdnverify.folla.com.pl to cdnveriy.companywebsitecdn.azureedge.net and it get me to other window with custom doamin https config. And here's my problem, it get's stuck on second step
How I'm suppouse to configure another mapping to make it work, what i mean is to make folla.com.pl to point to https://companywebsitecdn.azureedge.net/ with https. I can't proivde what i already tried with my dns because it was a lot and i don't remember all of it. Also it's already second try and everytime after failure I have wait 8 hours for another try. Thanks in advance
This is my DNS config
When you try to add your custom domain folla.com.pl in the custom domains settings of Azure CDN endpoint. Before this step, you should have a CNAME record in the following format in the DNS zone.
When you turn on the custom domain https, you don't need to make a CNAME cdnverify.folla.com.pl to cdnveriy.companywebsitecdn.azureedge.net. Read here.
If that CNAME record still exists and does not contain the cdnverify
subdomain, the DigiCert CA uses it to automatically validate ownership
of your custom domain.
If the CNAME record entry contains the cdnverify subdomain, follow the rest of the instructions in this step.
DigiCert sends a verification email to the following email addresses. Verify that you can approve directly from one of the following addresses and read here.
admin#<your-domain-name.com>
administrator#<your-domain-name.com>
webmaster#<your-domain-name.com>
hostmaster#<your-domain-name.com>
postmaster#<your-domain-name.com>
Automatic validation typically takes a few hours. If you don’t see your domain validated in 24 hours, open a support ticket.

Unable to access CDN endpoint via custom subdomain

my team and I are currently exploring using Azure static site blobs and CDN endpoints to host several web apps.
We have successfully deployed our static files to the blog storage and our entire test app loads on both the primary (name.abc.web.core.windows.net) and CDN (name.azureedge.net) endpoints. When it comes to mapping a custom subdomain via the “cdnverify” temporary step, however, I am unsuccessful.
I have very carefully followed and quintuple-checked all steps in the support doc "Tutorial: Add a custom domain to your Azure CDN endpoint" (here).
This is my current DNS config (via Namecheap).
When I skip the cdnverify step, e.g. assign the azureedge CNAME value directly to a host called “v2”, and add that as a custom domain in my Azure portal CDN blade, the subdomain begins loading the CDN endpoint and can even have a CDN-managed HTTPS cert deployed with no manual verification. A dig command to this host (v2.ourdomain.org) finds an expected response (view here).
Here's the rub, though. If I assign a CNAME host of “cdnverify.static” to “cdnverify.name.azureedge.net.” and add it as a custom domain in the portal’s CDN blade, however, this secondary subdomain never loads our endpoint, and cannot deploy an HTTPS cert. The Azure portal verified this host when added to the endpoint and a dig command to “cdnverify.static.ourdomain.org” shows this answer, which looks good.
A dig command to “static.ourdomain.org” returns no answer and a ping command says “unknown host”. This is expected since I’ve not created such a record yet, and so I am wondering how we’re meant to ensure this subdomain is verified as per the “Verify the custom domain” section in the above-mentioned doc.
It’s very important for us that the cdnverify host works and can be assigned a certificate before we permanently re-locate our domains as these apps are already in production. At this point, I am at a loss over what to try next. If possible, I’d love to know what step(s) I am missing, or what can further be done to diagnose the issue.
Many thanks to anybody who might have some advice!
The cdnverify subdomain is to create a temporary CNAME mapping to avoid interruption of web traffic. With this method, users can access your domain without interruption while the DNS mapping occurs. If you have not any existing web app work, you can skip the cdnverify step.
From your description, "a dig command to cdnverify.static.ourdomain.org shows this answer, which looks good." It indicates that the cdnverify host works and you have verified that. You just need to associate the custom domain with your CDN endpoint.
In this step, you enter your custom domain like static.ourdomain.org, including the subdomain. Do not use the cdnverify subdomain name.
After you have added the custom domain static.ourdomain.org successfully in the CDN endpoint.
At this point, your custom domain has been verified by Azure, but
traffic to your domain is not yet being routed to your CDN endpoint.
After waiting long enough to allow the custom domain settings to
propagate to the CDN edge nodes (90 minutes for Azure CDN from
Verizon, 1-2 minutes for Azure CDN from Akamai), return to your DNS
registrar's web site and create another CNAME record that maps your
subdomain to your CDN endpoint. For example, specify the subdomain as
www or cdn, and the hostname as .azureedge.net. With
this step, the registration of your custom domain is complete.
After you have completed the registration of your custom domain, verify that custom domain references your CDN endpoint.
Finally, you could freely remove the cdnverify CNAME record in your domain provider as it was necessary only as an intermediary step..
Ref: https://github.com/uglide/azure-content/blob/master/articles/cdn/cdn-map-content-to-custom-domain.md#how-to-map-custom-domain-to-content-delivery-network-cdn-endpoint

Custom domain and how to access site as http://

In Azure, I have purchased a Custom Domain and the configuration has been done automatically - all good till now however the site is accessible only using: www.sitename.com
If I access it using http://sitename.com only, it is not working.
For info, I tried to remove the CNAME however didnt allow.
Suppose I dont want to use the wwww, how can I do ?
Thanks.
If you want to access your website with http://sitename.com, you have to create the A record and enable the A record mapping in the app. For how to map an A record, this doc is for your reference.
1.Copy the app's IP address
2.Create the A record
An A record to map to the app's IP address.
A TXT record to map to the app's default hostname.
3.Enable the A record mapping in the app
The custom domain you configured is not secured. You'd better click on "Add binding" to bind an existing custom SSL certificate to your app. For more details, you can refer to the doc.
The in the DNS for domain sitename.com the A record to is what make http://sitename.com works.
If you want http://www.sitename.com to work you HAVE TO have a www CNAME record.

How do i connect my windows azure website with my domain name perfectly?

I did almost everything that have described in the azure documentation briefly.
My domain names that i need to be assigned with my azure website url idaa.azurewebsites.net are mostout.com and www.mostout.com.
When trying to enter my site using any of the links added here, the site loads and works perfectly as i need.
But the problem is with my url which is getting loaded in browser url field while giving mostout.com or www.mostout.com.
It comes with the azure website url every time. What do I do now to get it working?
Make sure to set the CNAME for your service: have the www. name point to the full azurewebsites.net address.
Note that you'll:
need to have a level of service that supports custom domains with Windows Azure Web Sites,
add the CNAME from your www. domain to the azurewebsites domain (same goes for having the naked domain name via an A record or similar)
add the verification names, awverify.www.yourdomain.com and awverify.yourdomain.com
use the Manage Domains function in the portal for the web site to customize that domain name,
Things should just work then.

Resources