Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004

    mapping an external domain to a subdomain?


    I have a website where users can sign up and create a site. They can access their website by typing

    However, I would like to add to this the ability to buy a domain name and point it to

    so would translate to (external domain and associated user are mapped in the database)

    Do I need my own DNS server for this or is there a simpler solution? Also, how should the database lookup be performed for this to work?


  2. #2
    Join Date
    Mar 2004
    No one knows? I really need this sorted..

  3. #3
    Join Date
    Apr 2005
    You can add the new domain as an alias to the subdomain currently running. The most of registrars provide DNS services so you needn't your own DNS servers to do it.

  4. #4
    Join Date
    Jun 2004
    Boise, Idaho

    I have done this several times with different sites.
    Yes you will need to have a DNS server to do this or at least an API into another DNS service (I am not sure what is available out there).

    In the past I have also handled this manually and just had a quick method of allowing them to request a custom domain. Then if we purchase that domain I forward it on to our DNS servers.

    Then the code that I typically write splits the http_host into a list or array and then check to see if the domain portion "" is the standard domain. If not then I look it up in the database to find if it is a custom domain I do all checking in one place or function and return the account id so that the rest of the site doesnt have to worry about whether it is a custom domain at all.

    If you have any other questions I would be happy to help you out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts