Hosts file deleted

Hosts file deleted DEFAULT
Answer
here is a link to retrieve the HOSTS file with all the exclusions included.
   "tooes" wrote in message
news:*** Email address is removed for privacy ***...
> Hi, i deleted my "Hosts" file a long time ago, from the etc folder, and i
> cant seem to find a way to get it back. i have tried making a text
> document and saving it there, but it doesnt save there as a File, just a
> TXT. document. im not sure if there is a "fix it for me" option anywhere
> on microsoft.com, but if there is please give me the link. or, if there is
mikeyhsd

Report abuse

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.
Details (required):
250 characters remaining

35 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Sours: https://answers.microsoft.com/en-us/windows/forum/all/deleted-my-hosts-file/449eade7-c988-4d51-b879-bd7939a1154d

How to Reset Hosts File Back to Default in Windows 10

Every Windows version comes with a Hosts file which provides a simple mechanism to redirect website to IP address. If the HOSTS file is modified incorrectly or maliciously, it can break your Internet. In this tutorial we’ll show you how to easily reset the HOSTS file (C:\Windows\System32\drivers\etc\hosts) back to default in Windows 10.

How to Reset Hosts File Back to Default in Windows 10?

By default, the HOSTS file is protected by the operating system so you’re unable to edit it without admin rights. Here we’re going to open the HOSTS file with Notepad and restore its content back to default:

Click the Start button and type notepad. Right-click the Notepad app appeared in the search result, and then select “Run as administrator“.

With Notepad open in administrator mode, you’re ready to open the HOSTS file. Click on the File menu and select Open.

Browse to the directory C:\Windows\System32\drivers\etc\hosts. Change the file filter drop-down box from “Text Documents (*.txt)” to “All Files“, and select the HOSTS file and click Open.

Now, paste the following text into Notepad:

Click on the File menu and Save. Now you’ve successfully reset the HOSTS file back to default in Windows 10. For Windows 8/7/Vista, the contents of the HOSTS file are different and you can copy them from Microsoft’s website.


Sours: https://www.top-password.com/blog/reset-hosts-file-back-to-default-in-windows-10/
  1. 2004 v star
  2. 370z stock suspension
  3. 280zx ls swap
  4. Pinterest brandi love
  5. Giant betta

How To Edit, Reset The Windows Hosts File

The question came just up again and I realized that I have never posted a tutorial about editing and reseting the Windows Hosts file. I'd like to take a look at the Host file's functionality first.

The Windows Hosts file can be used to block or redirect hostnames. A hostname is the core part of a web address or local address, for instance ghacks.net or localhost. Each hosts file entry specifies an IP address and a hostname, which basically tells the system that the hostname should be resolved with that IP address.

The DNS server, that is usually queried, is bypassed for all entries in the Hosts file unless hardcoded in the operating system.

Let me give you two examples where this may be beneficial: users could block known advertising companies or spammers by redirecting requests to the local PC. This basically loads nothing when a website tries to load an advertisement, popup or other element.

Another example highlights that the hosts file can be beneficial to web developers. Say you just moved your website to a new server and the IP changed in the process. DNS servers need up to 48 hours to propagate, which means that it is difficult to test the website on the new server after the move if the DNS server is still redirecting the request to the old server.

The web developer could assign the new IP address to the website to avoid the propagation issue. (Please see Work On Websites Before DNS Propagation for a detailed guide on that subject)

It has to be noted that the Hosts file can also be exploited by malicious software, either by redirecting the user from legit sites to questionable ones, or by blocking access to security software that they might need to remove those programs again from the PC.

The location of the Windows Hosts file

The Windows Hosts file is located under the following path:

%SystemRoot%\system32\drivers\etc\

The %SystemRoot% in the beginning is a variable that is set to the Windows directory. Most Windows users have installed the operating system on c:\windows which would mean that the hosts file can be found under c:\windows\system32\drivers\etc\hosts

It may be necessary to display hidden system folders if Windows Explorer is used to navigate to the folder.

A click on Tools > Folder Options in Windows Explorer and a switch to the View tab opens a configuration menu where hidden folders can be set to be revealed.

If you use Windows 10, select File > Change Folder and Search options instead and switch to the View menu then.

Locate "hide protected operating system files (recommended)" and "hidden files and folders" and make sure that the former is unchecked, and that the latter is set to "Show hidden files, folders and drives". The settings can be easily reversed this way when needed.

The Hosts file itself can be edited with any plain text editor, Notepad for instance which ships with Windows. You should check first if the Hosts file is write protected. This is done by right-clicking the file and selecting properties from the opening context menu.

Look at the attributes section of the General tab. The file is write protected if read-only is checked. If it is, remove the entry. If you keep the read-only setting it is not possible to edit or reset the hosts file.

Remember to set the read-only attribute again once you are finished to prevent third party editing of the hosts file.

The default Windows Hosts file has no active entries. Please note that a line beginning with # is a comment line which will not be executed or processed.

Editing the Windows Hosts file

