Questions tagged [hosts-file]

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.

The hosts file can usually be found in the following locations:

Linux

/etc/hosts

Windows

%WINDIR%\System32\drivers\etc\hosts
377 questions
7
votes
3 answers

My host file is not working on Windows 10

This is crazy, I've never has this issue until now...I like to use the hosts file to block certain websites. But for some reason my hosts file is not blocking any website. I went over this post (Hosts File not working correctly) and tried most if…
echo
  • 93
  • 1
  • 1
  • 9
6
votes
2 answers

Direct URL to local file via the host file

I know I can map URLs to other URLs via the host file, but can I map a URL to a local html file on my hard drive without running a local server and loading the html file through there? Something like: C:\myTestFile.html www.google.com I'd like…
maxedison
  • 249
2
votes
2 answers

Can't map certain port and path with hosts file

On my localhost I'm trying to map http://127.0.0.1:8888/site/ to www.test.dev. Hosts file is below. When I load http://127.0.0.1:8888/site/ I see what I want but for www.test.dev I just see Firefox's Server not found page. What's wrong with my hosts…
user39822
  • 179
2
votes
2 answers

What does every localhost-like record in Steven Black's hosts files mean and how does it make sense to be included?

Steven Black's unified hosts file with base extensions includes the following block in the beginning: 127.0.0.1 localhost 127.0.0.1 localhost.localdomain 127.0.0.1 local 255.255.255.255 broadcasthost ::1 localhost ::1 ip6-localhost ::1…
Ivan
  • 7,513
2
votes
3 answers

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 been restarted a few times, even tried full shut down…
2
votes
2 answers

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. Note that I am using Bitdefender Internet Security…
1
vote
1 answer

Hosts file redirect to domain

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 doesn't work. I need to know how for Windows and…
1
vote
1 answer

Hosts file filled with random URL links

I've just opened my hosts file on a remote computer in our house and found it filled with random URL's to other websites. Is this normal? I don't think it is meant to be filled with all these links and make me worried that these sites have gained…
1
vote
1 answer

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 apps.abc.com 10.0.0.1 apps.abc.com Thanks and I look…
1
vote
0 answers

Can't block site in /etc/hosts

In my /etc/hosts I have added this line to block the www.bbc.com/persian: 127.0.0.1 www.bbc.com/persian I am using Firefox on Antix Linux (Debian), and had no success, the site can still be reached just as before. How can I block that page by…
Student
  • 111
1
vote
1 answer

Why doesn't tinder.com redirect to 127.0.0.1 in /etc/hosts?

In my /etc/hosts file in macOS Mojave 10.14.6 I have 127.0.0.1 someotherdistraction.com 127.0.0.1 https://www.tinder.com 127.0.0.1 https://tinder.com 127.0.0.1 www.tinder.com someotherdistraction.com's redirect works just fine - why doesn't…
jMan
  • 131
1
vote
2 answers

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 to the hosts file. This is fine by me so far. …
user15968
0
votes
1 answer

How to use star notation in host file to block multiple websites?

Host file allows to block a site (games.com) Is there way to use host file to block multiple websites sharing a domain? Assume the user wants to block racing.games.com and chase.games.com and arcade.games.com. Can I enter something in the spirit of…
user12363
  • 357