Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2007
    Posts
    5

    Default Force www. on domain?

    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. #2
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Log into your Cpanel interface
    - select Redirects
    - add a Redirect
    Type: Permanent (301)
    http:// yourdomain.com /
    redirects to --> http:// www.yourdomain.com
    www redirection: Do Not Redirect WWW
    - click ADD

    Go to http://yourdomain.com and see if it redirects to http://www.yourdomain.com

    Mike

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Note that a mod_rewrite rule may be more effective as mod_rewrite can take http://yourDomain.com/anything and automatically convert it to http://www.yourDomain.com/anything

    Do an Internet Search for this, there are plenty of tutorials on how to do this. You would simply place these rules in a .htaccess file .

  4. #4
    Member orty's Avatar
    Join Date
    Jun 2004
    Location
    Bend, Oregon
    Posts
    105
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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]

Similar Threads & Tags
Similar threads

  1. 302 Redirect of www to non www for the same domain
    By Vince778 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-22-2011, 07:01 PM
  2. How to force WWW fort the whole server ?
    By dotcom22 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 09-10-2009, 09:53 AM
  3. Replies: 2
    Last Post: 07-19-2006, 08:07 AM
  4. Need help. WWW does not work but the domain works without the WWW
    By urbanhostonline in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-28-2005, 10:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube