http:// and http://www. - Can They Be Treated As One?

Discussion in 'Google' started by edrectory, May 27, 2009.

  1. #1
    We all know search engines treat http://www.site.com and http://site.com as different websites, however I have heard through using the Google WebMaster Tool they can be treated by Google as one.

    If this is true how? Where do I go on the Google Webmaster interface?

    Also, I've heard using robots.txt would work. How would I go about creating a robots.txt to allow http://www. but not http://?
     
    edrectory, May 27, 2009 IP
  2. James Dean Nash

    James Dean Nash Peon

    Messages:
    731
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Assuming you have submitted your site

    1. Go to the webmaster tools
    2. click on your website
    3. Click on settings

    Now you should see preferred domain.. now just choose..

    However make sure when you are linking to your pages you use only one way
     
    James Dean Nash, May 27, 2009 IP
  3. edrectory

    edrectory Peon

    Messages:
    368
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So when I'm building backlinks only link to what I set my preffered as?
     
    edrectory, May 27, 2009 IP
  4. Directory-Empire

    Directory-Empire Member

    Messages:
    455
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    33
    #4
    Always set the preference, yes. But you also want to 301 redirect the non-www to the www. That's for the cases when people don't do it right.

    If your server allows .htaccess and has mod_rewrite installed, you can do this:

    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.directory-empire\.com [NC]
    RewriteRule (.*) http://www.directory-empire.com/$1 [R=301,L]
    
    Code (markup):
    That will permanently rewrite all the non-www requests to the www ones. You can also set it GWT for extra measure.
     
    Directory-Empire, May 27, 2009 IP