Questions tagged [hosts]
host is any machine or computer connected to a network and can offer information, resources, services and applications to users or other nodes in the network.
47
questions
1064
votes
17
answers
1.1m
views
How to clear/flush the DNS cache in Google Chrome?
As you probably know Google Chrome has its own internal DNS cache. Is there a way to clear it without having to wait for the time out or close the browser?
90
votes
5
answers
218k
views
Using wildcards in names in Windows hosts file
Is there a way to create a wildcard domain in the Windows hosts file.
I tried this
xxx.xxx.xxx.xxx *.somedomain.com
This does not work, is there maybe some other syntax I should use?
I am ...
4
votes
5
answers
16k
views
Hosts File not working correctly
I'm having some issues with my hosts file.
127.0.0.1 localhost
127.0.0.1 whatever
127.0.0.1 sub.localhost
127.0.0.1 example.com
localhost and whatever both work. However the others have weird ...
4
votes
5
answers
2k
views
Editing the hosts file
I'm looking to edit the Windows TCP/IP hosts file (at c:\windows\system32\drivers\etc\hosts). I'm wondering, what is the best way to do this (on Windows XP)?
Let's say that I want to redirect, say, ...
4
votes
1
answer
20k
views
Why does the hosts file in Windows 10 no longer block YouTube?
The file hosts in C:\Windows\System32\drivers\etc blocks every website, that I put in there except YouTube. It used to block it but no more.
There were always workarounds to go on YouTube, if you ...
3
votes
3
answers
4k
views
Domain blocked in Windows hosts file, but the site is still accessible
I'm trying to figure out why my hosts file isn't being honored correctly. And by correctly I mean, when I visit the website I'm trying to block it takes about 12 hours for it to take effect.
And yes, ...
9
votes
4
answers
11k
views
Unable to block a website through System32/drivers/etc/hosts
I am trying to block social media and news websites on my local machine (Windows 7).
I added the below lines into my hosts file:
127.0.0.1 www.thatstamil.com
127.0.0.1 www.facebook.com
In that ...
26
votes
8
answers
31k
views
Does Firefox ignore the hosts file? How to make Firefox honor the hosts file
I'm using Firefox browser in Ubuntu 18.04. I made an experiment where I want some domain names to be resolved to another IP address than their actual one. Firefox seems to ignore the IP in the hosts ...
9
votes
2
answers
84k
views
How do I set an alias name in the hosts file?
I have a production server, on which three different application are running. I need to configure aliases for that server, according to which application needs to be accessed by the user.
How do I ...
3
votes
2
answers
5k
views
Windows Script Host Error Dialog Popups in the morning
A few days ago when I resume my computer from sleep mode in the mornings I would see an error dialog from "Windows Script Host" that read: "There is no script engine for file extension ".vbs". I am ...
42
votes
1
answer
78k
views
What's the Windows equivalent of "/etc/hosts"? [duplicate]
I can block my little brother from accessing a website on my Mac by adding the following line to my "/etc/hosts" file.
127.0.0.1 someaddictingwebsite.com
Do Windows systems have a file ...
27
votes
8
answers
72k
views
OSX Sierra hosts file is ignored
For some reason, two days ago my hosts file started being ignored.
I'm using Mac with Sierra OSx .
This is the current content of the /etc/hosts file
##
##
# Host Database
#
# localhost is used to ...
7
votes
2
answers
2k
views
How can I route a domain to my box at home?
I currently own my own domain, and have been using dyndns.com's "custom DNS" to allow me to redirect 'example.com' to my website at home, which is on a dynamic IP.
I've now switched over to a VPS ...
6
votes
3
answers
38k
views
How can I modify my hosts file? It is read-only and cannot be modified even as Adminstrator.
Does anyone know how to modify entries on the hosts file when it is marked as read-only?
I have tried unchecking the Read-only tick box, but I get an Access is Denied error, and I'm running as the ...
5
votes
3
answers
6k
views
hosts file for ip address
I would like to map ip address to specific localhost interfaces (e.g. 23.45.66.77 => 127.0.3.3). For named hosts I can use the hosts file. Naturally this doesn't work for IP address.
This has to work ...
4
votes
1
answer
5k
views
Using Proxy Server to act as hosts file
I am trying to see if I can have a specific Hosts file that only a Proxy Server application on my machine will use while the remainder of the machine uses the normal proxy server.
For example, I want ...
3
votes
4
answers
69k
views
How to edit the hosts in Windows 7?
I would like to add an address to the hosts file. I am running Windows 7 (Hebrew edition), and I am the system administrator.
I have tried the command notepad C:\Windows\System32\drivers\etc\hosts to ...
3
votes
2
answers
2k
views
How can I overwrite the hosts file in Windows 7?
I can't overwrite my hosts file in Windows 7.
I open Notepad as an administrator and open the hosts file (C:\Windows\System32\drivers\etc) as an administrator.
96.44.181.245 www.Google.com
has been ...
2
votes
3
answers
73k
views
Why is "127.0.0.1 localhost" needed in HOSTS file?
I disabled all my network connections and deleted 127.0.0.1 localhost in HOSTS file but cannot find what had I broken by it. My IIS and MS SQL Server 2008 R2 continues to resolve localhost just fine
...
1
vote
0
answers
1k
views
How to redirect a URL to a certain IP, as with /etc/hosts?
Someone on my shared server has messed with some setting such that gethostbyname('www.google.com') (PHP) gives me the IP for his website, rather than Google. I believe this can be done via the /etc/...
0
votes
5
answers
2k
views
How can I create shorter URLs to sites on my computer?
I was wondering if I could use my Windows 7 hosts file to create shorter URLs for sites? OR is there another way. I tried ones like the following but I'm guessing it only works with IP Addresses?
...
290
votes
11
answers
876k
views
Remove key from known_hosts
I built several virtual machines during the last few weeks. The problem is, the .ssh/known_hosts gives me the Man in the middle warning. This happens because another fingerprint is associated with the ...
27
votes
4
answers
44k
views
Adding a line into the hosts file, getting permission denied when using sudo - Mac
I'm trying to add a line into the hosts file on my Mac by executing a one line command on the terminal.
I thought this would be easy using sudo, but it returns "permission denied" when I try to add &...
25
votes
3
answers
10k
views
Remove ads in Viber for PC [closed]
How do I disable ads in Viber for PC - version 11.4 (2019). The hosts file trick no longer works (the following one):
127.0.0.1 ads.viber.com
127.0.0.1 ads.aws.viber.com
127.0.0.1 ads-d.viber.com
...
15
votes
2
answers
23k
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 ...
13
votes
3
answers
22k
views
How come hosts file redirection fails?
I am trying to redirect google.com to my local machine for fun and learning with this /etc/hosts file on my Mac.
127.0.0.1 www.google.com
However, www.google.com still maps to the Google home page ...
13
votes
1
answer
45k
views
How to change IP address to point to localhost?
A sandbox enviroment of a web app is reachable directly by an IP address: http://<my_ip_address> without a login name.
Is there a way to make a virtual host in my local machine, named as <...
12
votes
1
answer
16k
views
How to list all DNS names pointing to an IP?
I know – for example – that there are two DNS names for an IP. However nslookup ip only returns one record.
How do I get all the records for an IP?
11
votes
2
answers
32k
views
Can a router map a URL to a local ip?
I'm setting up a facility with many different computers where I don't have access to their hosts files. How would I map test.com to a local server without using the hosts file? Can this be done using ...
11
votes
3
answers
5k
views
Mac OS X "hosts" file, can I include other files with it?
I am working on some automation scripts to configure my network settings, hosts file contents, and /etc/resolver files, when accessing different networks I frequent between.
There are some ...
10
votes
5
answers
23k
views
DNS lookup fails but nslookup works
I have DNS lookup problems on my internal network. I'm using an internal DNS server with the IP 192.168.1.254.
If I use nslookup everything works like it should:
>hawk:~ user$ nslookup ...
7
votes
3
answers
28k
views
Custom host file for Firefox
Instead of changing my host file I'd like Firefox to think my domain is on my own server while my other browser uses the real IP address. I used to edit my host files but that forces both browsers to ...
6
votes
4
answers
8k
views
Block website on Windows without host file
Is it possible to block website on Windows without modifying hosts files? The reason I do not want to use it is that users need administrator options to modify it.
I need some easier way to block a ...
6
votes
5
answers
5k
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 ...
5
votes
2
answers
1k
views
In your ssh config is it possible to have one host entry for multiple machines on the same domain
I'd like to be able to do something like
Host *
HostName *.mydomain.com
...
So I can type something like
ssh test
ssh ci
ssh dev
Instead of having to type
ssh test.mydomain.com
ssh ci....
5
votes
3
answers
6k
views
hosts file and unblocked subdomains
I modified hosts file to block google.com and its subdomains but it blocks only the main domain name. It does not block the subdomains.
Windows 7 Starter
127.0.0.1 google.com
It blocks google.com ...
5
votes
3
answers
18k
views
How to alias a hostname?
Is it possible to keep a network alias - without specifying the IP address in the hosts file? For instance, I have abcd.efgh.com but want abcd -> abcd.efgh.com so that ping and ssh work as they ...
5
votes
4
answers
2k
views
Windows 7 HOSTS files keeps reverting it's permission back to READ-ONLY
As a full-time Web Developer I am constantly adding fake domains to my Windows 7 HOSTS file to point a domain to my localhost web server that I develop on.
I have even built a nice little PHP script ...
4
votes
2
answers
18k
views
How to reroute all traffic using hosts file?
Is there a way to redirect all traffic to one IP in the hosts file? If not, how else could i achieve this?
3
votes
1
answer
2k
views
Redirect one domain to other using hosts file or similar
Usually, the syntax in the /etc/hosts file is
IP hostname alias1 alias2
but I want to make something like
SERVER SERVER2
but I don't want to specify the SERVER IP in the file, only the host name....
3
votes
2
answers
25k
views
changing hosts file on snow leopard
I need to add an entry to my hosts file on Snow Leopard. I could edit the hosts file with root user enabled, but in the system doesn't let me to save this file saying that I don't have permissions to ...
3
votes
5
answers
18k
views
Possible reasons WINDOWS\system32\drivers\etc\hosts is not working (appart from the obvious)
Here's my C:\WINDOWS\system32\drivers\etc\hosts file:
127.0.0.1 localhost
192.168.100.1 router
testing it:
C:\>ping router
Ping request could not find host router. Please check the ...
3
votes
3
answers
11k
views
ssh - no route to host
I have 3 machines (A, B and C) behind WLAN Router. From B i can make ssh to A and from A to B also. Ssh between C and A is also working (both destination, C->A and A->C). But when i try to connect B ...
2
votes
1
answer
14k
views
Can't block connections to google via HOSTS file
Steam and Spotify connects to "clients.l.google.com" (172.217.21.206) using 5 to 100 kb. It might be analytics.
I blocked google.com, www.google.com, clients.l.google.com via hosts file, somehow it ...
2
votes
1
answer
4k
views
Redirect a url to another url
I need to redirect a url to another url. THe PC where this should be done has Linux but no server program such as Apache. When the user type www.mycomerp.com, it should redirect it to http://localhost:...
1
vote
3
answers
953
views
How to simulate entries in HOSTS file with an IE 7 browser plugin
Is it possible in Internet Explorer 7 to simulate HOSTS file entries with a plugin?
For example, can you tell IE to resolve all requests for xyz.com to a specific IP address?
We have some QA testers ...
0
votes
1
answer
2k
views
automatically add entries to hosts file
I have a hosts file on my dropbox in which I create shortcuts to all kinds of ip's that I use often (server dev is added as d, stackoverflow is added as so and so on).
Over time I have built quite a ...