Domain Mapping

Discussion in 'Server Operation' started by fannar, Jun 4, 2007.

  1. fannar

    fannar New Member

    I were wondering if anyone could help me with domain mapping something like,, and many others are offering.

    Most of them ask you to use CNAME, which I think I would prefer over asking my customers to use my nameservers.

    What I'm looking for is to map to I were just wondering what you think is the best solution regarding the server side, PHP side is OK.

    I will be using Apache. How should the config file be configured? :)

    Hope to hear some comments on this !
  2. fannar

    fannar New Member

    Anyone? Please?
  3. falko

    falko Super Moderator ISPConfig Developer

    So you want to point to Just create a CNAME or A record, and in's vhost configuration you must add to the ServerAlias line. Restart Apache afterwards.
  4. fannar

    fannar New Member

    Well its more like this:

    1) wants to set up his own domain for this blog
    2) He registers
    3) He creates CNAME for (which I'm not sure how to do, wheras most hosting companies just allows subdomains to be CNAMEs??)
    4) The CNAME points to

    The question is then, do I need to add as ServerAlias for ? And then map that in my code than when its it should use the data from "someblog" ?

    What I'm not getting is how does allow your own domain, do they add it to their Apache config file as ServerAlias? It sounds very stupid to me. But maybe the only way ?

    Make a script to add the domain as ServerAlias, reload the config and then read the HTTP header and find out this domain is mapped to some user?

    So it should be: CNAME

    In config:

    Mysql: is owned by someblog

    Thanks a lot.
  5. falko

    falko Super Moderator ISPConfig Developer

    You need to add to the ServerAlias directive, but I don't know what you have to change in Wordpress.
  6. fannar

    fannar New Member

    Ok. But what is then the best way to add a CNAME to topdomain ? If the hosting provider just allows subdomains to be added as CNAMEs ?
    That is this works: CNAME

    So when someones goes to it is aliasing But if I would like be aliased to, some ideas?

  7. fannar

    fannar New Member

    Also what I don't get, if I'm adding ServerAlias for each domain for each user to the config file, won't it be very hard to allow users to change their domain ?

    User goes into control panel, adds as his domain for adds as ServerAlias for User adds CNAME to (to or, what is the different?) And then matched that should be

    You get my point ?

  8. falko

    falko Super Moderator ISPConfig Developer

    Then you'd either have to negotiate with your provider, or set up your own nameservers.
  9. fannar

    fannar New Member

    Ok thanks Falko

    But are you telling me that all these services is adding ServerAlias to their domain config files ? It seems quite supid to me to reload Apache after each domain map.
  10. falko

    falko Super Moderator ISPConfig Developer

    You can try wildcards (*) in the ServerAlias line, but I'm not sure if this works.
  11. fannar

    fannar New Member

    Well, I don't know why I didn't think of this before, but I solved this problem by creating new site file under sites-available for each new mapping. In this file I set ServerName to and ServerAlias to and also made some mod_rewrite with perm. redirect from to

    Any thoughts if this shouldn't be ok? (maybe regarding google bot?)


Share This Page