Help modifying hosts file

Discussion in 'macOS' started by Calipso, Aug 28, 2008.

  1. Calipso macrumors member

    Joined:
    Jul 30, 2006
    #1
    A website I go to is having problems with DNS, and has suggested to add a line to the hosts file so it will work. But Icant for the life of me work out how to do it. Ive tried searching, but when I did try and modify it, it would not let me save the file. Said I did not have permissions, yet I am logged on as Administrator. Also, other guuides say to use some program called netInfo. I do not have this in my utilities folder :S Im running 10.5.3 atm. Any help would be appreciated!

    Thanks
     
  2. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #2
    you will have to do edit hosts in Terminal using a text editor with sudo permissions using this command.

    Code:
    cd /private/etc; sudo nano hosts
    edit hosts using nano text editor, save by pressing control+O then exit by pressing control+W.
     
  3. costabunny macrumors 68020

    costabunny

    Joined:
    May 15, 2008
    Location:
    ~/bunny/
    #3
    In the /etc/hosts file you'll need to enter :>

    0.0.0.0 www.thissite.com

    (replace 0.0.0.0. with the IP and the url with the correct one)

    I would however be cautious using hosts for a site on the web (Ivenever seen one that suggests a hosts entry for a dns issue). The hosts file can be used to redirect genuine traffic to a spoof or malicious site.

    Just suggestion to excesize caution when adding websites on teh web to hosts.

    Enjoy
     

Share This Page