The "hosts file" is a common tool in operating systems to map names to IP addresses. These mappings usually take precedence over the DNS system.

learn more… | top users | synonyms

0
votes
0answers
8 views

Block pinterest and tumblr using hosts file on Android [migrated]

I can't seem to get my hosts file to work properly to block Pinterest and Tumblr on my Samsung galaxy S4 rooted device. Here is what I've got so far. 127.0.0.1 localhost ::1 localhost 127.0.0.1 ...
8
votes
1answer
1k views

Curl local host names on Mac OS X Yosemite

I just upgraded from Mavericks to Yosemite, and now curl can't see loopback host names. Set up a simple http server to test: $ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ... Now ...
4
votes
2answers
393 views

Personal /etc/hosts?

/etc/hosts lets you set system-wide hostname lookups. Is there a place in OS X to set per-user hostnames? I use two user accounts on my laptop and I'd like to override IP addresses for just one of ...
1
vote
4answers
2k views

Can updating the hosts file in Windows via batch file cause harm?

I have this script that I have saved as a .bat file. Can it hurt a computer? echo # >> %Windir%\System32\drivers\etc\hosts echo 0.0.0.0 www.facebook.com >> ...
0
votes
0answers
12 views

Is there an equivalent to the hosts file that is not system-wide? [duplicate]

Is there an equivalent to editing the hosts-file for ip to hostname mapping that is not global and system wide? Running FreeBSD.
17
votes
4answers
7k views

Force Chrome to open URLs as URLs, instead of searching

I have a local Apache server running, which is defined through /etc/hosts as "apache". So I often open pages like: http://apache/website/ Normally, this works fine. However, since I am using a more ...
1
vote
2answers
350 views

Everyone group Full Control of HOSTS file

Am in the process of documenting how to install a new remote access solution across (our granted somewhat small) user base. During the install of the client on XP the program asks to be given access ...
3
votes
2answers
1k views

Hosts file changes are not recognized in Windows 8

When i make changes to the hosts file in windows 8, it doesn't work. Although my changes stay in the hosts file. What I'm trying to, is to redirect the domain name riddergarn.dev to 127.0.0.1 with ...
0
votes
1answer
61 views

Hosts file redirect to domain [duplicate]

In the hosts file how do I make it instead of redirecting to an IP address redirect to either a domain(example.com) or a URL on an IP address(127.0.0.1/example.html)? I tried typing it in but it ...
1
vote
1answer
47 views

Block (nullroute?) an IPv6 hostname using /etc/hosts

I'm trying to prevent my web browser from communicating with certain hosts (mostly ads and tracking). I have a list of such hosts in my /etc/hosts file. For IPv4 I can do: 255.255.255.255 ...
1
vote
0answers
47 views

Create User Profile Specific Hosts File?

I know that by editing my C:\Windows\System32\drivers\etc\hosts file I can block any site, but I would like to take this a step further. Is it possible to have different version of this file for my ...
3
votes
4answers
2k views

Which leads to faster browsing, an ad blocker or an edited hosts file?

I recently came across the MVPS hosts file and became fascinated with the concept of blocking ads upstream from your browser. I don't know much about how quickly adblockers work, nor how quickly the ...
1
vote
1answer
33 views

Is there such a thing as a web browser where you specify host and IP for testing new sites? [closed]

Does any Linux software exist where I can specify a host xyz.com and an IP. The browser will then request a page from that IP specifying that host, no DNS lookup will be performed. I regularly move ...
0
votes
0answers
81 views

Cold Turkey not working with custom DNS server address

