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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

www. missing from domains

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

  1. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    27
    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:
    42,693
    Likes Received:
    1,703
    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.
     
  3. tdot

    tdot Active Member

    Joined:
    Nov 2, 2017
    Messages:
    27
    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,062
    Likes Received:
    346
    Trophy Points:
    433
    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?
     
    cPanelMichael likes this.
Loading...

Share This Page