Hey,
This article is about how you can configure your custom domain to Azure AD so that you can use your own domain for your business purpose etc..
Requirements
- Your domain
- Premium License (P1 or P2)
- Brain
So let’s solve the 1st requirement i.e you need your own domain.
- Go to www.freenom.com [Domain registrar]
- Register for an account
- Go to https://my.freenom.com/domains.php
- Enter a domain you want but remember to use the TLD such as .tk .ml because they are free of cost and you don’t need to pay a penny.
- So enter a domain like AzureFun.tk
6.Click on Checkout and click on Continue
7.You should see the page as below :
8.Tick box the Terms and conditions and click on Complete order.
9.Now go to https://my.freenom.com/clientarea.php?action=domains to see the domain you have just bought for free.
So you now successfully have your own domain.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Now let’s solve the Second requirement i.e License for Azure AD.
→If you do not have a premium license , you will for sure get an error while you add a custom domain so you need to have a Azure Tenant with a subscription attached to it and then you need to go to licenses in the Tenant as below :
You can see that I already have a Premium P2 license so I can configure my custom domain now , but if you do not have one then click on. “Try/Buy” and click on activate free trial and you will be able to use P2 License.
So let’s dive into the main issue:
Configuring Custom domain for Azure AD
- Go to your Azure AD by using search bar.
- Now click on “Custom domain names” on the bar of the left side
3.Click on Add custom domain which is on the top.
4.Enter your custom domain name what you made in freenom , in my case it is “azurefun.tk” (Enter without quotations).
5.Click on Add domain and you will see the below.
6.Click on MX i.e MX is a DNS record basically used to verify the ownership of our domain.
7.So you should see this when you click on “MX”
8.Now copy all those details in a notepad i.e the hostname , destination , TTL and Priority. You need to enter all of these details in your Azure DNS Zone. Keep this tab open for now.
9.Now add a new tab in google chrome and go to search bar of Azure and enter Dns Zones.
10.Click on it and click on Add and choose a Resource group and enter Name as “azurefun.tk” , in your case it should be your domain name which u bought for free in freenom.
11.Click on Review+Create and Go to the Dns Zone created.
12.Click on +Record Set and add the details which you have copied before i.e the MX record details.
13.Click on Ok after you enter the details .Now you have successfully added the MX record to the DNS zone of azurefun.tk in Azure.
14.Now since we have added the MX record in Azure DNS Zone , we need to now copy the DNS Servers of Azure and paste them in “Nameservers” settings of Freenom domain.
15.So go to the your DNS Zone again in Azure and you should see the nameservers as below:
16.Go to Freenom now and go to your domain and copy each Azure Nameservers and paste them in your freenom domain Nameserver settings.
17.Click on Management tools and you should see Nameservers.
18.Click on use custom nameservers and you should see this:
19.Click on Change Nameservers and you will see the changes are saved.
20.Now go to the tab which you left at the start i.e the verify domain tab
21.Click on Verify now and you should see this.
22.We have successfully added our custom domain to Azure AD now . To verify it you can go to Users in Azure AD and click on Create New User and you should see it as below:
23.So now we have clearly seen that we can create new users with the custom domain we have added just now.
So that concludes this article , good luck with trying this out.
Stay tuned for more interesting articles!