How to Access a custom domain outside azure which I bought in azure portal - azure

ok so I bought a custom domain within azure portal for my website. but now that my msdn subscription is over in azure I want to move my website to some other service or a cheaper solution as it is just a static website to show my video player app and I dont wanna purchase expensive subscriptions for it.
As I am searching for a solution regarding moving my website to another new azure account or outside azure to somewhere else I am trying to find where can I access my domain ownership outside azure portal? Because I assume on the backend azure must be using some service to purchase the domain right? as per portal renewal to my domain is still pending till next year so I technically still own that domain and I wanna keep my website on it live, just dont wanna pay for expensive azure subscription.
it is just a static website with ssl certification service applied on it for https.

If you already have bought custom domain using Azure portal then you may want to know that App Service Domains use GoDaddy for domain registration and Azure DNS to host the domains. In addition to the yearly domain registration fee, usage charges for Azure DNS apply.
For information, see Azure DNS Pricing.
In your case you can transfer away your domain and Transferring of domain out of Azure (not a registrar) to another registrar is supported and you may currently do so via API and PowerShell.
You will need to get an authorization code which you can take to the registrar of choice to proceed with transferring out of your domain.
You can use the transfer out API:
PUT https://management.azure.com/subscriptions/<SUBSCRIPTION-ID>/resourceGroups/<RESOURCE-GROUP-NAME>/providers/Microsoft.DomainRegistration/domains/<DOMAIN-NAME>/transferout?api-version=2021-02-01
You may be able to run this API on Azure Resource Explorer.
Check this blog for more details on this.
Also check this similar discussion here might be help.

Related

Azure - Allow access to a website deployed on Azure App Service only for a single country

I have website deployed on Azure App Service and I want to restrict access to my website from any other country accessing it but only a specific country can access that website.
Is there any way where I can restrict/allow at the infrastructure level inside Azure?
Even though AppService does not provide, Yes this can be done with Azure CDN provider does via the Geo Level Filtering. More details can be found here.
Is there any way where I can restrict/allow at the infrastructure level inside Azure?
Agree with Sajeetharan. It seems Azure Web App could not restrict the access just by country directly. You can have a try with Azure CDN, it can restrict the access by country.
But, as the comment you said, you do not have to restrict CDN, in this case, you can consider to restrict IP addressees in Azure. You can also use IP Restrictions menu in Azure app services to add restrictions:
You can check the document Azure App Service Access Restrictions for some more details.
Besides, you can try to use web.config or use IP restrictions feature of the webapp:
Check this thread for some more info.
Hope this helps.
Answer is: Azure Front Door with Front Door WAF policy
After going through with different Microsoft documentation I finally implemented the solution with Azure Front Door where you can set Frontend hosts and Backend pools with forwarding/redirecting. And in Frontend hosts, you can select WAF policy.
In the backend pool, you can select any application e.g. App Service or any IP where your app is deployed.
In WAF policy there are multiple options to restrict your traffic and one of them is geolocation restriction.
Just apply geolocation restriction according to your desired country and it will work like a charm.

Verify Ownership of Azure App Service Domain

I have registered a domain name through the Azure portal. I'm currently in the process of trying to verify ownership of it on Office365 so I can register email for it.
However, it looks like Azure uses GoDaddy as their DNS provider. Unfortunately, since I registered through Azure portal I don't have a way to sign into GoDaddy and go through the necessary steps to prove ownership of the domain.
On the Azure side, I attempted to delegate the app service domain to an Azure DNS Zone per the DNS Zone blade for said app service domain. However, when I click the delegate button, I get the following error:
Failed to update the domain to use Azure DNS: An error has occurred.
No further information. Is there anyway I can actually give proof that I own this domain?
GoDaddy support said they couldn't help me and that I need to call the registrar. However, I don't have a paid support plan with Azure so I can't actually call them.

Host 2 separate sites, one domain, on one Azure site

