Migrate Website Infrastructure to Microsoft Azure - azure

I have an accessible static HTML website set with domain and hosting. I would like to mimic this environment with Azure, meaning Azure will communicate with my domain and hosting provider.
Could I please ask to point to where should I find answer to this? It seems obvious, but I am not really sure about my search results.

You need to create CNAME record on your domain registrar account
Open a new browser tab and sign in to your domain registrar account.
Navigate to your domain name's DNS configuration settings.
Add a new CNAME record with the following values.
Setting Value
Type CNAME
Host Your subdomain, such as www
Value Paste the domain name you set aside in the text editor.
TTL (if applicable) Leave as default value.
Create a CNAME record in Azure Static Web Apps. Please find detailed step by step guide below:
https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain-external

Related

Create a subdomain and a CNAME in Azure

I currently have an Azure domain with a website, the domain has the name aaa-aaa.azurewebsites.net
I need to create a subdomain of the style login.aaa-aaa-aaa.azurewebsites.net, which at first will point to aaa-aaa.azurewebsites.net but later I want it to point to a different domain.
I have tried to create the subdomain through the Azure console, entering App Service and then Custom Domains but I get the error:
"Domain ownership
To verify domain ownership create CNAME and TXT record with your DNS provider using the configuration below, and replace {subdomain} with value of subdomain".
I have been reviewing documentation on the internet and in the DNS zone section I have created a new zone and I have introduced the information that appears in the Custom Domains section as the guide says: https://rmiravalles.com/2020/08/05/creating-dns-records-for-a-web-app/
** What should I do to create this subdomain and its corresponding CNAME in Azure?
** Is it necessary to have a domain of the style aaa.com or could it be done with the one I currently have aaa-aaa.azurewebsites.net?
Thank you very much
[1]: Error creating subdomain: https://i.stack.imgur.com/BQ9Iz.png
[2]: DNSZone configuration: https://i.stack.imgur.com/fanN3.png
You do not own 'azurewebsites.net' (microsoft does) and therefor you can not create subdomains for that domain (others than the ones Microsoft has given to you). You should get your own domain first, than you can create dubdomains in your dns-server

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.

Delegate Subdomain to Azure via CNAME

the company I’m working for provided me a subdomain. test.mycomp.com . I want to add it to my azure web app via custom domain.
The azure system recommends a CNAME delegation and provided me the information to enter web-zeudz-staging.azurewebsites.net in the dns management as CNAME.
After doing so and verifiying via DNS Lookup, Azure always gives me „Domain Ownership Error“. What can I do to make this work?
Is your DNS provider also a CDN provider, for example cloudflare? If so, turn off the CDN/proxy function so it's a DNS only record and try again.
If you don't have any control over the CDN function you can use txt record validation.
Create your TXT record awverify.subdomain.test.mycomp.com with value web-zeudz-staging.azurewebsites.net and validate again. It should succeed.
There's also a CNAME awverify method but you need CDN disabled for that too.
I find it strange that your company doesn't have the option to enable/disabled CDN for any given DNS entry though.

Azure WebApps custom domain - CNAME pointed to azurewebsite must exist?

We are trying to migrate sites from AWS to Azure WebApps.
AS IS:
The CNAME of the existing site points to Imperva. Imperva then points to AWS Site.
TO BE:
The CNAME of the existing site points to Imperva. Imperva then points to Azure WebApp Site.
PROBLEM:
When I try to add the custom domain to azure Web Apps website, it complains with the error that the existing Site MUST have CNAME pointing to Azure Website.
see example below:
This means that as part of cutover, we need to do below:
1. Quicky update CNAME to point to azure web app
2. Once custom domain is setup in azure
3. Change the CNAME back to Imperva.
This sounds bit hacky.
Is above right approach or am I missing anything here?
The part that you're missing is the direction of the CNAME. What Azure wants to do is to ensure that you do actually have authority over that domain name. So they want you to create a CNAME that points from awverify.www.example.com to www.example.com
Once that record is created Azure will looking that record and ensure that it redirects to www.example.com. This has no impact on any existing configuration (unless you just happen to have awverify sub domain in uswe already!)
www.example.com will still work in exactly the same way as before until you are ready to move that name to Azure.

Azure Websites DNS

I have an azure website at yis3.azurewebsites.net - I have promoted this to be a "shared" site so that I can use a custom domain. I have the domain yorkshireimagescanning.co.uk that I bought from 123-reg.co.uk. I have configured this to give a CName record with dnsname of "awverify" and destination of awverify.yis3.azurewebsites.net.
I've waited over 12 hours and checked on digwebinterface.com and all looks good but when I click to "Manage custom domains" from the Azure portal , I enter a domain name of "yorkshireimagescanning.co.uk" but it won't accept it.
Please help
* Edit *
I've now waited a couple of days for domain propagation. Here's a screen grab from my domain registrar:
In the azure portal I've tried to add the following custom domains for the yis3.azurewebsites.net site but it won't accept any:
awverify.www.yorkshireimagescanning.co.uk
www.yorkshireimagescanning.co.uk yorkshireimagescanning.co.uk
awverify.yorkshireimagescanning.co.uk
Here's a screen grab from the portal:
To use yorkshireimagescanning.co.uk
To use your domain without the www. prefix you need to add an A Record in addition to the CNAME you've added for "awverify".
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure an A record for the domain name" on the same page. This involves pointing your domain directly at the IP address of the Azure web site. You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
A xx.xx.xx.xx (your website's IP address)
I've marked the next option as "preferred" because it points your domain at the Azure hostname "yis3.azurewebsites.net" instead of directly at the IP address. The IP address of your Azure website won't change, but if you ever need to deploy your website elsewhere it will have a different IP, so there will be a delay while the DNS change propagates.
To use www.yorkshireimagescanning.co.uk (preferred)
To use your domain with a www. prefix you need to add another CNAME record in addition to the one you've already added.
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure the CNAME on your domain registrar" on the same page. This involves adding a CNAME that points "www" to your Azure website's hostname (yis3.azurewebsites.net). You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
CNAME www yis3.azurewebsites.net
A note about domain forwarding: Don't use 301 forwarding unless your site has been permanently moved. Use 302 for temporary redirection. More details here.
I finally figured out what was wrong. I was deploying a new version of an existing site but the old version still had www.yorkshireimagescanning.co.uk set on the custom domains page. Once I deleted it then I was able to add the domain on the new azure site.

Resources