Skip to content

How To Blog

  • Configure NGINX Reverse Proxy – Step by Step How-To
  • How to Access Yahoo! Mail using POP3 or IMAP Computer Tips
  • How To Create a WordPress Child Theme Wordpress
  • How To Move Columns In Excel Office Tips
  • Prevent Mac from Automatically Going to Sleep How-To
  • How to Insert a PDF File into a Word Document Computer Tips
  • How to Sync Two Folders in Real Time in Windows Free Software Downloads
  • How to find steam trade url 2022 Gaming

How to Add a Local DNS Lookup to Hosts File

Posted on October 7, 2020 By blog_786 No Comments on How to Add a Local DNS Lookup to Hosts File

When you enter a website URL into your browser’s address bar, the request is sent to a type of internet server known as a domain name server . This server takes the URL you entered and then checks which IP addresses are listed for the real servers hosting the content you are looking for.

The problem is, if there is something wrong with the nameserver, you won’t be able to access the site you want. Even worse, if the name server has been hacked, you may end up on a fake site! The good news is that you can manually specify the relationship between specific IP addresses and website addresses by simply adding a local DNS lookup to your hosts file.

How to Add a Local DNS Lookup to Hosts File

What is a hosts file?

The hosts file is easy to understand. It’s just a text file. By the way, this is why you should just edit the file with something like Notepad, which won’t try to change the format or add additional 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 match. You can have the actual IP address of Bing.com point to Google.com if you like.

How to Add a Local DNS Lookup to Hosts File

Windows always checks the hosts file first before sending a request to the name server. Therefore, if the address that you enter in the browser is listed in the hosts file, you will be redirected to the IP address specified in the file.

What is local DNS lookup?

The process described in the previous paragraph is a local DNS lookup. Your computer looks up the IP address from your local drive on its own, without having to contact an external server. It is so simple!

– /

Why add local DNS lookup to the hosts file?

There are several reasons why you might want to add a local DNS lookup to your hosts file. We already mentioned several reasons at the beginning of the article, but people have found many creative ways to use this simple feature.

One of the important reasons for adding entries to the hosts file is speed. It will always be faster to do local searches than to go to an external server. Especially if this server is unreliable. Placing the most important or most frequently used sites in the hosts file means you no longer have to worry about the DNS service causing access problems.

How to Add a Local DNS Lookup to Hosts File

You can also use the hosts file to block sites that you don’t want this computer to have access to. All you have to do is specify an IP address in the hosts file for that site, which either leads nowhere or points to a secure IP address. Common redirects include 0.0.0.0 and 127.0.0.1. This is the so-called “loopback” address.

If you have local devices like routers, IP cameras, network storage, etc., you can use the hosts file to give their IP addresses easy-to-remember names.

Using Hosts Premade Files

If adding dozens or even hundreds of sites to the hosts file seems quite tedious, then you are not alone! The good news is that there are tons of places on the internet where you can find ready-made lists that you can simply copy and paste into your own hosts file.

The main problem is that malicious redirects can be hidden in these lists. This means that you either need to check each IP address manually or make sure you trust the source of the list.

Editing hosts file in Windows 10

Since the hosts file leaves room for trouble, you can’t just open it and edit it. You will need administrator rights on your computer to make changes. Before making any changes to the hosts file, we strongly recommend that you copy and paste its original content into another text file in case something goes wrong!

To change the hosts file in Windows 10, follow these steps:

  1. Open the Start menu and type Notepad.

  1. When Notepad appears, right-click it and choose Run as Administrator.

How to Add a Local DNS Lookup to Hosts File

  1. n Notepad, click Open, navigate to c: Windows System32 Drivers etc hosts and open the hosts file there. Remember to change the file type to All Files.

How to Add a Local DNS Lookup to Hosts File

  1. You should see this default hosts file from Microsoft.

How to Add a Local DNS Lookup to Hosts File

  1. Don’t worry about text already in the document. You can just leave it as it is and add your entries to the end of the file. Any line beginning with the “#” character is treated as a comment and is not used for name lookups.

How to Add a Local DNS Lookup to Hosts File

It’s easy to add a local search to a list. Just write down the site’s IP address, space and then the site’s address.

Remember to save what you added when you close the file. That’s all you need to do! Now your computer will skip the entire DNS lookup process when accessing the sites you specify.

How to find a website’s IP address

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

  1. Open the start menu and type “cmd”.
  1. After opening a command prompt, enter “tracert” followed by a space and the site to test. In this example, this is google.com. Then press the Enter key on your keyboard.

  1. Here you will see the site’s IP address. Now you can use this address in the hosts file.

How to Add a Local DNS Lookup to Hosts File

The most hosts

Who would have thought that such a small text file hidden deep in the Windows folder could be so useful? You are now a true local search guru, controlling how your computer accesses websites.

–

Networking

Post navigation

Previous Post: How To Teach An Online Course
Next Post: The 8 Best Online Sources For Green Screen Special Effects

Related Posts

  • How to Release and Renew an IP Address Networking
  • Does MAC Address Filtering Really Protect Your WiFi? Networking
  • Enable or Disable Windows Firewall from Command Prompt Networking
  • HDG Explains : What Is a Parked Domain & What Are Its Advantages? Networking
  • Remotely Accessing a Windows XP or Windows Server 2003 Computer Networking
  • 5 Reasons Your WiFi Speed Test Results May Be Wrong Networking

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Wordpress

Recent Posts

  • How to Sign PDF on Windows 10
  • 7 Best Cell Phone Screen Protectors 2021
  • How to reset Windows 10 from factory settings
  • The best apps should try to use iPhone battery percentage
  • 9 Ways to Fixing Safari Not Working on Mac?

Recent Comments

  1. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How to Reset BIOS to Default Settings
  2. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on What to Do When Your USB Drive Is Not Showing Up
  3. Alexa Routines and Skills 2023: A Tutorial - How To Blog on How to Create a Routine With Amazon Alexa
  4. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How To Enter Outlook Safe Mode To Fix Issues
  5. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How To Roll Back A Driver In Windows 10
  • HDG Explains : How Does Google Chromecast Work? Product Reviews
  • Fix Registry Editing has been Disabled by Your Administrator Error

    Fix Registry Editing has been Disabled by Your Administrator Error

  • How To Erase Your iPhone Or iPad Remotely Tutorials
  • How to fix memory leaks in Windows 10 Windows
  • The 3 Best Open-Source Video Editors Tools Review
  • How To Create & Use Smart Folders On MacOS OS X
  • Best Video Converter Software Apps 2021 for Windows 10 Reviews
  • Latest Automated Social Media Tools – Compared & Reviewed Tools Review

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version