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.

Force www. on domain?

Discussion in 'General Discussion' started by FarSerenade, Sep 26, 2007.

  1. FarSerenade

    FarSerenade Member

    Joined:
    Sep 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    51
    Hi there,

    Quick question- how could I have so that when people visit my site: mydomain.com, it automatically adds a www. making it www.mydomain.com?


    ~ Thanks
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,303
    Likes Received:
    42
    Trophy Points:
    178
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,277
    Likes Received:
    9
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  4. orty

    orty Well-Known Member

    Joined:
    Jun 29, 2004
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Bend, Oregon
    cPanel Access Level:
    Root Administrator
    This is what I use in my .htaccess file:
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
    
     
Loading...

Share This Page