1

For starter, let me say that servers and stuff like that are really not my strong point, so I'll try to explain myself as I can because I forgot the name of the thing I'm trying to do.

Let's say in my browser I type http://something

I know there is a place somewhere where I can say "something means 140.254.23.10" and then make the appropriate redirection.

What's the name of this thing? How do I set that in MacOS and Windows?

2 Answers 2

5

In case you just need this on your local machine, say for overriding dns info or for testing a system that has no dns entry yet, you could use this:

Open the file

%SystemRoot%\system32\drivers\etc\hosts
in notepad and add a line similar to this:

w.x.y.z          mysite.com

You must replace w.x.y.z with the ip address you want to connect to of course.

See http://en.wikipedia.org/wiki/Hosts_file for further details.

1
  • On the Mac (and other *nix based OSes) the file would be /etc/hosts and has the same format as windows. (For the record, Windows stole the format from Unix. ;-)
    – Chris Nava
    Nov 24, 2009 at 17:06
2

DNS, I think you mean. In Windows it's in your network settings for TCP/IP. Set your DNS server to point to the correct DNS server, whether it's your home router or what your ISP tells you to set it to.

Usually this is handled automatically if you're running DHCP and your router is already properly configured.

Domain Name Service.

Edit: you might want to find more by googling something like "set dns server" along with your operating system name. This should yield some directions for you.

4
  • Isn't there something where I could manually set that and not use a server? Let's say I want that typing "xyz" in my browser redirects me to localhost (or some other IP), can I do that?
    – marcgg
    Nov 24, 2009 at 13:07
  • Thanks to your directions I found the file on windows: %SystemRoot%\system32\drivers\etc\hosts ! Thanks a lot, that solved my problem
    – marcgg
    Nov 24, 2009 at 13:14
  • You're welcome. The hosts file is a way of statically mapping for a particular client machine, yes. Just remember you made that change or a few months from now you'll scratch your head why one machine is acting the way it is for searching for things online :-) DNS servers are a more convenient way of doing this for many machines on a network centrally. Nov 24, 2009 at 13:19
  • I ended up accepting fuero's answer because it's actually what I did do to set it up. But thanks again :)
    – marcgg
    Nov 24, 2009 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .