Microsoft have recently announced that users of Microsoft Azure can finally use reverse DNS with their cloud services. This means people are now able to do a whole host of new things with their virtual machines that were difficult at best to do properly beforehand. An example of this is now you can host your own email server(s) with Azure and you don’t need to use SMTP relay servers in order to send email that doesn’t get sent to Junk before the user even gets a chance to look at it (and to be honest, even with the use of an SMTP relay server your emails still had a high chance of being sent to Junk because a lot of businesses mark emails sent with the major providers of SMTP relay like MailJet or SendGrid as spam anyway).
In this blog post I’ll lay out how to: set up reverse DNS with a new cloud service, set up reverse DNS on an existing cloud service, and how to remove reverse DNS after setting it up.
Adding reverse DNS to an existing cloud service
1) Firstly you’ll need to open an Azure PowerShell console window.
2) Type in the following command, swapping out the bits inside the quotation marks with the corresponding values for your cloud service.
Set-AzureService –ServiceName “yourservice” –Description “your description” –ReverseDnsFqdn “your.fqdn.”
3) If the command is completed successfully then try the command below to verify whether or not it’s worked.
Creating a new cloud service with reverse DNS
1) Run the following command (remember that you need to make sure you leave a full stop/period at the end of your FQDN).
New-AzureService –ServiceName “servicename” –Location “region” –Description “description” –ReverseDnsFqdn “your.fqdn.”
2) That’s it. If the console says “Succeeded” then you can deploy a VM into the cloud service and try reverse DNS out using the command below.
Removing reverse DNS
1) Run the following command (notice that there’s nothing between the quotation marks after -ReverseDnsFqdn).
Set-AzureService –ServiceName “servicename” –Description “description” –ReverseDnsFqdn “”
2) That’s it. Relaunch PowerShell (make sure you close all the open console windows) and run the following command and you should see the error in the screenshot below.