www. as Subdomain, need it for SSL centificate.

MarkusNL

Registered
Aug 31, 2015
4
0
1
Netherlands
cPanel Access Level
Root Administrator
Hello all Cpanel users and Crew...

This is my first post after searching google and this forum for a solution to my issue.

Let me explain what I am trying to do.

I got a expensive adv. comodo ssl multidomain ssl cert. (the one that displays the company name) I got it for my domains: Domain1.nl Domain2.nl Domain3.nl Domain4.nl

Installed oke, so far so good, yet I tought it also would include the default www. alias. You guess... it does not. >> BUMMER.

I do redirect www. requests to non www. URL. But the SSL https://www.domain1.nl give back an SSL error. Thats no good. So I try to fix that...

I bought some cheap SSL certs for the www.domain1.nl www.domain2.nl etc.

Now I need to create a subdomain www. to allow me to install the cheap SSL cert. on www.domain1.nl. Then users will not get an error when to type in or link to https://www.domain1.nl and I will redirect to https://domain1.nl where my expensive SSL is what shows the company name.

The thing is, Cpanel will not allow me to add WWW. as a subdomain. Its bound to the root. as you would normally expect. But I need it to point to another dir so I van install the extra SSL cert and setup a redirect.

Who can help me out here ... :) ?
 
Last edited by a moderator:

MarkusNL

Registered
Aug 31, 2015
4
0
1
Netherlands
cPanel Access Level
Root Administrator
Update:
I tryed to make an httpd.conf include file... And placed ServerAlias inside <virtualhost> tag. Yet it only add's that line to httpd.conf and not makes www. not pointing to the domain.

Any idea how to make www. not a serverAlias?
 

MarkusNL

Registered
Aug 31, 2015
4
0
1
Netherlands
cPanel Access Level
Root Administrator
Update2:
Edited the file @ /var/cpanel/userdata/*USER*/domain.TLD

removed the alias there.

Ran /usr/local/cpanel/bin/build_apache_conf

Restarted apache... still www.domain.nl is active.

Made backup of httpd.conf
Edited httpd.conf to remove server alias www.
Ran /usr/local/cpanel/bin/apache_conf_distiller --update
service httpd restart

www.domain.tld is still working :-X looking at httpd.conf server alias are still there :-X
 

MarkusNL

Registered
Aug 31, 2015
4
0
1
Netherlands
cPanel Access Level
Root Administrator
As I cannot edit a post... Update 4:
in: /var/cpanel/userdata/username/domain.com removed the serveralias... rebuildhttpd conf. and restarted httpd...

serveralias is added automaticly again. What am I missing?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
Hello :)

Now I need to create a subdomain www. to allow me to install the cheap SSL cert.
You should be to install the certificate for the domain name with the "www" prefix via:

"WHM Home >> SSL/TLS >> Install A SSL Certificate On A Domain"

What error message do you receive when completing this action?

Thank you.