I blocked a few sites in cold turkey (http://getcoldturkey.com/) but after changing my preferred DNS, I discovered those rules weren't working. Is there a way to correct this?
6
votes
5answers
3k views

Hosts file on Mountain Lion stopped working suddenly

I have used my hosts file (located in /private/etc/hosts) several months to block distracting websites during the work day. This worked all well until now. Today it suddenly stopped working. Some ...
0
votes
2answers
645 views

Editing Host file to bypass a holding page

For the last two years I have secured Glastonbury tickets by editing my host file with: 194.168.131.174 glastonbury.seetickets.com This year, this has caused that particular website to be ...
3
votes
2answers
2k views

why /etc/hosts don't effect to my firefox on Ubuntu 10.04?

I tried to block some hosts to load from them ads and scripts. for example in /etc/hosts: 127.0.0.1 web-visor.com 0.0.0.0 c1.web-visor.com Why after editing and saving the file, firefox (after ...
1
vote
1answer
211 views

Host File Information

I intend to change my organization IP CLASS from CLASS A or CLASS B for 250+nodes. I need to know if I can map a single host name for 2 different IP’s in the host file. For Example. 192.168.100.1 ...
3
votes
1answer
1k views

Hosts file resetting on Windows 7

Recently I've noticed my hosts file resetting itself. D:\Windows\System32\drivers\etc (OS installed on D drive) First time it reset it to the default, and now for the first time its completely ...
0
votes
1answer
33 views

Replace local host file modification with remote. Proxy server or something else?

I need to find a solution for a problem described below (both servers running CentOS 6) My goal is to have visible website to the public where a client will type own domain name mydomain.com and then ...
0
votes
1answer
154 views

Host angularjs.org not found: 3(NXDOMAIN)

My MacBook Pro OSX 10.9.4 has network problems now, and I cannot figure it out what is causing the problem. Today I am not able to access angularjs.org with any browser, but I can access other ...
-4
votes
2answers
61 views

How to bypass hosts file?

My school issues us laptops, which obviously has filtering. But, the filters don't work at home. And somehow, they can't block Google+, even at school, so they just pointed plus.google.com to ...
19
votes
3answers
25k views

What is the relevance of “fe80::1%lo0 localhost” in /etc/hosts?

Following are the entries in my /etc/hosts. I was wondering what is the last entry (fe80::1%lo0 localhost) for. 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost ...
2
votes
1answer
141 views

How to make Opera browser obey the etc/hosts file?

Current version of Opera browser doesn't obey etc/hosts file for domains outside the local network. It looks to me like it is using its own DNS resolver. For example if I create the following ...
-1
votes
3answers
97 views

Can you surf to a site that has shared hosting with ipadress?

Is it possible to surf to a site that has shared hosting on the web hotel with the ipadress? Can you change the hosts file in any way?
0
votes
1answer
94 views

HOSTS file entries leading to permissions issues - Windows Server 2012

We have a HOSTS file that maps a document server to an IP address of the local machine, it looks similar to this: DocumentServer 10.xx.xx.11 The local IP address being 10.xx.xx.11 We are ...
2
votes
1answer
196 views

Editing hosts file to block sites not working

I put these lines in my C:\Windows\System32\drivers\etc\hosts file: 127.0.0.1 www.cnn.com 127.0.0.1 cnn.com 127.0.0.1 facebook.com 127.0.0.1 www.facebook.com 127.0.0.1 www.hotnews.ro 127.0.0.1 ...
0
votes
1answer
55 views

Blocking specific websites from browser (PC and phone) while preventing myself from unblocking them without content of others

I am trying to find a PC software (and app for phone) to block specific websites, and only the person with certain privilege (e.g. who knows the password) can unblock certain websites. (I haven't yet ...
0
votes
1answer
59 views

Granting an Ampps privileges to edit hosts file

How could I grant an application such as Ampps privileges to be able to edit hosts file. I need such feature to easily handle local Vhosts using it. I use Windows 7 64 bit and Ampps ver. 2.4
15
votes
5answers
7k views

Why can't I block Facebook using /etc/hosts on Mountain Lion?

It worked for a while in the old configuration, but then stopped working for some reason. Here is my /etc/hosts file from my Mountain Lion MacBook Air: 127.0.0.1 reddit.com www.reddit.com 127.0.0.1 ...
-3
votes
1answer
46 views

Locking Windows hosts file by password or something

I want to stop distractions like facebook.com So I put 127.0.01 facebook.com It works and I do facebook less. But still I sometimes access hosts again and erases it to do facebook. Can I lock ...
4
votes
2answers
13k views

Why does my “hosts” file entry have no effect when accessing network shares?

I added the following line to a Windows7 hosts file: 127.0.0.1 mecserver Using ping mecserver works fine, but if I use this name to connect to the notebook (like localhost) to see the Windows ...
15
votes
2answers
2k views

Could I access a blocked website via a virtual machine if the host OS has the web address blocked in its hosts file?

I was going through this Net Nanny article that mentioned about the various ways its web filter could be bypassed by kids. Among other methods, I saw this: One way that teens can get around the ...
1
vote
4answers
58 views

Blocking a site from myself and redirecting

I've tried editing "C:\Windows\System32\Drivers\etc\hosts" by adding: 127.0.0.1 websitetoblock.com But I can still access the website. Ideally I want to be redirected to a URL of my choice if I try ...
0
votes
1answer
48 views

Where does Gas Mask store its data on OSX?

I use Gas Mask to manage my hosts file on OSX. Where does it store its data?
1
vote
3answers
475 views

Block all websites in Windows 8, except for 3

I would like to create a whitelist of 3 websites on a Windows 8 machine. All other websites would be blocked. This environment is not managed by a server, these will be just 2 independent boxes. One ...
27
votes
6answers
47k views

Editing Hosts File in Windows 8

I'm trying to edit my hosts file in Windows 8 Pro. When I open C:\Windows\System32\Drivers\etc\hosts in notepad++ or any other text editor, make changes and attempt to save, I get a dialog that tells ...
0
votes
0answers
68 views

Check local hosts file (Win7) and proxy.pac

I have two groups of computers at the school: 1) computer lab, and 2) anywhere else. These are all Windows 7 machines. Up to now, I've had two versions of the Window's hosts file depending on which ...
3
votes
4answers
2k views

Is it a good idea to tweak the hosts file to speed up internet browsing?

Yesterday I came across a Firefox extension called Speed DNS which claims to speed up browsing by performing DNS lookups in advance. According to the author, it "does DNS pre-resolution of all the ...
0
votes
0answers
28 views

Additional password for hosts file on mac

Is it possible to set up an additional password for changing the hosts file on mac? When i use the command: sudo nano /private/etc/hosts I have to use the admin password to enter the hosts file. ...
0
votes
1answer
52 views

Block specific url paths

I want to block a path (eg http://superuser.com/megasupersecret), but not the whole domain (http://superuser.com). In the host file, i've tested like this: 127.0.0.1 ...
1
vote
0answers
838 views

How do i make Chrome use an IPv6 address from my hosts file?

I have a Windows 7 machine that's running Ubuntu in a VM. The VM has an interface configured as an IPv6-only, host-only network. The network is statically set up, and all that seems to be working. ...
1
vote
2answers
415 views

Firefox not taking note of /etc/hosts?

I've set foo.com to 127.0.0.1 in my /etc/hosts file in (located here on Windows: C:\Windows\System32\drivers\etc\hosts). Though Chrome loads foo.com with the one hosted locally on port 80, Firefox ...
2
votes
4answers
14k views

With Windows 7, why is an entry in the hosts file not working?

I updated some entries in the hosts file at C:\WINDOWS\System32\drivers\etc. As a test, I decided to make Google point to 127.0.0.1. # Additionally, comments (such as these) may be inserted on ...
1
vote
1answer
293 views

Tracking down edits to my /etc/hosts file

Every hour at :49, my hosts file is being replaced with the following: # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file ...
11
votes
4answers
5k views

Hosts file for Chromebook?

Is there a way to modify the hosts file in Chrome OS? ­­/etc/hosts The file is read only, so trying to modify it using sudo vim does not work. I have read that disabling root filesystem ...
0
votes
1answer
397 views

accessing remote server with name instead of ip address and port number

I have question regarding accessing my web application with some name,which is deployed on remote server. Currently, I using following URL http://160.110.67.181:8080/myapp So, I'm wondering ...
0
votes
2answers
40 views

Editing the OS X hosts file with a one-time password

I was wondering if there was a way to edit the host file using a "throwaway" password. I want to prevent myself from entering certain websites, but OS X doesn't not have a good alternative for Cold ...
0
votes
1answer
289 views

Windows - make hosts file affect ICS

I am running an Ad Hoc Wi-Fi network (Hosted network using Microsoft Virtual WiFi Miniport Adapter) on my PC. I used ICS (Internet Connection Sharing) to link my existing Wi-Fi connection through to ...
1
vote
3answers
69 views

What is writing to my hosts file?

I've got an odd situation where I'm emptying out my hosts file but when I ping something that used to have an entry in the hosts file the hosts file gets populated with the entries that I've just ...