How to enable Wildcard DNS on cpanel server

Wildcard DNS allows all subdomains to share the same set of files, which you may need for your multisite web application or if you want the subdomains to show the same content as the main site.

How to enable Wildcard DNS on cpanel server?

Use the following steps to enable wildcard DNS on cPanel server:

1) Login into WHM.
 2) Click On Edit DNS Zone.
 3) Choose domain to edit and click on edit button.
 4) Add new record entry as under:
    Record Type: A [Domain IP address]
     Record Data: *
5) Click on submit to add the record in DNS file.

Now, we need to modify httpd.conf file from the server end.

1) Login into SSH as root.
2) go to the /usr/local/apache/conf/ folder and edit apache configuration file

vi httpd.conf

4) Find your domain entry like:

 DocumentRoot /home/yourdoma/public_html
 CustomLog /usr/local/apache/domlogs/ combined
 ScriptAlias /cgi-bin/ /home/yourdoma/public_html/cgi-bin/
On the line:
Change to:
ServerAlias: *

5) Save the file and exit.
[command: CTRL +:wq]

6) Restart the Apache web server by executing this command:

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution