Difference in promoting a link with www. and without www.

Discussion in 'Link Development' started by HPA, Dec 2, 2008.

  1. #1
    Hello!
    I've been promoting one of my site without the www. prefix. I was curious if it makes any difference?
    I have around 57k+ links pointing to a domain of mine, without the www. but with the www. I have only 100+ links...

    I'm new to building links though... So really curious!
     
    HPA, Dec 2, 2008 IP
  2. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #2
    It makes absolutely no difference, but you should only use one. Use a 301 redirect for the other.
     
    mjewel, Dec 2, 2008 IP
  3. rajuthan

    rajuthan Well-Known Member

    Messages:
    899
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    110
    #3
    how can that be done?
     
    rajuthan, Dec 2, 2008 IP
  4. HowToMakeMyBlog.com

    HowToMakeMyBlog.com Peon

    Messages:
    140
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I have this code in my index.php to do a permanent redirect:

    // non-www redirect
    if (strstr($_SERVER['SCRIPT_URI'], “http://yourblog”) !== false) {
    $newLocation = str_replace(”http://yourblog”, “http://www.yourblog”, $_SERVER['SCRIPT_URI']);
    header(”HTTP/1.1 301 Moved Permanently”);
    header(”Location: “.$newLocation);
    }

    Make sure to replace "yourblog" with your domain.

    Also make sure to inform Google directly of this change by choosing the preferred domain in Google Webmaster Tools.
     
    HowToMakeMyBlog.com, Dec 2, 2008 IP
  5. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Add this to your htaccess file

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

    This will make http://www.yourdomainname.com into http://yourdomainname.com
     
    mjewel, Dec 2, 2008 IP
  6. HPA

    HPA Notable Member

    Messages:
    1,335
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    205
    #6
    Thanks for the answers.

    But do this effect PR or Search Engine Listing?
     
    HPA, Dec 2, 2008 IP
  7. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #7
    If you have links going to both, a redirect may increase your PR, but it isn't going to hurt you. Google sees the www. and non-www as two different pages, so PR is divided between the two. A redirect makes all you links point to a single page instead of two.
     
    mjewel, Dec 2, 2008 IP
  8. Chip27

    Chip27 Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8

    Thanks, I had no idea that page rank is divided between www. and non-www. that would have saved me hours of work, thanks again
     
    Chip27, Dec 2, 2008 IP
  9. gagandeep4687

    gagandeep4687 Banned

    Messages:
    100
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    no difference according to me
     
    gagandeep4687, Dec 2, 2008 IP