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:

So, now, when we will run the following command:

We will see the following result:
C-NAME in The HOSTS File-1

Now, for let’s say test Autodiscover, we can put the following line in the host file:

And here is an expected result:
C-NAME_in_HOSTS_File-2

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.

No responses yet

Leave a Reply