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

1
vote
0answers
61 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
44 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
52 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
30 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
26 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
61 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
7 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
49 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
59 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
41 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 ...
1
vote
1answer
99 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
25 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
40 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
28 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
97 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
37 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
612 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
32 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
31 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
39 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
82 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
29 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
88 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 ...
1
vote
2answers
3k 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
301 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
929 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
187 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
204 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
222 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 ...
1
vote
0answers
200 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 ...
1
vote
1answer
33 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 ...
3
votes
2answers
797 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
52 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
435 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
88 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
64 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. ...
2
votes
2answers
202 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?
0
votes
1answer
73 views

Add hostname synonym

I'm attempting allow a hostname to used as synonyms for another hostname. For example : configure mymachine.com to be a synonym for localhost:8080 so if mymachine.com is navigated to in browser the ...
1
vote
1answer
100 views

why does my local hosts file enable me to see remote server php files?

I have a hosting package with some company. They give me a temporary URL at which I can access the site and see HTML files. But when I try to access PHP files it gave me an error (500 Internal Server ...
6
votes
1answer
466 views

Acrylic DNS Proxy not resolving

So I recently had an update issue where I landed up downgrading to Windows 8. As I need to do my work, I have re-installed my XAMPP server as well as Acrylic DNS Proxy. Unfortunately, Acrylic is not ...
2
votes
0answers
62 views

What more user-friendly options are available for overriding DNS than the HOSTS file? [closed]

I've used the HOSTS file for years to override DNS to allow me to view test versions of a site etc. running as if it were live. However, helping others who might want to see the site before it goes ...
0
votes
0answers
88 views

Single machine on my network can't load a specific website

One windows 7 machine on my local home network is having trouble loading www.reddit.com I'm on a hardline into a linksys e1200 router. Other devices (laptop, phone, etc) have had no issues (wireless ...
0
votes
0answers
349 views

Changes in hosts file doesn't work

On my Windows 7 machine, I have modified my hosts file and put an entry in there for an IP address but the issue is it only works with the short name, i.e. 105.47.67.17 MyMachine works by ...
0
votes
1answer
202 views

Block page with windows hosts file

I want to use the windows 7 hosts file (in C:\Windows\System32\drivers\etc\hosts) to block this page : play.chessbase.com/js/apps/playchess However, it is not working despite all these entries: ...
1
vote
3answers
8k views

Mapping one IP address to another in the 'hosts' file

The hosts file (%SystemRoot%\system32\drivers\etc\hosts) lets you make google.com point to, for example, 127.0.0.1 on your local machine, but what if I wanted to make, say, 192.168.1.5 point to ...
4
votes
2answers
770 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 ...
0
votes
1answer
2k 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 ...