tdot

Active Member
Nov 2, 2017
29
1
3
UK
cPanel Access Level
Root Administrator
My domains do not add www. to the beginning when visiting example.com. Is there an option in WHM to force domains to add it or do I need to add a DNS record / change the htaccess file?

Current htaccess to force HTTPS
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Current DNS
Code:
example.com A {ip}
www.example.com CNAME {domain}
 

tdot

Active Member
Nov 2, 2017
29
1
3
UK
cPanel Access Level
Root Administrator
I've changed the account domain in WHM wwwacctform but it does not seem to have updated when visiting example.com

old
Code:
 Domain example.com
new
Code:
 Domain www.example.com
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I've changed the account domain in WHM wwwacctform but it does not seem to have updated when visiting example.com
If I understand this comment correctly, this is not the proper way to get what you want. You should set the account's domain back to the domain itself without the www.

What is it you want to do here exactly? Force http with www?
 
  • Like
Reactions: cPanelMichael