www vs non-www

Discussion in 'Search Engine Optimization' started by Bohol, Feb 24, 2008.

  1. #1
    In the eyes of search engines, which of the two is better than the other?
     
    Bohol, Feb 24, 2008 IP
  2. Jean126

    Jean126 Peon

    Messages:
    234
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    None of them are better then the other. But you will only have one at a time. If you got 2 then you most change it in your .htaccess file or else search engines will rank both of them as 1 site each.
     
    Jean126, Feb 24, 2008 IP
  3. Bohol

    Bohol Peon

    Messages:
    2,680
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How to change it? If I type www, my Drupal site won't show up. Without www, the Drupal site shows up.

    What to do now?
     
    Bohol, Feb 24, 2008 IP
  4. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #4
    Neither is better, but it's best to stick with one working format. Enter the below code into your .htaccess file. This will properly foward ALL urls that point to non-www to www.

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

    Replace yourdomain.com with your domain name, make sure to leave the ENTIRE code intact when replacing, this includes leaving the "\".
     
    astup1didiot, Feb 24, 2008 IP
    Bohol likes this.
  5. Bohol

    Bohol Peon

    Messages:
    2,680
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If I use the above code, will it affect my subdomain? or only the main domain will be changed?
     
    Bohol, Feb 24, 2008 IP
  6. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #6
    Just the main domain, a sub-domain already has it's own alias.
     
    astup1didiot, Feb 24, 2008 IP
  7. Bohol

    Bohol Peon

    Messages:
    2,680
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks ssandecki for your very valuable input. I highly appreciate it.
     
    Bohol, Feb 24, 2008 IP
  8. Jean126

    Jean126 Peon

    Messages:
    234
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Could you help me with this ? last time i tried i screwed up my site, thank god i had backup. pm me if you can.
     
    Jean126, Feb 24, 2008 IP
  9. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #9
    No problem! :D

    Just ask the question here.
     
    astup1didiot, Feb 24, 2008 IP
  10. vlad230

    vlad230 Active Member

    Messages:
    544
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    95
    #10
    Hey nice tips! :D

    If I have this in my .htaccess file:
    Should I leave it there or I can remove it because it doesn't matter?

    If I want it to redirect from www to non-www I guess this is the code:
    Right?

    Also, if I already have links that point to www.yourdomain.com redirecting my website to non-www will affect SERPS?

    Cheers,
    Vlad
     
    vlad230, Feb 24, 2008 IP
  11. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #11
    It will redirect all the non-www to the proper URL will passing over Pagerank and SEO value.
     
    astup1didiot, Feb 24, 2008 IP