Get exclusive CAP network offers from top brands

View CAP Offers

index or no index

[bsa_pro_ad_space id=2]
  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #608111
    voodooman
    Member

    How would I sort out the following dilemma.

    When you visit my sites home page ie websitename.com it has a PR of 1. However as soon as you browse my site and then click the home page link you are returned to websitename.com/index.html. This shows a PR of zero.

    Google obviously sees this as two separate pages with the same content. How do I rectify this?

    #764671
    Anonymous
    Inactive

    Easy Fix ixian
    Just remove the index.html from your internal page links
    Instead of pointing them to http://www.proudlypoker.com/index.html
    Point them to http://www.proudlypoker.com
    As you pointed out Google will treat these as two different pages the way you have your linking structure now.
    Hope this helps
    Brad

    #764675
    Anonymous
    Inactive

    Yep — what Brad said. That should do the trick! :santa2:

    #764680
    Anonymous
    Inactive

    I would also use a 301 redirect with HTacess from whatever.com/index.html to whatever.com in case you forgot to change some links or have some external links pointing there.

    Learn how to do it here:
    xxhttp://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

    Good luck
    Weblight

    #764715
    voodooman
    Member

    Thanks for the advice.

    #764803
    supervince
    Member

    I don’t know how many times I have posted this code on this forum but here it is again. Just copy and paste it into your .htaccess file. Be sure to replace website.com with your own domain name.

    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^(GET|HEAD) /([^/]+/)*index.(php|html|htm) HTTP
    RewriteRule ^(([^/]+/)*)index.(php|html|htm)$ http://website.com/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^www.website.com [nc]
    RewriteRule (.*) http://website.com/$1 [R=301,L][/CODE]

    The first rule will redirect index.php, index.html, and index.htm to ./

    The second rule will redirect [url]http://www.website.com[/url] to [url]http://website.com[/url][CODE]RewriteEngine On
    RewriteCond %{THE_REQUEST} ^(GET|HEAD) /([^/]+/)*index.(php|html|htm) HTTP
    RewriteRule ^(([^/]+/)*)index.(php|html|htm)$ http://website.com/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^www.website.com [nc]
    RewriteRule (.*) http://website.com/$1 [R=301,L][/CODE]

    The first rule will redirect index.php, index.html, and index.htm to ./

    The second rule will redirect http://www.website.com to http://website.com

    #764821
    voodooman
    Member

    Hey Rob472 thanks a stack for the code. It works like a dream. :Nod:

    #765564
    voodooman
    Member

    Hi Rob I thought you may find this interesting.

    Rob472;158540 wrote:
    I don’t know how many times I have posted this code on this forum but here it is again. Just copy and paste it into your .htaccess file. Be sure to replace website.com with your own domain name.

    Code:
    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^(GET|HEAD) /([^/]+/)*index.(php|html|htm) HTTP
    RewriteRule ^(([^/]+/)*)index.(php|html|htm)$ http://website.com/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^www.website.com [nc]
    RewriteRule (.*) http://website.com/$1 [R=301,L]

    The first rule will redirect index.php, index.html, and index.htm to ./

    The second rule will redirect xxhttp://www.website.com to http://website.com

    This code works well but the Googlebot does not like it. See following error message:

    URLs not followed
    When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot because they contained too many redirects. Please change the URLs in your Sitemap that redirect and replace them with the destination URL (the redirect target). All valid URLs will still be submitted.

    I also found this on Google Groups Webmaster Help:

    Adam

    > > The requirements are specified clearly.

    > > All URLs in your sitemap and all internal URLs on your site should be
    > > to the correct final destination without ANY form of redirection.

    > > Why not just do that?

    > > THe phrase “some URLs were not accessible to Googlebot because they
    > > contained too many redirects,” should be interpreted to mean “… not
    > > accessible and/or less accessible and/or need correction to be
    > > consistent and not waste resources for crawlers and for your
    > > server…”

    > > I guess if you checked in at a hotel and they sent you to Room 301 and
    > > there you found a note saying go to Room 607 and there a note saying
    > > go 301a it could be argued that a room was still accessible to you but
    > > it would still be bang out of order to mess people around like that.
    > > You’d be dischuffed wouldn’t you?
    > > Robbo

    Dischuffed??? Thats a new one. Needles to say I will be removing the code supplied.

    #765571
    supervince
    Member

    This code is not meant to fix all the internal links on your site. Those should be linking to the correct destination. This is just to make it so that users and search engines only see a single URL per page.

    Also make sure you didn’t change the order of the rules. The way I posted it only does a single redirect. If you were to change the order of the rules then if someone went to hxxp://www.website.com/index.html then it would perform 2 redirects instead of one. First it would redirect to hxxp://www.website.com then again to hxxp://website.com

    By the way, I use this code on hundreds of domains and never had an indexing problem in google sitemaps because of it.

    #765602
    voodooman
    Member

    Hi Rob

    Thanks for all the help you have given, I don’t mean to sound ungrateful.

    I posted the code as you supplied and entered my domain info as shown. I will investigate further.

    edit: I see my index page has been dropped by Google.

Viewing 10 posts - 1 through 10 (of 10 total)