I have a wordpress site hosted on Azure. Call it, mysite.com. I'd also like to develop a separate .net app and host it at subsite.mysite.com. How can I do this without having to pay for 2 separate Azure sites?
There are ways to achieve what you require. However, key point here is to understand the Azure App Service. Because, in Azure app service, you never pay (your concern is having to pay, not having to maintain) for a single site!
If you take a closer look at the App Service Pricing model, you will see that even with the free (like in Free lunch) tier, you get to host 10 applications in your hosting plan. But you need custom domain, then you go to Shared plan, you already can host 100 web sites within it, all with your custom domain/s.
Next you will have to learn a bit about what is Top Level Domain, what is Domain, what is Sub Domain, what is A DNS Record and what is C-Name DNS record, because these are all thing you need to understand in order to properly configure your sites.
And finally read the article on how to configure custom domain for Azure App Service.
Remember. With Azure App Service, you are paying for a hosting environment (or service plan), not for a single web site!

Is it possible to move custom domain from one web app to another?

I have a custom domain www.abc.com configured for web app webapp-a, and I'd like to transfer it to webapp-b without downtime.
If I try to add the domain to webapp-b, I am getting
The host name www.abc.com is already assigned to another Azure website: webapp-a
It there a way to let webapp-a continues to serve the requests, until the DNS cache expires?
Edit: The domain has IP based SSL binding, and the DNS is caching the virtual IP.
I faced the same issue, and was able to solve it in a tricky way.
I created new App Service Plan (previously known as Web Hosting Plan), and assigned "new" Web App to it (you can do it via new portal, or you can create Service Plan during Web App creation).
Then, I was able to assign the same host name to Web Apps in different hosting plans.
Thinking about this, I feel it logical: most probably Service Plan is mapped to physical IIS machine, and you cannot have two sites with the same host name in the same IIS for the obvious reason.
After migration from one DNS to another is done, you can remove unused Service Plan (as you basically pay for each separately).
According to a blog post by the Azure App Service Team in June 2017, it would appear that Azure now supports adding the same custom domain to multiple web apps:
There are scenarios where a customer would like to add the same hostname to multiple web apps in the same subscription, having a geo distributed website is one example. Our custom hostname feature allows you to bypass validation for hostnames that have already been validated. You only need to verify domain ownership when you add a hostname for the first time. For all other apps in the same subscription, you can add the same hostname without creating any DNS records.
You can read the entire blog post at https://blogs.msdn.microsoft.com/appserviceteam/2017/06/21/custom-hostnames-with-app-service/. The quote above was taken from the Adding the same custom hostname to multiple web apps section.
This should help in scenarios such as this where you want to transfer a custom domain name from one web app to another. You can simply add the same custom domain name to both web apps, add any required SSL bindings, and then change the DNS to point to the new web app. As the DNS change propagates, traffic should gradually move over to the new web app without any downtime.
I've tested this myself in the North Europe region and had no problems. Both web apps were in different App Service Plans. I have not tested this scenario with both web apps in the same App Service Plan. Bear in mind that if you're using IP addresses/A records in your DNS, you'd need both web apps to have different IP addresses for the DNS to be able to differentiate between your web apps.
Try assigning the domain to Azure Traffic Manager and have the traffic manager forward the request to the second site. Azure Traffic Manager and Web Apps are two different systems so you might be able to assign the same domain name to a web app and a traffic manager.
Once the DNS cache has expired remove the domain from the old Azure web app and add it to the new one, then finally delete the Traffic Manager account.
Option 2
Set the TTL to something very small, say 5 seconds (I believe your hostname provider should let you set that up), wait for the new TTL to propagate through all the caches. Then switch the custom domain from one app to another, and set the TTL back to it's original value.
This will result in just a few seconds of downtime for any customers, but if you do it at a low-traffic time the effect shouldn't be too bad.

Allowing Users to Enter a Custom cname on Azure Websites

I have a multi-site application running on Azure Websites. When a user signs up, they pick a name for their application and they end up with "appname.coolapplication.com". Everything so far is working great within our own domain.
Our application needs to allow users to enter their own custom domain. For example, they want to view their application from "elsewhere.com" rather than "appname.coolapplication.com". How do I go about configuring Azure Websites to allow me to do this?
You don't. Per these instructions you instruct the customer to enter a CNAME record on their domain registrar for the Azure domain, and then it begins to work.
EDIT:
The CNAME only "just works" for Azure Cloud Apps. For Azure Websites, it turns out you must add the domain in the portal as well. I'd thus recommend switching your Azure Websites to Azure Cloud Apps to simplify the issue.
You can use the powershell api to add custom hostnames.
See this question for details: Add many domains to an azure web site

Resources