Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

www. missing from domains

Discussion in 'Bind/DNS/Nameserver' started by tdot, Jan 20, 2018.

  1. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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}
    
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The "www" alias is setup by default when creating accounts, addon domain names, or aliases. As far as the forced redirection, here's a thread you may find helpful:

    Redirect HTTP with www to HTTPS without www

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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 
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice