Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
31 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
8 views

Is there a way to map a Chrome special URL such as chrome-extension:// to a valid HTTP url?

I am trying to apply a distraction-free approach to Chrome extensions (not definitive, but just for certain focus slots). I could use an extension such as blocksite.co but it works only valid URLS (i....
0
votes
0answers
62 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
45 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 ...
0
votes
1answer
37 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
43 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
17 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 ...
0
votes
0answers
31 views

Skyfonts messing up hostname

i installed Skyfonts on Windows10, and the stupid thing is overriding the local hostname. it does not matter what i enter in my hosts file, 127.0.0.1 will always resolve to local.skyfonts.com. even ...
-5
votes
1answer
187 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-...
0
votes
0answers
52 views

Is it possible to block a domain on linux without superuser access?

The easiest way I know to block a domain is to go add something like this to my /etc/hosts file: 127.0.0.1 facebook.com Boom, done. But I have to be a superuser. Which is a bit annoying, because ...
1
vote
1answer
230 views

Fake “.dev” domain added to hosts file for development purposes redirects to HTTPS in Chrome on Windows even when local dev server is not active

I am building an Express.js app locally. In order to test this in something other than localhost, I added the following entry to my hosts file: 127.0.0.1 mynewapp.dev Without even starting the ...
1
vote
1answer
126 views

Part wildcard in hosts subdomain possible?

On our server we've got a lot of redirects for specific subdomains, which always end in the same: 127.0.0.1 abc-thesame.domain.com 127.0.0.1 def-thesame.domain.com 127.0.0.1 xyz-thesame....
0
votes
0answers
115 views

Is it normal for a large HOSTS file where all entries point to 0.0.0.0 to take a very long time to update the DNS cache?

I have an old laptop (Core 2 Duo U9400 @ 1.4Ghz) which struggles with the modern internet. I wanted to try adding one of the exceptionally large (~900,000 entries) hosts files which are common to ...
0
votes
1answer
390 views

Windows 10: can't edit hosts, can't grant Administrator access to edit it, can't uncheck readonly mode

I can't edit c:/windows/system32/drivers/etc/hosts runing notepad as administrator: But notepad says I have no access rights: Can't change access rights: Tried changing access rights to etc and to ...
0
votes
1answer
257 views

NAT loopback and DynDNS

I've successfully configured DynDNS in my router and now I'm able to reach my home server from outside my local network using my custom domain. Using the very same domain I'm able to reach my home ...
0
votes
1answer
342 views

How to block distracting websites using hosts file?

Regarding the question, I've asked before and the feedback I received, I've done the following in order to block Twitter I ran command prompt as administrator and I entered the code ipconfig /...
1
vote
1answer
142 views

Powershell script to clear text after localhost line and add static hostname and current ip address to the file

Need to clear all text after the line 127.0.0.1 localhost host file in PowerShell. last line is the localhost entry in the host file after this line I would like to delete all text lines is it ...
0
votes
1answer
47 views

Is there any possibilities to access the host name which is added in other system host file?

I have added the new host name(www.example.com) and IP in host file at my system.I can access the website. Question is, Can access the same host name(www.example.com) in other system? Is there any ...
1
vote
0answers
134 views

How do I disable the “Disable strict blocking for x.com” Temporarily/Permanently in uBlock Origin? [closed]

I've got a friend whose really bad at computers, and he asked me to do some stuff for him to make him more productive because he believes I'm a computergod, and I'm not, I only know how to delete your ...
0
votes
1answer
339 views

Redirecting domains in /etc/hosts

In my /etc/hosts file, I have the following line: 127.0.0.1 www.reddit.com When I open www.reddit.com in chrome, it still displays normally. When I open www.reddit.com in an a chrome incognito ...
1
vote
1answer
92 views

Redirecting/aliasing domain to localhost for development [duplicate]

How do I configure /etc/hosts so that if I go to google.com it's actually routed to my localhost:3000? I'm aware of similar questions. Here is what my hosts file looks like right now: ## # Host ...
2
votes
1answer
75 views

Can a cookie be made permanent (by the browser, not the server)?

I have a program installed K9 Web Protection in my PC. It detects any changes made in the hosts file and blocks the access to that website. I have made these changes in my hosts file ::ffff:216.239....
0
votes
1answer
49 views

Found weird entries in my work pcs hosts file

For debugging purposes of an application I edited my hosts-file on my work computer only to find two entries in there that confused me. I know that I did not add those and I don't really understand if ...
0
votes
1answer
886 views

Large hosts file causing high DNS Client CPU usage?

I'm currently using a blacklist off https://github.com/StevenBlack/hosts, which has 50,000+ domains. However, I'm finding that my DNS Client CPU usage is abnormally high. Does a large hosts file ...
0
votes
1answer
134 views

How to force mapping of domain names of https sites to ip addresses of http sites by editing hosts file in Windows 7? [closed]

I'm editing hosts file in Windows 7,what I want is to map domain name of sites that uses https to IP address of an unsecured site that obviously uses http. For instance, I have the IP address of '...
2
votes
2answers
287 views

/etc/hosts can't be a symbolic link?

I need to write a small script that allows me to switch between development environments by changing the /etc/hosts file. I would like to use a symbolic link instead of replacing the whole /etc/hosts ...
1
vote
1answer
185 views

Apache server: Alternative to editing hosts file on user's Windows 7/10

I have an Apache server running MyWebsite. This server is either on VirtualBox or on a standalone box that I run an Ethernet cable to. Until recently I had always accessed it by typing the ip address ...
0
votes
2answers
4k views

Add CNAME record in BIND zone file

I have set up a virtual private network using virtualbox with a DNS server named: dns1.xyz1.com. I have a webs server named: xyz1.com. I want to use my DNS server to resolve the IP address of the ...
-2
votes
1answer
33 views

Where is this web pages located/ hosted?

when I type 192.168.154.154 (some 192.168.0.1, 192.168.1.1) on my browser, it gives me some web pages that (sort of) controls the setting/ options on my router. Now my questions are: Where is this ...
2
votes
1answer
441 views

hosts file is updated by some process

I have a problem with C:\Windows\System32\drivers\etc\hosts file. Every half hour or so this file is updated by some process. I have this file opened in notepad++ and I see that some lines are added (...
0
votes
1answer
44 views

Why website can have two ip addresses?

For example, host github.com prints two ip addresses as below. >>> host github.com github.com has address 192.30.253.112 github.com has address 192.30.253.113 ... Why can it have two ...
1
vote
3answers
3k views

/etc/hosts not working on macOS 10.13

I tried to use /etc/hosts file to redirect some websites to localhost. To do so, I opened it in terminal using sudo nano /etc/hosts then I modified the file, and saved it. As the last step I flushed ...
2
votes
2answers
404 views

DNS resolution wrong only on my PC (aka “Ghost of Hosting Past”)

After successfully moving to a new hoster, I'm having a weird issue on just my computer (Windows 10). After propagation was complete and I removed the temporary entries in my hosts file, it looked ...
0
votes
2answers
221 views

How do I associate the Windows hosts file in Notepad++ with a specific language automatically?

I'd like to be able to open the Windows hosts file in Notepad++ and have it automatically associated with a programming language, such as Perl. Unfortunately, since the hosts file doesn't have an ...
2
votes
1answer
52 views

No access to server despite setting IP in hosts.allow

I am trying to give a user access to our redhat server from his home computer. I have done this several times for other users already, simply adding the respective IP to the servers hosts.allow file. ...
0
votes
1answer
69 views

Need help setting up FQDN with Dynamic IP on a Arch Linux box

I'm running Arch Linux and I'm trying to figure out what the proper way to set up my FQDN on my box. I plan to be running Nextcloud with some other stuff and I want to have my domain name properly ...
0
votes
1answer
367 views

Why is my mac's host file missing the fe80::1%lo0 localhost entry?

I searched all over the internet but cannot find any answers that make any sense to me. Can anyone please explain for less experienced users like me, why my mac's host file might be missing the fe80::...
0
votes
0answers
36 views

What do just two IPs in hosts file without any domain name be indicative of?

A friend of mine was complaining about very slow internet on his Windows 7 laptop. Out of curiosity I just had a look at the 'hosts' file on his laptop and some entries therein surprised me. There ...
0
votes
0answers
148 views

Cannot open /private/etc/hosts file form terminal

Problem with /private/etc/hosts file I was trying some software (MAMP PRO) and it has problems writing to the /private/etc/hosts file (the software has admin rights). I thought it was the software ...
0
votes
0answers
27 views

Can't access AppleId for weeks, sometimes returns to normal

I'm having a super annoying problem with access to my AppleID and connected services like iCloud and therefore all kind of sync jobs for iMessage, Notes and more. I'm under the impression that it is ...
0
votes
1answer
185 views

Easiest way to switch between /etc/hosts mappings in a browser

I have a web application that connects with various services and the only way to develop it is to use exactly the same domain for development as for production. I do it by overriding the domain in /...
1
vote
1answer
55 views

How do you delete highlighted characters in notepad++?

How do you delete highlighted characters in notepad++? For example, in the below image: How do I remove all of the highlighted 1's that are trailing each hosts file entry?
0
votes
1answer
496 views

Unable to redirect a website by modifying etc/hosts file

I am trying to redirect a website by overriding its IP address in the hosts file. But it doesn't work. I have done the following so far: Modified hosts file by mapping the IP address of twitter.com ...
0
votes
2answers
76 views

What is the significance of hosts file and is it used as a loophole/bypass restrictions?

I came across one question on SO which instructs the user to fiddle with the hosts file in order to bypass a "update check". The software in question is Sublime Text Editor and the OP is asking for a ...
0
votes
1answer
124 views

Is it stupid to schedule a script to update 'hosts' file by coping contents from my online text file?

I'm using this site to upload a text file that I'll update occasionally. On another system, I'm planning to add a task in Task Scheduler to run a Python script that accesses this online text file, ...
0
votes
2answers
77 views

Block a specific page not the whole file from the host file

Is there a way to block a specific page not the whole website from the host file. For example: Instead of: 127.0.0.1 www.reddit.com I want to block only: 127.0.0.1 www.reddit.com/r/Futurology
0
votes
1answer
90 views

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....
2
votes
1answer
2k views

Chrome 60 ignoring /etc/hosts

Since approximetly the last update, Chrome does not respect the /etc/hosts file anymore. It does, but only for domains not listed in any public nameserver. It respects devserver.local but it does not ...
0
votes
3answers
4k views

Unable to log into Gmail - 'next' button does not work

Using Chrome I can go to gmail.com and log into my account no problem. (Update: I'm actually not sure of this. I've been logged into Gmail for a long time and don't want to log out to discover that I ...
0
votes
0answers
641 views

Can't delete any fonts because of Usermode Font Driver Host

I never had this host file interrupting me when uninstalling/deleting fonts, or even noticed this host file are even running on my PC before, but it's confirmed as Microsoft's not any just 3rd party, ...