Using Hosts File to Register DNS C-Name
Many of us are using the HOSTS file for ages. However, not many people know about this “feature”.
So let’s see how it works. Often we use the hosts file to test new implementations, changes to an existing system and so on. During Office 365 implementations we need to have some C-Name record, so how do we test that by using just hosts files before we do any real DNS changes?
Apparently, it’s very simple. I am sure, you know the location of the host file :), so open it in your favourite editor and edit it according to the following example:
52.33.59.94 a-record.highclouder.com c-name.highclouder.com
So, now, when we will run the following command:
ping c-name.highclouder.com -n 1
We will see the following result:
Now, for let’s say test Autodiscover, we can put the following line in the host file:
132.245.22.248 autodiscover.outlook.com autodiscover.highclouder.com
And here is an expected result:
I hope that you learned something new and that you benefit from this post. Feel free to contact me if you want to discuss anything else.