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
1 vote
1 answer
3k 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....
RATIU5's user avatar
  • 175
1 vote
0 answers
510 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 ...
I say Reinstate Monica's user avatar
0 votes
0 answers
31 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 ...
Rodrigo's user avatar
1 vote
0 answers
32 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 ...
Derek C.'s user avatar
  • 131
0 votes
1 answer
414 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 ...
sisko's user avatar
  • 173
-1 votes
1 answer
357 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 ...
Ap77's user avatar
  • 1
5 votes
1 answer
674 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 ...
last-child's user avatar
3 votes
1 answer
2k 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 ...
Zaboj Campula's user avatar
2 votes
1 answer
3k 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? ...
Jules Ivan Garay's user avatar
5 votes
1 answer
29k 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 ...
Ankit Jindal's user avatar
1 vote
1 answer
2k 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 ...
Aryo Adhi's user avatar
  • 113
0 votes
1 answer
2k 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 ...
onknows's user avatar
  • 817
41 votes
2 answers
29k 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 ...
pawel's user avatar
  • 1,711
1 vote
1 answer
41 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 ...
Ethan McTague's user avatar
4 votes
2 answers
2k 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 ...
Ian Storm Taylor's user avatar
2 votes
2 answers
938 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 ...
Ivan's user avatar
  • 7,503
0 votes
1 answer
277 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, ...
Noon's user avatar
  • 1
0 votes
1 answer
230 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-...
user2305193's user avatar
2 votes
1 answer
729 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 ...
nephewtom's user avatar
  • 2,927
0 votes
0 answers
109 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 ...
Tailer's user avatar
  • 333
0 votes
0 answers
1k 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 ...
TheOrionArm's user avatar
23 votes
2 answers
7k 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 ...
Luke Taylor's user avatar
0 votes
1 answer
199 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 ...
patrickdrd's user avatar
0 votes
0 answers
31 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 ...
Nouman's user avatar
  • 51
-5 votes
1 answer
1k 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-...
Chloe's user avatar
  • 5,946
0 votes
0 answers
631 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 ...
Wayne Werner's user avatar
  • 2,323
5 votes
1 answer
2k 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 ...
sampathsris's user avatar
2 votes
1 answer
3k 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....
kramer65's user avatar
  • 1,424
0 votes
0 answers
1k 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 ...
Zhro's user avatar
  • 867
0 votes
1 answer
6k views

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

I can't edit %WinDir%/System32/drivers/etc/hosts running notepad as Administrator and have no antivirus software running at the moment (it doesn't seem I have virus/malware, because I've just run ...
stiv's user avatar
  • 77
0 votes
1 answer
2k 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 ...
genna's user avatar
  • 103
0 votes
1 answer
1k 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 /...
Sepideh Abadpour's user avatar
1 vote
1 answer
1k 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 ...
ra8ul's user avatar
  • 11
0 votes
1 answer
67 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 ...
Vijayadhiliban's user avatar
0 votes
1 answer
2k 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 ...
ericsoderstrom's user avatar
1 vote
1 answer
1k 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 ...
dsp_099's user avatar
  • 193
2 votes
1 answer
126 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....
Sudhir Sharma's user avatar
0 votes
1 answer
93 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 ...
Ben's user avatar
  • 103
2 votes
3 answers
7k 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 ...
George Tian's user avatar
0 votes
1 answer
878 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 '...
Ari's user avatar
  • 3
8 votes
2 answers
3k 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 ...
thedp's user avatar
  • 405
1 vote
1 answer
1k 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 ...
khm's user avatar
  • 123
1 vote
2 answers
58k 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 ...
None's user avatar
  • 529
-2 votes
1 answer
61 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 ...
user887168's user avatar
2 votes
1 answer
2k 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 (...
jlp's user avatar
  • 121
0 votes
1 answer
448 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 ...
Fisher's user avatar
  • 687
3 votes
3 answers
19k 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 ...
dnnagy's user avatar
  • 131
2 votes
2 answers
2k 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 ...
OsakaWebbie's user avatar
2 votes
3 answers
829 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 ...
vertigoelectric's user avatar
1 vote
1 answer
106 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. ...
sequence_hard's user avatar

1
2
3 4 5
8