If you are thinking of creating your own website, you have probably heard of the word "domain," but do you know what it means?
The domain is a name that identifies a website on the Internet. Its fundamental purpose (along with the Domain Name System (DNS)) is to translate IP addresses into terms that are easier to memorize and find. That is, more simply, the domain corresponds to your Page's link. For example, for the case of this article, our tutorial is under the domain dev.to. Choosing a good domain is very important, as it will be access to your website. This, preferably, should be formed with the name of your company, and if you want with the category of it, as it will help you to position your website more easily.
Currently, there are a lot of services that provide domains on the Internet, in this case, we will learn how to buy a domain in Azure and associate it with a web page that we have hosted through the Azure App Service resource.
In the Azure portal, we need to find the App Service Domains resource and then click Add to register a new domain.
To purchase the new domain, we need to provide the following information:
Domain name: In the Search domain box, we need to enter the domain name we want to purchase. Suggested available domains are displayed just below the text box. In this case, you can select one or more domains to purchase later.
The azure subscription. This will be the subscription with which we will purchase the domain.
The contact information of the person responsible for the domain.
Accept the legal terms of service. The cost of the domain is detailed in this section. This value will be deducted from available Azure credits.
Finally we click in Create. The domain acquisition process takes 1-3 minutes to complete.
As a first point, we should be aware that our app in Azure App Service must have a plan that allows you to associate custom domains. To do this, within the App Service menu bar in the Settings section, we go to: Scale up (App Service plan)
In this section we need to select a payment plan that allows you to associate custom domains. After performing this process, we save the changes to the Apply button.
Then, within the same Configuration section in the App Service, we go to the Custom domains option.
Here, we click Add custom domain:
The resource will then ask us to specify the custom domain:
Then we click Add custom domain, and with this we would already have associated our new custom domain with the web page hosted in Azure App Service:
From now on, we can access our website with the domain created and also with the .azurewebsites.net address that was previously had.
With these steps, we learned how to associate a new domain with an existing web page hosted on a resource with Azure App Service.
Want to learn more? Here are some tutorials that could be of great help to you:
- Hosting a Static Website on Azure Web App!.
- Continuous Deployment on Azure with Visual Studio 2019 and GitHub.
- Steps to create an MVVM application (Model-View-Viewmodel) with DotVVM and ASP.NET Core.
See you on Twitter!! :)