Does the www. make a difference?

Discussion in 'Websites' started by djpromo, Apr 6, 2006.

  1. #1
    Hey DP People,

    Like almost everybody else, I noticed a PR change today. I went from a 0 to 3. But when I type in my URL with the www. I am still showing a 0, and without the www. I am a 3. All of the internal pages on my site are a 3 also. Anybody have a clue why this might be?:confused:
     
    djpromo, Apr 6, 2006 IP
    Silver89 likes this.
  2. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #2
    Google views www.yourdomain.com as different site from yourdomain.com. You need to decide which you want to use for linking purposes and do a 301 redirect from one to the favored one. It appears as if all your links must go to yourdomain.com.

    Since most people link to the www version I usually use that for principal domain and redirect mydomin.com to www.mydomain.com.
     
    Smyrl, Apr 6, 2006 IP
    Silver89 likes this.
  3. Canada Web Design

    Canada Web Design Active Member

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    88
    #3
    dont 301 redirect just do a mod rewrite on the .htacess
     
    Canada Web Design, Apr 6, 2006 IP
  4. djpromo

    djpromo Active Member

    Messages:
    165
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #4
    Canada,

    Thanks for the tip. I tried researching how to do the re write, but all I could find was:

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^www\.mydomain\.com [nc]
    rewriterule ^(.*)$ http://mydomain.com/$1 [r=301,nc]

    This appears to be a 301 redirect, but I have never performed a mod rewrite so I'm not 100% sure. Is there a different re write you think I should use?
     
    djpromo, Apr 6, 2006 IP
  5. graemep

    graemep Well-Known Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    106
    #5
    First, that +FollowSymlinks has nothing to do with what you wanted to do, and can be a security risk - only do it if you know exactly what you are doing.

    The rest of it is almost the same as what I use, which is:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^example.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

    There are more rewrite examples on the Apache site here:

    http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html

    Unlinked because I just joined and cannot put real links in my posts yet.
     
    graemep, Mar 1, 2007 IP