Home | Looking for something? Sign In | New here? Sign Up | Log out

8/30/2010

How To Enable Wild Card DNS Service For A Domian On cPanel server?

8/30/2010
In many cases we require to enable wild card DNS service for the domain. These are the steps to accomplish it for 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:

  • TTL 14400
  • 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 httpd.conf file. It should be located at:
etc/httpd.conf

3) now edit this with online text editor. [I have used vi editor]
vi httpd.conf

4) Find your domain entry like:

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

On the line:
ServerAlias yourdomain.com

Change to:
ServerAlias: *.yourdomain.com yourdomain.com

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

6) Restart the Apache web server by executing this command:
# service httpd restart

That’s it!

Thanks,

Shane G.
Accuwebhosting.com

0 comments:

Post a Comment

 

CO.CC:Free Domain