The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS Wildcard?

Discussion in 'Bind / DNS / Nameserver Issues' started by Millar, Feb 13, 2007.

  1. Millar

    Millar Active Member

    Joined:
    Dec 23, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Is there anyway I can enter a wildcard like * or . which I can make a CNAME to the main URL meaning I can type anything.url.com?

    Thanks in advanced,
    Millar.
     
  2. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    *.domain.com. 14400 IN CNAME domain.com.
     
  3. aisagtr

    aisagtr Guest

    Pardon me but under cpanel, shouldn't it just be:

    * 14400 IN CNAME domain.com.

    I tried both and it went thru without giving any error.

    Please advise.
     
  4. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    You have to edit httpd.conf and add *.domain.com at ServerAlias :
     
  5. fenixer

    fenixer Well-Known Member

    Joined:
    Feb 23, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Hello..

    Nowadays, if you manually put into serveralias this wildcard, it will be deleted when recompiling Apache at any time, or just executing "/usr/local/cpanel/bin/build_apache_conf"... doesn't matter you have distilled before.

    This can be considered a bug?
    :confused:
     
  6. fenixer

    fenixer Well-Known Member

    Joined:
    Feb 23, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Nobody can confirm???
    do you think it is a good idea to publish at bugzilla?

    thanks.
     
  7. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
  8. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Quick Wildcard Setup for One virtualhost


    Code:
    mkdir -p /usr/local/apache/conf/userdata/std/2/<username>/<domainname>/
    echo "ServerAlias *.<domainname>" >> /usr/local/apache/conf/userdata/std/2/<username>/<domainname>/wildcard.conf
    /scripts/ensure_vhost_includes --user=<username>
    /scripts/restartsrv httpd

    replace <username> and <domainname> with the username and domain of the customer/domain.

    Don't forget to add the wildcard entry in the zonefile for the domain
    * IN CNAME domainname.com.
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If it's for a user owned domain, one can also add it as a subdomain with the document root being /home/user/public_html
     
  10. DennisTG

    DennisTG Registered

    Joined:
    Jan 23, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Belive it or not i didnt understand this untill i found the solution myself :).

    Login to the cpanel account owning the domain, go to subdomain,
    then add the subdomain *
    Cpanel autofills /public_html/ as document root. if thats where the domain is then your set to go.
    if not then write where this specific wildcard should point to.
    in case you added it manualy to either httpd.conf and/or the DNS zone then go to those 2 places and change/remove the * from there to look like they were before you manualy edited them.
     
Loading...

Share This Page