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:
    1
    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,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    16
    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