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.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

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 ...
1
vote
1answer
27 views

redirect http request for microsoft.com to a local server?

I have been using host file to redirect required outgoing traffic to my localhost normally i would just do something like this in the host file : 127.0.0.1 microsoft.com www.microsoft.com but now ...
1
vote
1answer
52 views

How do I save my Windows 10 hosts file?

Before someone goes and marks this as a duplicate, please understand that I have tried all of the following: Running notepad as an administrator, editing the file and attempting to save. No luck. ...
0
votes
0answers
75 views

Why would a “hosts” file prevent a VPN from forwarding a port?

I would like to maintain my hosts block list while being able to use my VPNs forwarded port service, but have a conflict. I connect to a VPN server that port forwards, and my HOSTS file has only the ...
1
vote
1answer
159 views

Set-Content : Stream was not readable - trying to understand why and how to more gracefully fail

I have the following line in my PowerShell script (Get-Content C:\Windows\System32\drivers\etc\hosts -Raw) -replace '[\d]+\.[\d]+\.[\d]+\.[\d]+ local.mywebsite.com',"$ipAddress local.mywebsite....
0
votes
1answer
39 views

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'...
0
votes
0answers
27 views

What should I add to hosts file to be able to access an http server that binds only on ipv6 address?

I have setup a rocketchat server on docker. It binds only to ipv6. To verify that I can access it, I use: //NOTE: xyzf is just a replacement $> nc fe80::ba27:ebff:fe2a:xyzf%eth0 3000 GET / and ...
2
votes
2answers
160 views

DNS resolution delay for entries in /etc/hosts

For the purposes of doing web development, I have several domain names specified in my /etc/hosts. These represent several different websites that are being run locally. 127.0.0.1 site1.local 127.0....
0
votes
1answer
87 views

/etc/hosts file not properly blocking site in ubuntu

I am trying to block certain sites from my computer (namely, reddit) in order to get some work done. However, modifying the /etc/hosts file seems to have no effect. I am working under Ubuntu 18.04 ...
0
votes
2answers
23 views

How to change result of hostname command

when I issue a hostname command in my Centos 7 server, I get this response: vps.example.com I have changed /etc/hosts file with this: 204.93.xxx.xxx mail.example.com However, when I issue hostname ...
1
vote
0answers
28 views

What else can stop me from accessing my WIndows 7 etc/hosts file?

Microsoft have recently rolled out a ridiculous change to Windows Defender which "detects" the deliberate blocking (via the hosts file) of Microsoft and other telemetry domains as an "...
0
votes
0answers
43 views

How can I prevent my computer from accessing thousands of websites?

I'd like to block access to domains from my computer. This is what I tried I tried to use the domain filter in my router, but it applies only the HTTP websites. Any website that relies on HTTPS gets ...
0
votes
0answers
23 views

virtualmin delivering the wrong site

I have a webmin/virtualmin server running a site as a staging site - example.com. There is a live site with the same domain as the stating site running in the wild. I have modified my host file ...
0
votes
1answer
270 views

hosts file but for whole network?

I can't believe I can't find this after an hour of Google. This has go to be simple! On my PC, I edit HOSTS file so say, for example, domain.com goes to local IP 192.168.1.5 Great, that's fine. But ...
0
votes
0answers
73 views

How to visit ssl enabled development website when using hostfile

Pre "ssl required" on domains, to visit a development site on a development computer (Windows), I edit my host file and point the domain to the development server IP address. Which was working ...
0
votes
2answers
116 views

Windows 10 - Blocking a Website in Hosts File

I have blocked a lot of websites in my Windows 10 OS computer and edited the hosts file located in C:\Windows\System32\drivers\etc. Below is the content of my hosts file: 127.0.0.1 www.facebook.com ...
0
votes
1answer
55 views

Hosts file on OpenWRT router blocks cmd connections, but Chrome still connects

I have OpenWRT installed on a TP-Link Archer C7 router, and have added 0.0.0.0 domain.com to /etc/hosts. This seems to have the desired effect when ping-ing, nslookup-ing or curl-ing that domain on a ...
0
votes
1answer
175 views

