Trying to add an entry to my Host file

Discussion in 'Hardware' started by HumbleServant1611, Jun 21, 2011.

  1. So the title to this pretty much explains what i'm trying to do i'm running win7 and these are the names i'm trying to add:
    127.0.0.1 www.novastor.com
    127.0.0.1 services.novastor.com
    127.0.0.1 webservice.novastor.com

    This is probably easy but i haven't ventured into this stuff yet and tell me if this is the right section for this thread i was unsure when i posted it
     
  2. satrow

    satrow Major Geek Extraordinaire

    You need to open the file as Administrator or uncheck the 'read only' properties on the file before saving. Re check the 'read only' setting afterwards.
     
  3. I'm running on the administrator account now and the read-only wasn't checked when i was trying to add an entry this is what it says when i open it through text:

    # 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
    ..........
     
  4. KingSteve

    KingSteve MajorGeek

    is the problem that you've added these to your hosts file and its not working?You need to open command prompt and run ipconfig/flushdns for those changes to take effect.

    Or are you asking how to add those entries in those file itself?
    Add those entries as you've typed them already into the file below everything with a #. Add the entries without a #, and save the file. Then do the ipconfig/flushdns in command prompt.
    The # sign is to indicate 'Comment Only'. You computer ignores anything after # in that file.
     
  5. satrow

    satrow Major Geek Extraordinaire

    Your finished hosts data should look like the below if you want to block those 3 sites.:
    Code:
    # 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
    127.0.0.1 www.novastor.com
    127.0.0.1 services.novastor.com
    127.0.0.1 webservice.novastor.com
     
  6. Or are you asking how to add those entries in those file itself?
    Add those entries as you've typed them already into the file below everything with a #. Add the entries without a #, and save the file. Then do the ipconfig/flushdns in command prompt.
    The # sign is to indicate 'Comment Only'. You computer ignores anything after # in that file.[/QUOTE]

    this is what i'm trying to do when i add the entries to the hosts file it saves it under documents, encoding ANSI and then i tried to do the ipconfig/flushdns but my hosts is unchanged
     
  7. handygal

    handygal First Sergeant

    What are you using to open the file?

    Start over with the original host file (in c:\I386 in my PC) opened with notepad only. Make your changes and click save. It will save it back to the same folder, not to documents.

    Your computer is not looking at a copy saved in a different directory.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds