Modify & save hosts file

Page 1 of 2 12 LastLast

  1. Posts : 947
    windows 10 professional 64-bit, 22H2
       #1

    Modify & save hosts file


    I have 2 machines: Win10 & WinXP. For some reason, my hosts file on my Win10 machine listed Windows 10 Help Forums as 127.0.0.1. I don't know how this happened & I have not been able to delete that entry & save the hosts file in Windows/Drivers/etc.

    How can I give myself (the administrator) permission to access the file & to save it in the etc. folder?
    Is there a utility that will give me control over the hosts file?

    Thank you in advance!
      My Computers


  2. Posts : 42,978
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Bluelife Hosts Editor is convenient. Easy to find. Easy to use. Dedicated, with a few extra features.
    Checkboxes let you enable and disable entries. It deals with permissions issues. Easy.

    Modify & save hosts file-untitled.png
    Last edited by dalchina; 25 Feb 2018 at 06:59.
      My Computers


  3. Posts : 822
    Microsoft Windows 10 Pro 64-bit
       #3

    Notepad ++ edits it easy too. Asks to restart with admin privileges when you try to save it.
      My Computer


  4. Posts : 27,182
    Win11 Pro, Win10 Pro N, Win10 Home, Windows 8.1 Pro, Ubuntu
       #4

    phrab said:
    I have 2 machines: Win10 & WinXP. For some reason, my hosts file on my Win10 machine listed Windows 10 Help Forums as 127.0.0.1. I don't know how this happened & I have not been able to delete that entry & save the hosts file in Windows/Drivers/etc.

    How can I give myself (the administrator) permission to access the file & to save it in the etc. folder?
    Is there a utility that will give me control over the hosts file?

    Thank you in advance!
    No need for 3rd party software.

    Download the shortcut I provided in this mini tutorial: Protecting yourself from In-Browser Miners Solved - Windows 10 Forums

    Default hosts files:

    For Windows XP or for Windows Server 2003
    Note   Note
    There is no hashtag/number sign<#> before the last line: "127.0.0.1 localhost", on XP

    # 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



    For Windows 10

    # Copyright (c) 1993-2009 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
      My Computers


  5. Posts : 1,680
    X
       #5

    Hey guys. Read the OP's post:
    I have not been able to delete that entry & save the hosts file in Windows/Drivers/etc.
    He cannot save the file ... because it's protected. He doesn't have rights.
    I discovered this problem long ago with Windows XP (or was it Win 7 ?).
    The solution is to unlock the file. You must have permission to write to the hosts file.

    So ... take ownership of the file and give yourself write permission.
      My Computer


  6. Posts : 27,182
    Win11 Pro, Win10 Pro N, Win10 Home, Windows 8.1 Pro, Ubuntu
       #6

    margrave55 said:
    Hey guys. Read the OP's post:
    I have not been able to delete that entry & save the hosts file in Windows/Drivers/etc.
    He cannot save the file ... because it's protected. He doesn't have rights.
    I discovered this problem long ago with Windows XP (or was it Win 7 ?).
    The solution is to unlock the file. You must have permission to write to the hosts file.

    So ... take ownership of the file and give yourself write permission.
    I believe the problem is he's going about it wrong.
    You need to open Notepad as admin first and above all.
    Then, in/through Notepad go to hosts, to make changes.

    My shortcut does all that for you.
      My Computers


  7. Posts : 947
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #7

    dalchina said:
    Bluelife Hosts Editor is convenient. Easy to find. Easy to use. Dedicated, with a few extra features.
    Checkboxes let you enable and disable entries. It deals with permissions issues. Easy.
    Thank you! I will try that. I've used software that you've recommended in the past & I've always been happy with it!!
      My Computers


  8. Posts : 947
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #8

    Cliff S said:
    No need for 3rd party software.

    Download the shortcut I provided in this mini tutorial: Protecting yourself from In-Browser Miners Solved - Windows 10 Forums
    Done! Thank you!
      My Computers


  9. Posts : 31,644
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #9

    phrab said:
    For some reason, my hosts file on my Win10 machine listed Windows 10 Help Forums as 127.0.0.1. I don't know how this happened...
    phrab does know now (on another thread) apparently it's included in HP hosts (for some unknown reason).
    Windows 10 won't connect to https://tenforums.com
      My Computers


  10. Posts : 947
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #10

    Cliff S said:
    No need for 3rd party software.

    Download the shortcut I provided in this mini tutorial: Protecting yourself from In-Browser Miners Solved - Windows 10 Forums

    Default hosts files:

    For Windows XP or for Windows Server 2003
    Note   Note
    There is no hashtag/number sign<#> before the last line: "127.0.0.1 localhost", on XP

    # 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



    For Windows 10

    # Copyright (c) 1993-2009 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
    This problem has occurred again, but this time it's worse. I have 2 machines, WinXP & Win10. I am currently using WinXP to post this question because I've been unable to reach TenForums on my Win10 machine. I just get a message that the site can't be reached.

    Then I remembered that I might have an entry in the hosts file that was blocking this site &, sure enough, there was. But here's a new problem.
    1. Again, I cannot delete & save the file when I delete the "www.tenforums.com" entry in hosts. I get a message that the file is being used by another process.

    2. Something is making it extremely slow to open any zip files. At first, I couldn't open "Edit Host File.zip", even though I have 7-zip to open zip files. So something is making it open very slowly.

    3. When I finally got the hosts file open in Notepad, deleted the TenFourms entry, I couldn't save the changes. I got the message that the host file was being used by another process. (This also happened when I tried to rename the hosts file & tried to edit it using BlueLife Hosts Editor)

    4. When I went to Services & checked the DNS Client service, I (everything was greyed out). When I tried to stop it using Task Manager, I also was unable to stop it .

    5. One other thing, when I rebooted Win10, I could not access the internet or access my home network. I could still access Win10 from my WinXP machine over the home network though. I restored Win10 completely from a Macrium Reflect backup & was then able to access the internet & my home network...but not this forum. (CORRECTION: I just tried again & cannot access WinXP or the internet from Win10).

    I need to edit & save my hosts file & also stop or restart my DNS Client. Any suggestions?
    Thank you in advance.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:24.
Find Us




Windows 10 Forums