Webmasters Stack Exchange is a question and answer site for pro webmasters. 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

This is one of the things that has interested me for awhile, and I know that the service I am developing would greatly benefit from this.

Various sites (Ning, Tumblr, Wordpress, etc) allow users to point their own domain at the site , where it is automatically configured to redirect to their own personal space within the service.

What do I need to do to achieve this for my own uses? What type of environment is best optimized for this sort of functionality? And are there any serious risks I need to be aware of when attempting this?

share|improve this question

What you are talking about is DNS management. Those sites basically allow you to point your hosts DNS to there server and they figure out by the URL that is coming in what to host. So what you would need to do is create a URL system that looks at a database table for the URL and returns the page content per that URL matching.

In general it isn't hard to do. You will just need to build your site to either run almost entirely off of a database or build a system to repoint the root of the folder for each specific URL to the folder that exists for it.

share|improve this answer

If you do a few searches for Wildcard DNS you'll be headed in the right direction. Here are a few ServerFault questions that address this.


For Apache

share|improve this answer
Or, on the end user side, setting up CNAME records pointing to a domain in your control. – JasonBirch Jul 13 '10 at 1:41

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.