Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Cool Wildcard DNS for *.tld

    Hello,

    I need a server's DNS set to catch all the domain send request to it, for an example:

    Someone try's to visit Example Web Page which NS are ns1.myparkingdns.com ...

    So, It show an website when the request is made, however there are no domain parked or hosted as example.com in my cPanel.

    I have done it before with ServerAlias in httpd.conf like below :

    NameVirtualHost x.x.x.x:80
    <VirtualHost x.x.x.x:80>
    ServerName example.com
    ServerAlias *.info *.org *.mobi *.us *.tel *.me *.de *.co.uk *.eu *.asia *.cn *.name *.ag *.bz *.hn *.mn *.sc *.lc *.vc *.me.uk *.org.uk *.tv *.ca
    ServerAlias *.ws *.cc *.nu *.in *.co.in *.net.in *.com.in *.au
    DocumentRoot /home/myusername/public_html
    ServerAdmin example@uff.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/example.net combined
    BytesLog /usr/local/apache/domlogs/example.net-bytes_log
    ## User nitul # Needed for Cpanel::ApacheConf
    <IfModule !mod_disable_suexec.c>
    User example
    Group example
    </IfModule>
    UserDir enabled example

    ***

    However: It's not working anymore since we moved to cPanel from Plain Apache Configuration. I guess there are some config mismatching with cPanel and Apache.

    Anyone have Idea how to fix it ? I need to get that 4000+ domain's up and working ASAP

    Best wishes,
    Ahmed Nitul

  2. #2
    Member
    Join Date
    Nov 2007
    Posts
    46

    Default

    I also need to implement a wildcard DNS setup on one of my Cpanel DNS's.

    Can anyone point me in the right direction?

  3. #3
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    On the Apache configuration, you need to create an extra virtualhost
    container and set it up in one of the httpd.conf include files executed
    after the normal virtualhost configurations load.

    I see you listed a wildcard to every TLD but that is not necessary as
    you could just simply put a wildcard for the server name itself (*) and
    any web connections that are not by IP directly without resolution or
    resolving to any existing site on your server would trigger the wildcard
    site to display.

    The trick under cpanel is to use the include files because if you just
    simply add the wildcard DNS virtualhost to httpd.conf by itself, it
    will get overwritten quickly by Cpanel and removed again.

    Anyway ...

    Using a wildcard virtualhost is particularly useful for trapping domains
    that still resolve to your server's IP address even though you don't have
    any accounts setup for those domains specifically.

    You won't need to do anything in terms of DNS configuration for what
    you are asking but the same technique could be applied to allow for
    wildcard subdomains as long as the entry comes after your regular
    virtualhosts and before this full wildcard virtualhost entry. For those
    you would need to make a wildcard DNS update in the DNS of the
    domains but the principle is the same.

    Just for a side FYI on wildcard DNS since I mentioned it:
    Code:
    *  IN  A  xx.xx.xx.xx
    On Apache (httpd.conf) configuration side:
    Code:
    ServerName *
    ServerAlias *
    
    (Or 'subdomain.*' for wildcard subdomains as also mentioned)
    Last edited by Spiral; 07-06-2009 at 02:05 PM.

  4. #4
    Member
    Join Date
    Dec 2007
    Posts
    6

    Default

    Quote Originally Posted by Spiral View Post
    On the Apache configuration, you need to create an extra virtualhost
    container and set it up in one of the httpd.conf include files executed
    after the normal virtualhost configurations load.

    ..

    The trick under cpanel is to use the include files because if you just
    simply add the wildcard DNS virtualhost to httpd.conf by itself, it
    will get overwritten quickly by Cpanel and removed again.

    ...
    Do you have more details instructions on how to do this?

    What does the wildcard virtualhost config look like? Where and how do I make the include file?

    I also have 4000 domains I need to park....

Similar Threads & Tags
Similar threads

  1. Allow *.domain.tld DNS entries
    By kwc5811 in forum Feature Requests for Enkompass
    Replies: 1
    Last Post: 02-04-2011, 02:32 PM
  2. Wildcard DNS ?
    By lgabi in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-05-2007, 11:04 PM
  3. DNS servers are not in the same TLD as domains - should I care?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-05-2007, 11:14 PM
  4. Wildcard DNS?
    By Omar in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 12-29-2003, 08:30 AM
  5. DNS Wildcard
    By Steven_K in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-24-2003, 12:24 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube