I’m conducting some training for Azure and need a way for students to get a domain name. In this post, I’ll show you how to get one for free and use Azure DNS to manage it.
Get the domain
Here are the steps:
- Head over to https://www.freenom.com
- Enter your desired domain name in the box. Use one of the following extensions
- Click checkout. The period can be anywhere from 1 month to 12 months to keep it free. Or for longer periods, the cost is displayed. I’ll leave mine at the default of 3 months and press Continue.
- Since I don’t have an account, I can create a new one. I used the social sign in to Google. A confirmation email will be sent.
- After clicking the link in my email to verify my account, I’m back at the checkout screen. Fill in your name, address, and phone number.
- Select the box after you’ve read the Terms and Conditions and then press Complete Order.
- You should be automatically logged in to the client area.
To view your domain, you click on Services, then My Domains and you should see the domain you just registered.
Manage it with Azure DNS
One of the limitations with the Freenom DNS is that you can’t add wildcard records. Wildcard records are often needed to verify your domain and to make managing DNS easier. For instance, to use this domain with Azure Active Directory, you must enter a wildcard TXT record. Let’s manage the domain with Azure DNS.
- Login to the Azure Portal and go to DNS zones.
- Click Add to add a new zone.
- Select (or create) a Resource group and instance name. The instance name is the name of your domain you previously registered.
- Click Review and Create for validation and then Create to start the deployment. This usually takes less than a minute.
- When the deployment is complete, click Go to resource. The new zone is now displayed.
- Take a note of the name servers, we’ll need to enter these into our registrar.
Let’s tell Freenom that Azure DNS is our name server:
- Head back over to Freenom (https://my.freenom.com) and login (it may have timed out).
- Click on Services from the top menu, then My Domains
- Click Manage Domain for the domain you want to modify.
- In the management menu, click Management Tools and select Nameservers.
- On the Nameservers screen, select Use custom nameservers. Then enter the name servers provided by your instance of Azure DNS.
- Finally, click Change Nameservers. Azure DNS is now managing DNS for your domain.
Now that Azure DNS is managing your domain, you can create DNS records for your blog, other website, mail domain or other things. Let’s add a custom domain for Azure AD:
- Browse to Azure Active Directory and select custom domain names in the blade, or go to the direct link here.
- Next, click Add custom domain and type in your domain name. Click Add domain on the new blade.
- Once the domain is added, the verification screen comes up.
- The verification screen provides the information needed to populate Azure DNS. Copy the destination value.
- In the Azure Portal, go to your DNS zone and click add (+) Record set. For the Name, type the @ symbol. Change Type to TXT and paste the value from the step above into the Value field. Click OK.
- Navigate back to Azure Active Directory, Custom domain Names. You should see your domain name and it’s status as Unverified. Click your domain.
- Now that you’ve added the TXT record to Azure DNS, click Verify.
Azure attempts to verify the domain. It can take several hours or days for all of these changes to propagate. If it doesn’t work the first time, try again later (after several hours). Once it’s successful, you’ll see that the status is changed to Verified.
You can now use this domain in Azure AD as a UPN suffix. You can also setup public-facing websites, such as an ADFS server and add records to Azure DNS so that users can access it to perform single sign-on.