MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: How to add a wildcard DNS record?  (Read 8554 times)

0 Members and 1 Guest are viewing this topic.

Offline Dipak Bhoi

  • MilesWeb Team Member
  • Full Member
  • ***
  • Posts: 208
  • Karma: +5/-0
    • View Profile
    • MilesWeb Internet Services
How to add a wildcard DNS record?
« on: April 28, 2014, 11:25:16 AM »
Hello guys,

This post will help you to understand what is the wildcard DNS record and how to set them .

What is the wildcard DNS record ?

A wildcard DNS record is a record in a DNS zone file that will match requests for non-existent domain names, e.g if you have a number of sub-domains and you wish to redirect all of them to your main domain regardless of what sub-domain they access. It is also useful in case when someone miss type the address of site, e.g they type ww.yourdomain instead of www.yourdomain then they will automatically redirect to your main domain.

How to add a wildcard DNS record ?

1. Login to WHM and go to Edit DNS Zone
2. Select the domain you wish to modify from the list of available websites.
3. Fill in the fields under Add New Entries Below this Line.

Quote
*                       14400            IN                     A               xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the server IP.

Below is a another way, but you need root access to do this.

1. Login to server via ssh as a root user.
2. Edit file httpd.conf file. (path = /usr/local/apache/conf/httpd.conf)
3. Find the VirtualHost entry for the website.
4. The modificaton you need to change is ServerAlias www.yourdomain.com to
    ServerAlias *.yourdomain.com

5. Save the file and restart the httpd servcie.

Enjoy !!!
MilesWeb.com - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India.
Grab a Free SSL for your website.  WordPress Optimized Solution.

MilesWeb Hosting Forum

How to add a wildcard DNS record?
« on: April 28, 2014, 11:25:16 AM »