Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

DNS Wildcard?

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

  1. Millar

    Millar Active Member

    Joined:
    Dec 23, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    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:
    168
    *.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:
    575
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Mbelitar
    You have to edit httpd.conf and add *.domain.com at ServerAlias :
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. fenixer

    fenixer Well-Known Member

    Joined:
    Feb 23, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    156
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. fenixer

    fenixer Well-Known Member

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

    thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    575
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Mbelitar
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    43
    Trophy Points:
    308
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. DennisTG

    DennisTG Registered

    Joined:
    Jan 23, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice