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.

learn more… | top users | synonyms

1
vote
0answers
49 views

Hosts file for Chromebook?

Is there a way to modify the hosts file in Chrome OS? ­­/etc/hosts The file is read only, so trying to modify it using sudo vim does not work. I have read that disabling root filesystem ...
0
votes
1answer
31 views

Google Chrome reads hosts file changes for too long

When I use the system hosts file to override DNS, Google Chrome takes longer than I'd like to pick up the changes, sometimes requiring a minute or longer to notice. Is there any way to make this ...
-1
votes
2answers
40 views

trouble adding sub URLs / pages inside a domain to /etc/hosts file

I want the hosts file to block www.url.com/page without blocking www.url.com step 1 ////////////// I've added 127.0.0.1 www.apple.com to my /etc/host file When I do ping www.apple.com I get this ...
1
vote
2answers
30 views

Blocking a site from myself and redirecting

I've tried editing "C:\Windows\System32\Drivers\etc\hosts" by adding: 127.0.0.1 websitetoblock.com But I can still access the website. Ideally I want to be redirected to a URL of my choice if I try ...
0
votes
1answer
16 views

Bizarre domain/host file/browser issues. A real chin-scratcher

I was working on a dev site yesterday (of which I have a modified host file to view) when all of the sudden Chrome stopped being able to load the site. Or the production site (no host file mods ...
0
votes
1answer
55 views

Network Manager overriding /etc/hosts file

I believe the network manager service on Oracle Linux 6 is causing problems for the clouder-scm-agent which is running on my machine. The clouder-scm-agent starts up on the server ip it resolves from ...
0
votes
2answers
40 views

How to give a name to a site in test server in my LAN and make the testers able to login into that site [duplicate]

I am building a Facebook app. Facebook requires I access sites by name and not by some address like 192.168.1.200:7654. But the testers are accessing the site like this now, i.e., by using this ...
0
votes
0answers
89 views

How to change host name resolution order in Windows server 2003

I understand below is the order of host name resolution The client checks to see if the name queried is its own. The client then searches a local Hosts file, a list of IP address and names stored ...
0
votes
0answers
24 views

Restrict access to a part of a webpage

I am on windows 7 machine, and I would like to restrict access to only certain parts of a facebook webpage, because it is very diversive for me. The only thing I would like to have access to on ...
1
vote
1answer
112 views

Creating hostsname aliases through dscl does not work in Mountain Lion

I read a few places that dscl is preferred over /etc/hosts for adding hostnames (for instance when developing). But in Mountain Lion (OS X 10.8) I cannot get it to work (others too). I have read ...
1
vote
0answers
42 views

Finding the domains for Microsoft Word on Mac

My parents both use Macs to do their work and my dad bought three licenses for Microsoft Word on Mac. The problem is that he somehow set up the programs so that only one can be used at a time, meaning ...
1
vote
4answers
189 views

Can updating the hosts file in Windows via batch file cause harm?

I have this script that I have saved as a .bat file. Can it hurt a computer? echo # >> %Windir%\System32\drivers\etc\hosts echo 0.0.0.0 www.facebook.com >> ...
0
votes
1answer
35 views

Redirect remote file to another

I'm using Windows 7, and I wanted to know how could I make it so that when my PC try's to connect to a defined remote file it will redirect it to another. Example: http://www.a.com/image.png to ...
1
vote
1answer
70 views

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

Why is the url being turned into an IP?

I am trying to understand why when I type in a url address that is for a development server my browser changes it to an IP? In the top of my host files I have something like 11.111.111.11 devserver. ...
1
vote
0answers
45 views

Why does OS X Snow Leopard have two hosts files?

I noticed that OS X has two hosts files: /private/etc/hosts and /etc/hosts. What is the difference between them? I was attempting to modify my iMac's hosts file in Terminal and tried the usual sudo ...
3
votes
0answers
349 views

Hosts file on Mountain Lion stopped working suddenly

I have used my hosts file (located in /private/etc/hosts) several months to block distracting websites during the work day. This worked all well until now. Today it suddenly stopped working. Some ...
2
votes
1answer
378 views

Run as administrator from command line on Windows 8

I am trying to run Notepad as admin so I can edit my hosts file from the command line. I have tried runas /user:(myusername)\administrator "notepad c:\windows\system32\drivers\etc\hosts" I then input ...
0
votes
1answer
145 views

Hosts file changes are not recognized in windows 8

When i make changes to the hosts file in windows 8, it doesn't work. Although my changes stay in the hosts file. What I'm trying to, is to redirect the domainname riddergarn.dev to 127.0.0.1 with ...
0
votes
0answers
17 views

mac need to refresh the page to load the correct page

I'm currently developing a site that has an existing/live site. But we have our development site/new version on another server and ip address. But we want our customer to access the dev site using the ...
0
votes
1answer
207 views

/etc/hosts entry of localhost not working on windows 8, it can't be over written

I changed the /etc/hosts and added an ip address to point localhost to a different computer like: 192.x.x.1 localhost But it is not working and when I ping to localhost it pings ::1 which is the ...
9
votes
4answers
762 views

Why can't I block Facebook using /etc/hosts on Mountain Lion?

It worked for a while in the old configuration, but then stopped working for some reason. Here is my /etc/hosts file from my Mountain Lion MacBook Air: 127.0.0.1 reddit.com www.reddit.com 127.0.0.1 ...
0
votes
0answers
65 views

Cannot connect to local IP with win 8

I have a machine with a static public IP connected to the same router as the win 8 machine but on a different subnet. I can connect to the machine via SSH and from any computer on the same network ...
1
vote
1answer
131 views

Long lookup times for .local in hosts file

I'm using Mac OS X 10.8.2 and I have in my local /etc/hosts this content: 127.0.0.1 dev.test.local Together with that I locally got nginx installed to serve static files for that domain. And while ...
0
votes
1answer
88 views

How do I prevent my /etc/hosts file from refreshing upon restart? [duplicate]

Possible Duplicate: How to make changes to Mac /etc/hosts permanent? I have a Mac Air that my little brother uses. Unfortunately, he likes to waste his time on computer games :( To prevent ...
-1
votes
2answers
346 views

Point Multiple IP Addresses to a Single Host Name

Is it possible to have a single host name with multiple IP addresses? The hostname will be used to access a box in LAN with 192.168.x.y and from outside with IP w.x.y.z which is portforwarded to that ...
0
votes
0answers
32 views

windows host file a VM machine

I have a centos installed as a guest OS on my windows7, In Centos there is apache installed In windows's host file, I add in 192.168.1.11 mynet.com the IP is the guest OS 's IP and in windows, ...
2
votes
1answer
237 views

'Canonical' way to block websites in Windows 8 without using hosts

In Windows 8, Microsoft has (rightly) decided that Windows Defender will prevent modifications from being made to the %WINDOWS%/System32/Drivers/etc/hosts file. This is an attempt to prevent trojans ...
3
votes
3answers
233 views

I accidentally hijacked my localhost

Opening localhost in the browser is pointing a local webpage (examplePage) after playing with some config files a while back, and I can't figure out how to restore the default behavior. Background: ...
1
vote
2answers
81 views

Determine IP address of an alias not in HOSTS file?

We have an application that references the database connection via a common alias, let's say datatier, and futher that alias is generally stored in the HOSTS file. However, it's not in the HOSTS file ...
0
votes
1answer
200 views

treating a subdirectory like a web root directory in xampp

I am running Xampp on a Windows 7 machine. I have a website that is running off a directory in my web root. I access the website by going to http://localhost/foobar. I would like to set it up so that ...
3
votes
1answer
163 views

How to block IP Address via Windows Host

I want to block access to a certain ip address via windows host. This is the ip address 41.190.8.17. And this is the content of my host file. # localhost name resolution is handle within DNS ...
1
vote
1answer
1k views

How to edit hosts file in Windows 8? Defender says malware detected

I've tried editing it in the same way as in Windows 7. E.g. opening Notepad/Notepad++ as Administrator and then opening the file and save it. Right after saving it Windows Defender will say Malware ...
1
vote
4answers
293 views

Why do we need hosts file?

DNS resolves the domain names to IP address then why do we need hosts file in our machine with domain name -> IP address mapping? One disadvantage is that the ip address could change. Is there any ...
0
votes
2answers
247 views

Hosts file modification to resolve domain names to specific IP addresses not working

I have recently learned how to use transfer wp sites to a new host, and also learned how to modify the hosts file so that I can look at any site transfers to the new host in my browser to check ...
2
votes
0answers
112 views

Cannot access shared drive in same machine uisng machine name but can access using IP

I have 4 desktops running Windows Server 2008 32bit version. I created some shares in all these machines. My program gets files from these machines (like \machine1\abcd). The machine names mentioned ...
1
vote
1answer
88 views

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 ...
11
votes
4answers
17k views

Editing Hosts File in Windows 8

I'm trying to edit my hosts file in Windows 8 Pro. When I open C:\Windows\System32\Drivers\etc\hosts in notepad++ or any other text editor, make changes and attempt to save, I get a dialog that tells ...
2
votes
3answers
282 views

How do you edit the 'hosts' file in windows 7? [duplicate]

Possible Duplicate: How do you edit hosts file on Windows 7 I need to edit the hosts file so that I could restrict some sites from opening. I have tried to open it and edit it but when I ...
1
vote
1answer
340 views

Hosts files keps reverting when I turn off my computer.

I have changed my host file to allow me access via RDC to computers over VPN network. I change the ip's and it works fine. My problem is that every time I log back onto my computer they have ...
2
votes
4answers
326 views

Chrome does not follow hosts file

I have custom domains set up for internal web site testing in my /etc/hosts file. I try to access them in Chrome, and I get routed to a Google search instead. But when I ping the domains, they ...
0
votes
0answers
77 views

switch hosts-file during win7 boot process

I have 2 hosts files on my win7 machine that i switch manually (.bat file run as administrator) when i'm either in the company vpn or connected to the comany network directly. What i would want is an ...
2
votes
1answer
855 views

How to add multiple IPv6 address for single host in /etc/hosts?

I want that a name should be resolved with multiple IPv6 addresses. I don't have access to a DNS server and I don't want to run a demon for that purpose. I want to add the entry in /etc/hosts and it ...
2
votes
1answer
215 views

Access mac virtual host from a virtual machine

Here's my setup: I'm developing a website on a mac. I created a virtual host, so I can open up my browser, type http://cpp and it will point to the right directory. I want to test this website out ...
4
votes
3answers
259 views

Editing /etc/hosts on Mac OS X Lion to use shorter host for ssh-ing

I keep having to type out ssh myusername@somereallylonghost.numb3r5.ojd202nk.net a lot. Instead of an alias, I just want to shorten that host name. I tried editing my hosts file to include shorthost ...
2
votes
2answers
662 views

Mac OS X Lion resets my hosts file automatically

I'm using Mac OX X 10.7.4. I changed my /private/etc/hosts file, but when I restarted my computer, my change is gone, like it was reset by the system. Has anybody else encounter this problem? How ...
0
votes
1answer
1k views

All computers on network get stuck waiting for some sites indefinetely

This happens across three computers, running windows 7 and Ubuntu, firefox, opera, and chrome (all latest versions). I am connected to the internet through a Verizon wireless usb modem. When I try ...
0
votes
0answers
241 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 ...
0
votes
1answer
68 views

hosts file handles specified domain but not a longer path

Trying to resolve a website domain to localhost for development purposes. I am developing on a Wordpress Installation which has some inherent hardcoded redirects to the domain it is installed on. So I ...
0
votes
1answer
606 views

IPv6 local address in hosts file

I have set up a local domain on my Apache server. Then I added the following line in my /etc/hosts file ::1 exampledomain.local After I trying to navigate to it, (I tried ...

1 2 3