Windows 10 hostfile url to IP address of machine

Is it possible to use a fixed url to redirect to the IP of my own PC? I use DHCP and I have no problem with it but would like to use an url i.e. "server.local" to reach a web server deployed on the PC ...
0
votes
0answers
88 views

Windows proxy config takes precedence over local hosts file

I have the following line in the local hosts file in windows: 127.0.0.1 local.example.de When accessing the url http://someservice.local.example.de:8080 I see the DNS error page of our company's ...
0
votes
1answer
380 views

How to make changes to Mac OS hosts file take effect?

I frequently edit my /etc/hosts file to block access to distracting websites when I'm trying to work (e.g. I'll add a line like 127.0.0.1 www.nytimes.com). Until recently, changes to the hosts file ...
0
votes
3answers
298 views

Force Windows 10 to always open hosts file with Notepad++

The Windows hosts file does not have an extension so Windows 10 by default does not allow creating a permanent association with a program. How can I open the hosts file with Notepad++ without Windows ...
1
vote
1answer
44 views

Overriding a CNAME within a CNAME chain works on Ubuntu but not Windows

Best practices aside (not having CNAME chains), I am curious to know why this is happening. I have the following: CNAME subdomain.example.com -> CNAME other.example.com -> A 172.17.0.1 If I wanted ...
1
vote
2answers
10k views

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 ...
0
votes
0answers
72 views

What is the most effective way of remotely controlling the hosts file?

I need to control the hosts file on other Windows machines. I have administrator access on those machines and can install anything, the only question is — what to install? Ideally I would simply make ...
0
votes
1answer
714 views

Unable to unblocked the sites in Hosts File

I blocked some site in Hosts File, but when I tried unblocking it by deleting the indicated sites. I'm still unable to access the sites. Can anyone help me with this? I blocked the sites by using ...
1
vote
1answer
60 views

Redirect website url to a different url of that website (hosts)

I am unsure if this is possible. I am trying to use the Window's hosts file to redirect the address www.youtube.com to music.youtube.com. When I ping youtube.com, I am returned with this IP: 172....
1
vote
0answers
137 views

Identify DNS queries that get resolved by HOSTS file

How can I identify DNS lookups that are resolved by my HOSTS file? Over the past month or so, I've begun experiencing long delays involving content stored on SharePoint Online, affecting Word, Excel ...
0
votes
0answers
28 views

Windows redirects folders shares

I don't know if I'm writing my question in the right place, but, here it goes. My company owns a Windows Server 2012 R2 which shares some folders through our network. We're trying to access it ...
1
vote
0answers
22 views

Windows 10 hosts file only recognizing one redirect

In my hosts file I have a.b.c.d website1.com a.b.c.d website2.com Website 1 works just fine, redirecting me to the new website. Website 2 does not. It sometimes tells me that the connection is ...
0
votes
1answer
89 views

“/etc/hosts” hostnames ignored and searched instead in Safari and Chrome

I added the local url data 192.168.33.11 core-fine.local into /etc/hosts, saved the file and for a time I was able to serve and see a local website powered by Vagrant. It was all working just fine ...
-1
votes
1answer
101 views

How to edit hosts file in Windows 10

www.somesite.com can be accessed only through add-ons VPN.  How can I add it to the hosts file in Windows 10, so it can be accessed without using a VPN? The IP address has multiple domain names ...
5
votes
1answer
370 views

`.dev` TLD resolves to 127.0.0.1

My Mac (Mojave 10.14) is unable to access any website with a .dev domain name, such as get.dev. I tried running $ ping get.dev and got the following output: PING get.dev (127.0.0.1): 56 data bytes 64 ...
0
votes
1answer
892 views

Binary zeros in c:\windows\system32\drivers\etc\hosts

The file c:\windows\system32\drivers\etc\hosts on my Windows 10 machine contains 43 binary 0 and nothing else. I did not edit the file in past. The modification time is a day ago. The machine has not ...
2
votes
1answer
1k views

Does adding too many entries to the hosts file causes internet slow down?

