How to Add a Local DNS Lookup to Hosts File

    Posted in Windows Servers on Sep 30, 2020

    What Is The Hosts File in windows os?

    The hosts file is simple to understand. It’s just a plain text file. Incidentally, this is why you should just edit the file with something like Notepad, which won’t try to change the format or add extra formatting to the file.

    Inside the hosts file, you can add a list of IP addresses along with the web address that the IP address should point to. You can combine any IP address and web address, even if they don’t actually go together. You could make the actual IP address for Bing.com point to Google.com if you wanted to.

    Editing The Hosts File In Windows 10

    Since the hosts file leaves some room for mischief, you can’t just open it and edit away. You’ll need administrator privileges on your computer in order to make changes. Before you make any changes to your hosts file, we strongly recommend you copy and paste it’s original contents into another text file just in case something goes wrong!

    To modify your hosts file in Windows 10, follow these steps:

    1. Please reach on following path on server:

    asdf.JPG

    1. Open the hosts file in Notepad :

    hostfile.jpg

    You should see this default hosts file from Microsoft.

    Don’t worry about any of the text already in the document. You can just leave it as is and add your own entries at the bottom of the file. Any line that starts with a “#” symbol is treated as a comment and not used for name lookups.

    Adding a local lookup to the list is super-easy. Just write down the IP address of the site, followed by a space and then the website’s address.

    ho1.JPG

    Remember to save what you’ve added when closing the file. That’s all you have to do! Now your computer will skip over the whole DNS lookup process when accessing the sites you’ve specified. How To Find A Website’s IP Address

    What if you don’t know the IP address of a site you want to add to your hosts file? It’s actually pretty easy to find a site’s IP address using the Command Prompt in Windows 10. Here’s how:

    windows-dedicated-server-hosting.jpg