Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Website is on a remote server, and on my computer, which is also being used as a server with xampp installed. Which files will the browser access if I just type in the address bar? The domain name is pointed to the remote server, but xampp is also configured with the domain name.

share|improve this question
up vote 3 down vote accepted

Your browser will go to your remote machine if that's where the DNS record points to.

Even though you may have configured the same site as a virtual host on your local xampp install, your browser doesn't know that.

If however, you have edited your hosts file or similar, to point to you local IP if you will reach the local copy.

share|improve this answer
Yes, I have my hosts file to access in htdocs. – Grafica Feb 13 '12 at 22:01
No I mean, if you are using a GNU/Linux style OS, have you edited /etc/hosts or on Windows C:\WINDOWS\system32\drivers\etc\hosts (or similar). If you have a manual entry in their point to your local IP then you will be pointing to your local machine. – jwbensley Feb 13 '12 at 22:05
Yes, I have in that file. So does that mean that everyone that types that domain name (the real one, not in the browser will access files on my local machine? – Grafica Feb 13 '12 at 22:09
No, everyone else in the world not on your computer, will access what ever you have publish in your DNS records with your DNS provider. You need to take a crash course in DNS; – jwbensley Feb 13 '12 at 22:11
If you really can't work out which is which; drop a comment into the HTML code of one copy of your site, either you local copy or the remote copy. Then open your browser and see if you see the comment when viewing the page source: – jwbensley Feb 13 '12 at 22:17

This depends completely on name resolution - having the web server configured in one way or another will not influence the decision on where the request will go.

What this means in practice is that if you've configured your hosts file or your internal DNS to point that name to the local server, then it will get the request; otherwise, it will resolve the name in the public DNS hierarchy and send the request to the server there - which should be the remote server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.