Super User is a question and answer site for computer enthusiasts and power users. 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
  1. Lets say I run a webserver, apache.
  2. I have a domain known as
  3. The name servers and such are correctly configured for to resolve to the IP of the webserver, which serves the root directory of the webserver when is requested.

I want to setup a subdomain like so:
I know how to do this in the httpd.conf (tested it with dev.localhost etc).

My question is, is the subdomain 'dev' handled strictly by apache when it is requested, just like would be? I want to know if I need to change anything DNS related so that would resolve. Does the DNS have a play in this or is it strictly handled by apache?

It's worth noting that I use a free dns provider known as zoneedit.


share|improve this question
up vote 2 down vote accepted

You have to create either an A record or a CNAME for in your DNS (or a wildcard record for * Apache can't do anything with requests for if they can't get to your web server, which they can't do unless there's a DNS record that resolves for

share|improve this answer

Two steps -

  1. Set up an A record at your DNS manager, at the control panel of your domain registrar. Point to your server IP.
  2. Create a VirtualHost record in your Apache configuration. Read more here. Point it to any directory you want.
share|improve this answer

You must log in to answer this question.

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