3

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?

2

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.

2

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 IIS
https://serverfault.com/questions/84921/how-to-configure-iis-wildcards-for-account-subdomains-like-basecamp

For Apache
https://serverfault.com/questions/63200/how-do-i-create-subdomain-names-dynamically

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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