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

I bought a domain through a (cheap!) domain company and I want this domain to point to a folder on the server.

The story

I originally bought along with hosting

A few months down the line I bought

I want to point ------> to

How do I do this? can it be done through DNS, Im quite new to this!


Can you please explain exactly the dns commands, or records i need to add, cause I really dont get DNS at all!


share|improve this question

You'd set up an 'a' record which points to the ip address of the server, and then configure the server to direct requests for the name of the new domain to point to the folder you want it to serve.

The actual procedure to achieve this varies depending on the web server your running. If your using apache 1.3 take a look at virtual hosts. And this is the doc for apache 2

share|improve this answer

You don't do this through DNS. DNS only associates a name to an IP address -- what happens at that IP address is up to the service you are connecting on.

Your DNS options are:

  • set up an A record for to be the same IP address as
  • set up a CNAME record for to be "". CNAME is a DNS shortcut that says "look up this name instead and use that for an answer." This means if you ever move somewhere else, will follow along without you having to do anything.

You then configure your web server to have a virtual host on the same IP address, bound to the name, which emits a http-redirect to -- this may or may not be possible depending on what kind of hosting you have for If you are self-hosted, then you can set up the virtual host yourself. However, if you are not self-hosted, you will probably have to contact your hosting's help desk department to ask if, and how, this is possible.

share|improve this answer

Your Answer


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