How To Configure The Hosts File On A Windows Server – i2k2 Blog

Every site hosted on a server running an operating arrangement contains a server file that helps in mapping knowledge domain names and IP addresses. The hosts file contains IP addresses followed by a world name ( separated by a space ). For exemplify, if you want to reach, the hosts file on Google ’ s server will contain the IP address followed by the url Whenever there ’ sulfur map of the IP address with the world name in the hosts file, the computer will not query the DNS server to establish a connection with a remote control device, but directly read the IP address from the hosts file to process the request. Every oculus sinister has a hosts charge and you can make amendments to allow it to accept more domain name requests. Add the hope map entries and the changes will start working without rebooting the server. This web log post takes you through the paces on how you can modify and configure the hosts file on windows server .
Configure the Hosts file on a Windows Server

How to modify & configure the hosts file on Windows Server –

Why Hosts File Modification?

Hosts file modification is done to trick the server into resolving to specific IPs. The method acting is extremely utilitarian when your web site, though hosted on a waiter, is even in the developmental stage and name-servers are not pointed anywhere. It is besides used to block particular websites.

Configuring the Hosts File

1. Run Notepad as Administrator

The hosts file is a system file, you can not modify or configure it as a dim-witted user. You need administrator tied license to make the changes, consequently, run Notepad as an administrator. Do this if you are working with Windows Vista or higher, but plainly open the Notepad if you have Windows XP or anything before that. Locate Notepad in the Start menu, right-click on it and select the “ Run as administrator ” option .

2. Locate Hosts File

After opening Notepad as an administrator, locate the hosts file. It is normally located at c:\windows\system32\drivers\etc\hosts, but not all Windows versions store it in the same locate. In lawsuit you do not find it, explore other possibilities :

  • Windows 95/98/Me – > speed of light : \windows\hosts
  • Windows NT/2000/XP Pro – > coke : \winnt\system32\drivers\etc\hosts
  • Windows XP Home/Vista/Windows 7 – > coke : \windows\system32\drivers\etc\hosts
  • Windows 8 – > carbon : \windows\system32\drivers\etc\hosts
  • Windows 10 – > coke : \windows\system32\drivers\etc\hosts

After locating the hosts charge, switch to Notepad and snap “ File ”, then “ Open… ”. Hosts charge is not a standard .txt charge that Notepad looks for by default, you will have to do a piece of troubleshooting to make the file appear in the dialogue box. Change the dropdown option displaying “ Text Documents ” to “ All Files ( *. * ) ” now that you see all files, navigate to the hosts file, double-click it, and it will open in the Notepad .

3. Overhaul Windows Defender (Windows 8)

Windows Defender running on Windows 8, by nonpayment, prevents the modification of the hosts file. You have to change the shape of Windows Defender so it can allow you to edit the hosts file .

  • search for Windows Defender through the navigation stripe and pawl to launch the application .
  • On the launch check, click on ‘ Settings ’ .
  • Type the localization of the hosts file, which is c : \windows\system32\drivers\etc\hosts.
  • Click on the Add button to append it to the list below file locations .
  • Save the changes by clicking on the option located at the bottom right, and then close the app .
  • You can nowadays edit the hosts file by following instructions given above .
  • After making the edits, save the charge to complete the hosts file edit .

4. Get Administrative Permission to Modify (Windows 10)

In Windows 10, you must access text editor program as an administrator to carry out the necessity changes to the hosts file. To do that, you may have to log in as an administrator to be able to save your changes .

5. Locate Associated IP Address

The IP address is easily traceable. It is located within the cPanel through the following steps :

  • Log into cPanel
  • Click the “ Expand Stats ” section to the leave of the screen to see more information about your account .
  • Scroll down to “ Shared IP address ” / ” Dedicated IP ”. Copy or note the IP to modify your host file .

6. Modify the Hosts File

After getting the IP address from the cPanel, add a few lines to your hosts file, including the IP address and domain name. It will look like
Save the changes by clicking on “ File ”, then “ Save ”. The hosts file shape is complete .

7. Test the Modified File

now that everything is arrant, it is prison term to test the changes. character in the URL and see if you are redirected to your new site. In case the site does not reflect any changes after being moved, run a ping trial to ensure it is directing to the chastise IP savoir-faire.

All Configured and Ready to Deploy!

Hosts file is a knock-down tool that you can use to manipulate Domain Name Resolution to suit your needs. additionally, you can use it to block malicious programs to ensure your computing environment is a bunch more impregnable. I2k2 Networks ( P ) Ltd. is one of the leading data center field, hosting and engineering services company providing comprehensive technical server management, hosting solutions, and 24/7 no-obligations aid. To know more about our comprehensive range of dedicated web hosting services and managed IT services, give us a call at +91-120-466 3031. You can besides contact us by filling out the contact form and one of our executives will get in tint with you, shortly .

reservoir :
Category : Tech

About admin

I am the owner of the website, my purpose is to bring all the most useful information to users.

Check Also


Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.