Wildcard DNS and Wildcard SSL

Wildcard SSL

A wildcard ssl use to secure not only primary domain but also multiple subdomains added on it. SSL certificates are usually issued to fully qualified domain names (FQDN), so if you want to access your domain at secure link with www and without www then you would need two separate SSL Certificates.
There is no need of separate ssl certificate for www.domain.com and domain.com if you purchase wildcard ssl.

You can access a domain with www or without www with the wildcard SSL.
Any subdomain added on it can be accessible at secure link with the same wild card ssl installed at primary domain.

Wildcard DNS

A wildcard DNS record redirects requests for non-existent domain names (Usually subdomains that are not exists) to primary domain name.
For example if you type xyz.domain.com it will redirects the requets to domain.com.

A wildcard DNS record is specified by using a *  as the leftmost part of a domain name, e.g. *.domain.com.

For wildcard ssl, domain should have wildcard dns enabled on it. Follow the few steps here and you will be able to enable wildcard dns for domain on cPanel server.

A typical dns zone file of any domain on cPanel server,

; cPanel 11.28.60-RELEASE_50962
; Zone file for domain.com
$TTL 600
@      600      IN      SOA     ns9.dns.com. admin.domain.com. (
2011020102      ; serial, todays date+todays
86400           ; refresh, seconds
7200            ; retry, seconds
3600000         ; expire, seconds
86400 )         ; minimum, seconds

domain.com. 600 IN NS ns9.dns.com.
domain.com. 600 IN NS ns10.dns.com.

domain.com. IN A x.x.x.x

localhost.domain.com. IN A 127.0.0.1

domain.com. IN MX 0 domain.com.

mail IN CNAME domain.com.
www IN CNAME domain.com.
ftp IN A x.x.x.x
cpanel IN A x.x.x.x
whm IN A x.x.x.x
webmail IN A x.x.x.x
webdisk IN A x.x.x.x

Open the dns zone file of domain by vi editir or from WHM >  Main >> DNS Functions >> Edit DNS Zone and simply add the entry

*.domain.com IN A x.x.x.x

Save the file and restart the named sevice.

Now one more change need to done in apache.conf but here you need to add one more entry in serveralias.

Open apache configuration file on server by vi editor as vi /usr/local/apache/conf/httpd.conf. Add serveralias for domain as
*.domain.com

<VirtualHost x.x.x.x:80>
ServerName domain.com
ServerAlias www.domain.com *.domain.com
DocumentRoot /home/cpanel_user/public_html
ServerAdmin [email protected]

Save the changes and restart apace server.  Once this done you are free to install wildcard ssl on domain

Related Posts:

  • No Related Posts

Comments are closed.