Site: Search Differences?

Discussion in 'Site & Server Administration' started by Tara33, Jun 26, 2006.

  1. #1
    What is the difference in searching for site:www.yoursite.com, and site:yoursite.com? When I do this for my site, I get varied results - by about 3 to 10 pages, depending on when I do the searches. Somehow, taking out the "www" yields fewer results.

    Anyone else experience this before, and know why there is a difference?
     
    Tara33, Jun 26, 2006 IP
  2. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #2
    You should get the same result for both site:www.site.com and site:site.com

    if you are getting different results this means, SE is taking site.com and www.site.com as two different sites, your host probably doesnt have default settings to redirect requests from http://site.com to http://www.site.com

    you can do it by putting a 301 redirect in your .htacess file.
     
    The Webmaster, Jun 26, 2006 IP
  3. hoosierwebdesign

    hoosierwebdesign Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No matter, all sites should use the 301 redirect as some search engines are a little slow in figuring out the .site and www.site are one in the same (usually)
    It happens as the spiders follow links.. an inbound link to .site.htm would only follow the .site unless us have static links that redirect on the www side.. without the redirect, a .site.html link would create a "duplicate" spidering of a dynamic site
     
    hoosierwebdesign, Jun 26, 2006 IP
  4. Tara33

    Tara33 Peon

    Messages:
    611
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're saying that based on how my inbound links read, (whether they have the "www" in them or not) this could possibly make a SE (sort of) see the site as two separate sites, and so the site crawled and indexed as such, right?
     
    Tara33, Jun 27, 2006 IP
  5. hoosierwebdesign

    hoosierwebdesign Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That is correct.. the link without the www may also come from inside the site itself.. It is a lot easier to see just one set of pages, than it is to track SE using both or splitting them up..

    Either call your hosting company and ask them to make that change for you (so that any request without a "www" will re-direct to the "www" URL or vice versa). If you are hosting on a *NIX server that has MOD_REWRITE enabled, you can put the following rewrite rule in the .htaccess file in your website root folder and it will do the re-direct for you:

    RewriteEngine On
    
    # Force the www
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [QSA,L,R=301]
    Code (markup):
    The first line activates the rewrite engine, and is required before making any rewrite rules. The next line, which starts with the "#", is a comment line, and simply explains what our rule is doing. Without going into too much detail about MOD_REWRITE, the next two lines evaluate the URL request coming to the server, and re-direct if needed. The RewriteCond looks for URL requests that do not have "www" in them. If one is detected, the following rule will be applied, which redirects to the same URL with the "www" added to the beginning.

    Thanks to Brian Getting of practical eCommerce for first showing me this. (I quoted him here)

    This will also eliminate the duplicate content some SE may be penalizing you for if they in fact are spidering both sides of the site..

    Jason
     
    hoosierwebdesign, Jun 27, 2006 IP
  6. The Webmaster

    The Webmaster IdeasOfOne

    Messages:
    9,516
    Likes Received:
    718
    Best Answers:
    0
    Trophy Points:
    360
    #6
    Exactly, to resolve the issue put a 301 redirect for your site.com to www.site.com.
     
    The Webmaster, Jun 27, 2006 IP
  7. Tara33

    Tara33 Peon

    Messages:
    611
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thank you for your plethora of technical knowledge! I have requested the re-direct.
     
    Tara33, Jun 27, 2006 IP