IndianWebPortal.com

Something Different In Linux

Home » cpanel » Enabling Wildcard DNS on CPanel Servers

Enabling Wildcard DNS on CPanel Servers

Posted by Rishikesh Vispute Categories: cpanel

How to do it?

1. Login to WHM
2. Click on Edit DNS Zone on the side navigation.
3. Choose the domain to edit, and click on the Edit button.
4. Under Add New Entries Below this Line add this:
Domain: *
TTL: 14400 (this is the default value)
Record Type: A in (your IP address)
5. Submit and this will now be added.
6. Access your httpd.conf file. Login as root, via SSH.
7. To access the file in a CPanel server go to:
# cd /etc/httpd/conf/
8. Use your favorite text editor, or just simply type:
# pico httpd.conf
9. Do a find on your domain and you may find something like this:

<VirtualHost ip.ip.ip.ip>
ServerAlias yourdomainserver.com
ServerAdmin webmaster@yourdomainserver.com
DocumentRoot /home/yourdoma/public_html
BytesLog domlogs/yourdomainserver.com-bytes_log
ServerName www.yourdomainserver.com
User yourdoma
Group yourdoma
CustomLog /usr/local/apache/domlogs/yourdomainserver.com combined
ScriptAlias /cgi-bin/ /home/yourdoma/public_html/cgi-bin/
</VirtualHost>

On the line:

ServerAlias yourdomainserver.com

Change to:

ServerAlias: *.yourdomainserver.com yourdomainserver.com

10. Exit or press Ctrl X if using Pico.
11. Save the file when asked and replace the existing file.
12. Restart the apache web server by typing in:
# service httpd restart

Done! You are all set to go. Wildcard DNS Enabled on a CPanel Server


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...