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
34 views

Identical host file entry works in Windows 7 but not in Windows 8.1

If I add an entry to a Windows 7 hosts file then it works. If I add the same entry to a windows 8.1 hosts file then it doesn't work. It is for a web site and this is the only way to have access to it. ...
0
votes
1answer
22 views

Why my php files on my website show source in chrome ?

I just get some troubles with my php files. I host my website from my computer and I get an index.html file which link to other php files for my website , in firefox when I go from the index files to ...
0
votes
1answer
14 views

Rewrite hostname on OS X

I'm trying to rewrite a hostname using the hosts-file in OS X using the hosts-file and the following entry localhost db meaning that when i access http://db/ it should in reality access http://...
0
votes
0answers
20 views

Stop zsh incorporating /etc/hosts in autocomplete

I added loads of entries to my /etc/hosts file to aid in adblocking and tracking on the internet (a list I got from github https://github.com/StevenBlack/hosts). However, zsh now incorporates all the ...
2
votes
1answer
149 views

Blocking stackexchange

I want to block every website on the stackexchange network (as I often tend to waste a lot of time on those). How can I do it? One solution is to obviously write all the sites' entries manually in ...
0
votes
1answer
117 views

Host file hijack

I wanted to add an entry into my host file so I opened the directory and Hosts Networks Protocol Services All files except the Imhosts.sam file are messed up. all 4 of those files when double ...
1
vote
2answers
34 views

Host file is open in another process

I am trying to edit my host file under C:\Windows\System32\drivers\etc But I keep getting the message The process cannot access the file because it is being used by another process. My PC has ...
0
votes
1answer
48 views

how to block connection to a domain in firefox

i need to utterly block a domain from even being connected to. obviously, addons wont work, since those only check the URL of the site the browser is navigating to, not domains the browser is ...
1
vote
1answer
39 views

Confusion regarding DNS query vs HOSTS file

With the subject, I have windows/linux machine and In which installed virtualbox and setup 192.168.11.19 ip and entry www.abc.com in hosts file. We have setup DNS server/filter on network and setup ...
0
votes
0answers
18 views

Accessing nginx server when offline

Yo! I've been trying to get nginx to work when I'm offline, but both Iceweasel and Chromium complains about not being able to access the domain. It works just fine when I have Internet access. I'm ...
1
vote
0answers
196 views

Replace / Edit host file with windows BAT

I wish to add and remove some lines in host file within a period of time (Time setting will be done via task schedule job) I can create two BAT file, one for adding new lines and one for removing ...
1
vote
1answer
57 views

Windows 7 PC, Google blocked. All other sites OK

All google sites seem blocked with "This page can't be displayed" Error. I can ping all the google servers but even trying the IP doesn't work. Same message. I have checked hosts files. I have done ...
0
votes
0answers
61 views

Ever since upgrade to Windows 10, Firefox 45 and Chrome 49 just loop when override with hosts file entry

The standard method of developing dev sites, or accessing temporary old sites after moving them is to place an entry into c:\windows\system32\drivers\etc\hosts - just like /etc/hosts on UNIX machines. ...
-1
votes
1answer
34 views

Is it possible to set Windows 10 so that it ignores DNS servers and only uses the hosts file?

As in the title? What I want is to make it only allow Internet access to predefined domains, those explicitly listed in hosts. If it is not possible, is there any other way to make it only allow ...
0
votes
0answers
33 views

Apache serving files as plain text

Yesterday I received my Raspbarri PI 3, which I ordered to experiment around. It's up and running with Ubuntu MATE, and connected to the network. Now I've got a few little Django projects (1.9) which ...
0
votes
0answers
66 views

Password protected host file is not readable

I want to set a password on host file which resides in the windows path windows/system32/drivers/etc/host I could password-protect the file by using winrar and that's not a problem. However, doing so ...
1
vote
0answers
10 views

Automatically rewrite UNC Path (using lmhosts if possible)

I have to VPN into a domain for work. On their internal network, paths are in the format of (for example) work.local\shares\Share\SomeDirectory\SomeFile.ext. When I utilize the VPN, however, I have to ...
1
vote
2answers
59 views

Windows 10 hosts file entries get blocked automatically by # sign after some times

My OS is Windows 10. I have entered a few entries in my hosts file. But after some time or after reboot there is a # sign in the beginning of each entry. I did it using Administrator Account also. ...
0
votes
1answer
69 views

Browsers seems to ignore the hosts file while ping works?

I am trying to make xyz.com always map to google.com (216.58.219.206) on my machine (OS X El Capitan). Made the following changes to the /etc/hosts file: 216.58.219.206 xyz.com I've cleared the ...
-1
votes
1answer
42 views

Website gets redirected to 127.0.0.1 occasionally

I am trying to access AirAsia's Web Check-in Page. Occasionally I can access it. However, most of the time I get redirected to 127.0.0.1. Could this be an ISP issue? Details: My hosts file is clean....
1
vote
1answer
121 views

Why does blocking sites through hosts file break HTTPS?

I've recently decided to give this hosts file a try. Just after adding these entries on my machine I've noticed that HTTPS connection is insecure on banking sites and PayPal. Chrome shows a red ...
0
votes
0answers
29 views

Firefox Caching old Hosts file settings?

I have an imac where the family account has no password. Then I have a second account for me which is admin. I keep my dev stuff there etc. I keep my teenager from accessing social media on the ...
1
vote
0answers
50 views

Better to block a host to 0.0.0.0 than to 127.0.0.1?

I have a few hosts that I would like to block in my /etc/hosts file. For that I need to define a bogus IP address that the DNS queries get resolved to. Most of the tutorials I saw so far all mention ...
0
votes
0answers
30 views

Having two IPs for same hostname in hosts file

Request I would like to have my hostname let's say hostA resolve to IP1 if i am at home and IP2 if i am remote Is it possible to have two IPs for the same hostname so that it tries them both and takes ...
0
votes
1answer
139 views

Can I use /etc/hosts file to block ads when using Ubuntu 14.04.3 OpenVPN server?

I have an OpenVPN server hosted on Digital Ocean. I've uploaded a hosts file to the server to help filter a lot of unwanted domains. When using the server, it filters the domains. However, when I use ...
0
votes
1answer
43 views

Win2012 DNS static redirects from C:\windows\system32\drivers\etc\hosts

currently I'm using static redirects to localhost in C:\windows\system32\drivers\etc\hosts for a low level and fast spam, maleware, ad, etc. protection. Since there is a Win2012 DNS-Server around I ...
2
votes
2answers
856 views

windows 10 hosts file entries been commented out

Windows 10 is commenting out my hosts file entries. This happens periodically so every 1 hour. Although I manage to save the changes but they will be commented out after around 1 hour. I never ...
1
vote
0answers
33 views

Possible to make a program to check Windows hosts file every minute?

I know how to block facebook using hosts file. Problem is that I can just easily edit hosts file and do facebook again. So if there is a program that reports whether hosts file currently contains ...
0
votes
1answer
37 views

Can /etc/hosts or something similar be used to redirect a http URL to a file path?

My Windows 7 admin pushes out some proxy settings (e.g., a proxy.pac file available through http) to my computer every night that I don't want. I have modified this pac-file and stored it locally, on ...
-1
votes
1answer
40 views

Can I protect Win7 system file by password

I need to protect the C:\Windows\System32\drivers\etc\hosts file by password. As I know any software can't protect a folder or a file within the Windows folder. Or is there still some way? Or can I ...
0
votes
0answers
117 views

Does Blocklist manager still work and if no, what's an alternative?

Years ago I used a handy program called BlockList Manager. Though the website is still up, I can't find any working download links. I was able to downoad it from this site and run it but the program ...
0
votes
1answer
30 views

Using the command line in order to change hosts/hostnames on Centos

I need to use the command line in order to add a new host resolution on a temporary basis. I use centos. I need a new localhost resolution such as the following: 127.0.0.1 something.localhost ...
2
votes
1answer
128 views

Sending and receiving email messages to localhost with a specific domain name

I need to be able to send email messages to localhost by using another hostname/domain name that localhost. Thus instead of me@localhost I need something such as me@domain.something. (I require a ...
13
votes
2answers
2k views

What does this entry in hosts-file mean: 192.168.3.2 NPI2A54EA

I took over a Windows 7 PC from a developer and in the hosts file there was this entry: 192.168.3.2 NPI2A54EB Does anybody know why this would be entered there and if this could be a virus or would ...
3
votes
3answers
4k views

Windows 10 hosts file used by another process

There are a few other question with this same title but they do not solve my problem, so I am opening another one. I have set the permission for the "hosts" file to full access for the current user. ...
0
votes
0answers
348 views

Is it possible to apply parts of AdBlock+'s EasyList Adblocking list to the hosts file in any way?

I use AdBlock+ for Firefox, but I was wondering if it would be possible to apply AdBlock+'s EasyList filter to the Windows Host file. I doubt that that is possible because of the rules in the EasyList ...
2
votes
1answer
1k views

Would editing the hosts file temporarily block windows 10 updates?

Like several other people, I'm annoyed by the inability to choose when to update in Windows 10 Home, and this issue is one of the (several) reasons I hesitate to upgrade from 7. I don't have 10 yet ...
0
votes
0answers
207 views

Use /etc/hosts entry for nginx proxy_pass

I'm currently linking together a couple of Docker containers so I can create a reverse proxy using Nginx and the services running on those containers. An entry looks like this: location / { ...
3
votes
2answers
5k views

Edge browser error 'Hmm, we can't reach this page' loading localhost address

Microsoft Edge presenting error message 'Hmm, we can't reach this page' loading localhost address. Loopback flag is checked. Address mapped in host file 127.0.0.1 www.desenv OS: Windows 10 - ...
0
votes
0answers
261 views

Apache cannot resolve /etc/hosts entries without internet connection

I alias tw/twcdn.localhost to 127.0.0.1 in /etc/hosts: $ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost hostname tw.localhost twcdn.localhost 192.168.1.2 benito-laptop ::1 localhost ...
0
votes
2answers
299 views

Why I can't redirect using `hosts` file in windows?

I want to go to www.Google.com when I enter 1.1.1.1 in my browser. So I think I must change hosts file under windows\system32\drivers\etc path in Windows to map this IP address to Google homepage. I ...
2
votes
0answers
225 views

Override localhost IP Adress in Windows 8.1

I'm trying to set up Windows 8.1 virtual machine through VirtualBox for testing a server running on my Mac (running Yosemite 10.10.3). VirtualBox sets up a the IP 10.0.2.2 to point to the host machine'...
1
vote
1answer
35 views

Linux/Windows hosts file

I need redirect the domain (www.pokus.cz) to my local IP address (192.168.1.100/preview) because I need to make a test of my new web pages. I read that it's possible with add lines in /etc/hosts/ When ...
4
votes
2answers
1k views

Is there a maxium number of hostname aliases per line in a Windows hosts file?

I have a hosts file on Windows 7 that has an IP address followed by 10 different hostname aliases. I can ping the first nine, but if I try to ping the tenth, I get: Ping request could not find host ...
2
votes
2answers
1k views

Hosts file missing in Windows 8.1

I am missing my hosts file in Windows 8.1.  I couldn't find it in C:\Windows\System32\drivers\etc.  Here is what I see in that location: hosts.ics, hosts.old, lmhosts.sam, networks, protocol and ...
0
votes
1answer
54 views

how can I extract entries out of the HOSTS file with the command line tool in Windows 7?

It concerns the HOSTS file, Windows 7 Ultimate 64bit. I want all entries/lines with a certain name in it to be written in a .txt file. how can I do this in the command line tool?
2
votes
3answers
510 views

Alternative to 127.0.0.1 in hosts file

I have a bunch of websites blocked at the system level in my Windows 7 by using the etc/hosts file. So far, I've done it the usual way, by giving 127.0.0.1 as the website's IP address. However, I'd ...
1
vote
1answer
93 views

Windows 7 lookups on first host file entry

Today my ISP blocked my internet due to suspicious activity - outgoing requests to malicious websites. Numerous scans of my machine couldn't reveal the culprit. However, after doing a quick netstat /f ...
1
vote
1answer
70 views

change IP when a CNAME is used

I want to set 96.7.41.139 as IP address of download.microsoft.com I checked this post: http://serverfault.com/questions/452268/hosts-file-ignored-how-to-troubleshoot and set hosts as below. 96.7.41....
2
votes
2answers
219 views

Eset Smart security finds my hosts file as threat and quarantines it

Everytime I edit my hosts file, Eset Smart security finds my hosts file as threat and quarantines it. It says the host files is a Qhost trojan. What should I do?