Modifying your hosts file enables you to override the DNS for a domain, on that particular machine. This is the useful article when you want to test your website without the test link and verify that an alias site works, prior to DNS changes; and for other DNS-related reasons. Modifying your hosts file causes your local machine to look directly at the IP address specified.
Step # 1: Just search for Notepad, then right-click on Notepad and choose to run as administrator. If you’re using Windows 10 this will be on the Start Menu.
Step # 2: Open the following file: c:WindowsSystem32Driversetchosts
Step # 3: To modify the hosts file, you add two entries to the file that contains the IP address that you want the site to resolve to and the address. Adding the following two lines, for example, you need to point www.domain.com and domain.com .
Step # 4: Click File > Save to save your changes.
Step # 5: Go to cmd option and ping the IP 18.104.22.168 and ping your domain. In the process, you will confirm the IP address where your domain running.