Subdomain Wildcard

Discussion in 'Tips/Tricks/Mods' started by memphis, Sep 18, 2007.

  1. memphis

    memphis New Member

    Hello,
    ich want to make something like a subdomainscript.

    My plan is, if you type in domain.tld you get to the main Page. If you type in existing.domain.tld you get to the existing Website. And if you type in blablabla.domain.tld (an not existing subdomain) you get again to the main page.
    The script works with an mysql database and i want to make ist so that each domain is made by the database.

    I hope it is clear what i want to do. If not feel free to ask.
    Now to the problem. I need now a solution to realise that. Can anyone help me?

    good night
    memphis
     
  2. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    What you could do is make an wildcard CNAME entry in your DNS.
    eg. *.domain.tld CNAME domain.tld

    This way any subdomain.domain.tld address would be forwarded to ISPConfig and if a subdomain exists it will show you the one.

    I don't know if it is possible to do a Wildcard forward in ISPConfig.
     
  3. edge

    edge Active Member Moderator

    Yes you can.

    In ISPconfig go to the domain > Co-Domains, and create a new domain.
    Use as hostname a *
    Enter in the Domain, the domain you would like to use (domain.tld)

    I have some blogging OS (see sig) setup like this, and it's working great.
     
  4. memphis

    memphis New Member

    Great! That works.
    Thank you
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Additionally, you should set mailserver to external for this co-domain with the "*" wildcard.
     
  6. memphis

    memphis New Member

    Ok, i have set the Mailserver to external. But can you say me for what that is good for?
     
  7. edge

    edge Active Member Moderator

    So you do not get "junk" mail that is send to any of the domains.
     
  8. radim_h

    radim_h Member HowtoForge Supporter

    automate *.domain.tld with external mailserver creation

    I'm using same setup as is described in this thread..
    (together with rewriting users to third level domain user.domain.tld)

    Is there way how to automate creation
    (to have co-domain *.domain.tld with external mailserver everytime when i add new website ??
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Not without hacking ISPConfig...
     

Share This Page