I just wanted to clarify one thing, Does adding too many entries to the %windir%/system32/drivers/etc/hosts causes internet slow down? Does duplicate hosts entry slows down browsing performance? ...
1
vote
1answer
11k views

Can a host file DNS entry point to multiple Ip addresses?

Can a host file DNS entry point to multiple Ip addresses ? basically i want have to ad servers , but no balancer due to port issues , the solution i think is host file entry ,but can one dns point ...
1
vote
1answer
1k views

Windows 10 took long time to resolve host names

The problem I've encountered happens since 1809 update. This is some of the description of what happened: My Windows laptop can connect to Wi-Fi networks. When I connect to it, this happens: The ...
0
votes
1answer
1k views

How to edit the hosts file in MS Windows 10 [duplicate]

I am looking for a step by step instruction on how to edit the hosts file in MS Windows 10. To edit this file you need to have admin rights, which I have. I tried via MS Windows Explorer. This tool ...
32
votes
2answers
15k views

I can't visit websites that have “.dev” domain

I'm trying to visit websites like https://get.dev, but instead of loading website, there appears "Resolving host" message and then I'm getting "This site can’t be reached get.dev’s server IP address ...
1
vote
1answer
34 views

Can /etc/hosts values be used while still (rapidly) falling back to their DNS values?

I have a server hosted on my home network. Normally, I would access this from its DNS value (e.g. example.com.) However, my ISP has an awkward setup wherein I cannot access my home network's external ...
4
votes
2answers
824 views

How to find out why a local redirect is happening?

A while ago I believe I added a local redirect for .dev domains to localhost. I can no longer visit any .dev domains in any browser on my Mac machine. However now I want to remove this redirect, since ...
1
vote
2answers
443 views

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 ...
0
votes
1answer
21 views

PHP version different on server then the one set in vhost

So I have an odd problem. I followed this tutorial https://tecadmin.net/install-multiple-php-version-apache-ubuntu/ to install multiple versions of PHP on my local server. On most sites it works, ...
0
votes
1answer
93 views

resolve one host differently on windows server session

I want to temporarily (=resets after disconnect) resolve a host differently for (only) my connected session (via RDP) on a windows server machine. Can this be done? Something like a termporary hosts-...
2
votes
1answer
366 views

Autocomplete host names in Windows CMD

WSL Bash thing does it, for example, when using ping : But CMD can not do it. Is there a way to achieve that? Note: I know about clink, but it does not provide hosts file auto-completion, which is ...
0
votes
0answers
97 views

Hosts file changes don't apply for TCP connections

A program on my windows PC makes a TCP connection to a IP address e.g. 122.122.122.122 I have made a TCP server on my local machine and made the following change in my hosts file 192.168.1.123 ...
0
votes
0answers
487 views

DNS service crashing in Windows 10 with large HOSTS file

I don't get why my Android device handles a large hosts file just fine, but if I try to use a similarly-sized file in Windows 10, the DNS Service starts using a massive amount of CPU and slows ...
21
votes
2answers
4k views

.dev domains don't resolve

I noticed today that no .dev domains will resolve in any browser on my MacBook while trying to access web.dev; they all say “__.dev refused to connect.” I did a quick google search for site:.dev, and ...
0
votes
1answer
121 views

host process for windows cpu 40-50% when used with hosts file

I can't run dnsclient because host process for windows cpu 40-50% when used with hosts file, my laptop works fine with an empty hosts file and when it is disabled, but I want to run it with a hosts ...
0
votes
0answers
28 views

Block a specific url in HOSTS file [duplicate]

I can block a website by editing the file hosts located in C:\Windows\System32\drivers\etcWindows 8.1 and adding 127.0.0.1 example.com at the end. But I cannot figure out that how can I block a ...
-5
votes
1answer
893 views

How do I block domains using the hosts file on Windows?

I used to block domains on Windows using the hosts file like the following: 127.0.0.1 www.cnn.com However, now it is not working and the domains are resolving. $ nslookup www.cnn.com Non-...

1
2 3 4 5
7