Take a look at the examples in the comments. The syntax is always the same, first the IP address that you want to redirect the hostname to, then the hostname separated by at least one space.

  • To add entries to the hosts file you would enter the IP address first in the next blank line, followed by a space (or by pressing tab) and the hostname (which can be a domain name or localhost).
  • To delete Windows Hosts file entries select the whole line and press the delete button on the keyboard. You may also add # in front of any line to make it a comment so that it is not processed but preserved.
  • To edit individual entries click in the line of the mapping that you want to edit and make the changes.
  • To reset the hosts file simply remove all lines that are not comments. Microsoft has created a Fix-Ii solution to reset the hosts file which can be used instead. Users just have to execute the program once they have downloaded it to the local system. The main benefit is that they do not need to go through the manual process this way.

Please note that you need to save the changes before they become available. In Notepad you would select File > Save from the menu to do that.

And that's how your edit and reset the Windows Hosts file. Please leave any open questions or comments in the comment section below.

Related articles

How To Edit, Reset The Windows Hosts File
Find out what the Windows Hosts file is, what you may use it for, and how to edit it using built-in Windows tools or third-party software.
Advertisement
Sours: https://www.ghacks.net/2011/03/06/how-to-edit-reset-the-windows-hosts-file/
How To Edit Hosts File in Windows 10

Deleted my hosts file in Windows 8

To create a new hosts file with default contents, follow these steps, which are derived from the instructions labeled "Method 2" on this Microsoft support page. (Note: you have to be logged in as administrator.)

  1. Open the Run dialog window by pressing +.
  2. Open the folder by typing "system32" in the Run window.
  3. Browse to the folder and then browse to folder.
  4. In the folder, right-click on an open space (in the folder), point to New, click Text Document, type , and then press .
  5. Click Yes to confirm that the file name extension will not be .
  6. Open the new Hosts file in a text editor. For example, open the file in Notepad, with administrator privileges.
  7. Copy the following text to the file:

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#

# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

But you have to open the Editor in which you edit the new hosts file as administrator (right-click --> Run As Administrator).

Sours: https://superuser.com/questions/651650/deleted-my-hosts-file-in-windows-8

Deleted hosts file

Summary

This article helps you reset the Hosts file back to the default.

What's the Hosts file

The Hosts file is used by the operating system to map human-friendly hostnames to numerical Internet Protocol (IP) addresses which identify and locate a host in an IP network. The hosts file is one of several system resources that address network nodes in a computer network and is a common part of an operating system's IP implementation.

The Hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space (Tabs are often preferred for historical reasons, but spaces are also used). Comment lines may be included, and they are indicated by a hash character (#) in the first position of such lines. Entirely blank lines in the file are ignored.

If the Hosts file is changed from default, resetting it can help resolve some connectivity issues.

Resolution

To reset the Hosts file back to the default, follow these steps according to your operating system:

To reset the Hosts file back to the default, follow these steps:

  1. Open Notepad. To do this, search for “Notepad” using Cortana, and then tap or click the Notepad icon.

  2. Copy the following text, and then paste the text into the file: # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost

  3. On the File menu, select Save as, type "hosts" in the File name box (as displayed in the following image), and then save the file to the desktop.Screenshot showing how to save the "hosts" file

  1. Close Notepad.

  2. Search for %WinDir%\System32\Drivers\Etc using Cortana, and then select the File folder icon.

  3. Tap and hold or right-click the Hosts file, select Rename, and then rename the file as "Hosts.old".

  4. Copy or move the Hosts file that you created in step 3 from the desktop to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, select Continue.

To reset the Hosts file back to the default, follow these steps:

  1. Open Notepad. To do this, swipe in from the right edge of the screen, tap Search, type Notepad, and then tap the Notepad icon. Or, if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Search, type Notepad, and then click Notepad.

  2. Copy the following text, and then paste the text into the file: # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost

  3. On the File menu, select Save as, type "hosts" in the File name box (as displayed in the following image), and then save the file to the desktop.
    On the File menu, select Save as, type "hosts" in the File name box (as displayed in the following image), and then save the file to the desktop.

  4. Close Notepad.

  5. Open the %WinDir%\System32\Drivers\Etc folder. To do this, follow these steps:

    1. Swipe in from the right edge of the screen, tap Search, type run, and then tap the Run icon. Or, if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, select Search, type run, and then select the Run icon.

    2. Type %WinDir%\System32\Drivers\Etc in the Open box, and then select OK.

  6. Select the Hosts file, select Rename, and then rename the file as "Hosts.old".

  7. Copy or move the Hosts file that you created in step 3 to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, tap or click Continue.

To reset the Hosts file back to the default yourself, follow these steps:

  1. Click Start, click Run, type Notepad, and then click OK.

  2. Copy the following text to the file:

    For Windows 7 # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost For Windows Vista or for Windows Server 2008 # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost ::1 localhost For Windows XP or for Windows Server 2003 # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost

  3. On the File menu, select Save as, type "hosts" in the File name box, and then save the file to the desktop.
    On the File menu, select Save as, type "hosts" in the File name box, and then save the file to the desktop.

  4. Select Start Run, type %WinDir%\System32\Drivers\Etc, and then select OK.

  5. Select the Hosts file, and rename it "Hosts.old."

  6. Copy or move the Hosts file that you created in step 3 to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, select Continue.

More Information

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

Sours: https://support.microsoft.com/en-us/topic/how-to-reset-the-hosts-file-back-to-the-default-c2a43f9d-e176-c6f3-e4ef-3500277a6dae
How to Fix Empty Hosts File

.

You will also like:

.



85 86 87 88 89