1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I searched my site on Google...

Discussion in 'White Hat SEO' started by Blackhatlover, Dec 26, 2011.

  1. Blackhatlover

    Blackhatlover Junior Member

    Joined:
    Aug 10, 2009
    Messages:
    118
    Likes Received:
    34
    Occupation:
    Banner Designer
    Location:
    Googiland
    Hello Guys,

    I have an issue on my site, I searched my site on Google and i get the 2 homepages ie: www.mysite.com/ and www.mysite.com/index.hml

    Even I used 301 redirect to non-www to www

    Please suggest me guys.
     
  2. jim39

    jim39 Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 10, 2007
    Messages:
    104
    Likes Received:
    126
    Location:
    Chicago
    Unfortunately, this creates a risk of duplicate content from the search engine point of view. To avoid this, you can use the following ModRewrite rules in your .htaccess file:

    Code:
    RewriteEngine on 
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
    RewriteRule ^index\.html$ http://www.mysite.com/ [R=301,L] 
    The file should be located in your website main folder (web root).

    The rules above will tell the browser or the search engine both that all requests to index.html should be directed to the "/" (slash only).
     
    • Thanks Thanks x 1
    Last edited: Dec 26, 2011
  3. Red__

    Red__ Registered Member

    Joined:
    Dec 24, 2011
    Messages:
    76
    Likes Received:
    26
    I don't see what the problem is.....
     
  4. TransparentNZT

    TransparentNZT Junior Member

    Joined:
    Sep 18, 2011
    Messages:
    168
    Likes Received:
    56
    Occupation:
    http://i40.tinypic.com/xl9jeh.png
    Location:
    Australia
    The problem is he might get penalized for duplicate content
     
  5. Blackhatlover

    Blackhatlover Junior Member

    Joined:
    Aug 10, 2009
    Messages:
    118
    Likes Received:
    34
    Occupation:
    Banner Designer
    Location:
    Googiland

    Thanks Buddy,

    I am going to check this one out.
     
  6. Blackhatlover

    Blackhatlover Junior Member

    Joined:
    Aug 10, 2009
    Messages:
    118
    Likes Received:
    34
    Occupation:
    Banner Designer
    Location:
    Googiland
    I think some people are not understanding what I mean, So here i ask you in a simple way .

    On google I searched my "site:http://www.myexamplesite.com/" and it's shows every pages on google so here the things are going good but when I searched the same domain as
    "site:http://www.myexamplesite.com/index.html" it's again shows the home page, So i want to get rid of this problem and google will not shows my index.html page

    I hope some one can help me out.
     
  7. ryuchi

    ryuchi Registered Member

    Joined:
    Apr 6, 2011
    Messages:
    62
    Likes Received:
    4
    Occupation:
    Writer
    Location:
    Golden Coast
    Home Page:
    How about checking out your google webmaster account? Its the same place where you can opt to choose if you want a "www" or without www in your link. Try to check it out for yourself.

    Ryuchi
     
  8. nbseo

    nbseo Junior Member

    Joined:
    Nov 18, 2010
    Messages:
    127
    Likes Received:
    11
    Occupation:
    SEO... my Food of life.. ;)
    This is the perfect solution.. i think thread should be closed now!!
     
  9. Kaithe.Clarke

    Kaithe.Clarke Regular Member

    Joined:
    Jun 3, 2011
    Messages:
    397
    Likes Received:
    43
    Seems like a cononicalization issue... You may try with setting up rel=canonical tags.
     
  10. Blackhatlover

    Blackhatlover Junior Member

    Joined:
    Aug 10, 2009
    Messages:
    118
    Likes Received:
    34
    Occupation:
    Banner Designer
    Location:
    Googiland
  11. jim39

    jim39 Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 10, 2007
    Messages:
    104
    Likes Received:
    126
    Location:
    Chicago
    further update from email on question

    Code:
    //Rewrite to www
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mysite.com[nc]
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [r=301,nc]
    
    //301 Redirect Old File
    Redirect 301 www.mysite.com/index.html www.mysite.com/
    
    code above will only redirect non www to www and
    redirect index.html to just the root
    this should cover dup content problem
    don.t worry about it still being indexed in google
    the spiders at google will update it when they want to, not until then, its fixed, move on
    went you look at whats indexed in google do not think you are seeing whats up to date,the real story
    what you are doing is telling google hey this is the real page, forget the rest



    NOTE; consistently use the same link text in pointing links to your site, sometimes you can make yourself more problems by bouncing around with your link text...
    so if you want
    Code:
    www.mysite.com/
    then just use that not
    Code:
    www.mysite.com
    see you even decide if you are going to use the dash at the end...

    google it just a program a machine that accepts what ever url you give

    BackRub aka google gives you all the rope you need to put around your neck

    hope this covers it
     
    Last edited: Dec 26, 2011
  12. jim39

    jim39 Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 10, 2007
    Messages:
    104
    Likes Received:
    126
    Location:
    Chicago
    in regards to your DM
    "I just replace the code you sent me along with my real url but i get 500 server error"
    if you getting this go back to what you had before could be a Apache problem

    Code:
    RewriteEngine on 
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
    RewriteRule ^index\.html$ http://www.mysite.com/ [R=301,L]
    go back to this code for your index.html problem
    and use your google webmaster tools should take car or non www to www

    or

    * Although highly unlikely, your host may have +FollowSymLinks enabled at the root level, yet disallow its addition in .htaccess; in which case, adding +FollowSymLinks will break your setup (probably a 500 error), so just remove it, and your rules should work fine.
     
    Last edited: Dec 26, 2011
  13. bo2kmm

    bo2kmm Registered Member

    Joined:
    Oct 25, 2009
    Messages:
    70
    Likes Received:
    14
    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
    RewriteRule ^index\.htm$ http://%{HTTP_HOST}/$1 [R=301,L]

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://%{HTTP_HOST}/$1 [R=301,L]

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
     
  14. Four Seasons

    Four Seasons Regular Member

    Joined:
    Aug 22, 2011
    Messages:
    409
    Likes Received:
    206
    Location:
    Cottonballs
    Just curious, is there a proof that website.com and website.com/index.html are viewed differently by spiders?