Msg#: 4332823 posted 12:45 am on Jun 30, 2011 (gmt 0)
I have a php script that passes a product number and then calls an external site with that product number. The script works fine. The one problem is that search engines (google in particular) are indexing all these calls to the script as separate pages and can generate hundreds of pages. I would say these could count as "thin" content pages. My goal is to prevent these pages from being indexed, but you cannot insert the standard <meta name="robots" content="noindex,nofollow"> in the script. (I tried and the script hung up and never went to the external link).
The question is, other than blocking a directory in robots.txt, is there a way to get google to stop indexing these pages? Is it a good idea to not have these indexed (given the recent changes in google's algorithms).
Is there another way to call the external link other than the way I have coded it, and also block indexing of the link?
Here is an example of the php script:
<?php session_start(); //product number is passed through the script $PRODUCTNUM1234 = $_GET['PRODUCTNUM1234'];
Msg#: 4332823 posted 9:41 am on Jun 30, 2011 (gmt 0)
Is it the URL of your actual script that you want to prevent Google from indexing? Or www.external-site.com/product/... ?
By default the header("Location:..."); redirect returns a 302 (Found) Status Code, so the search engine is still likely to index the URL. I would have said that you should send a 301 (Moved Permanently) instead.
So you have anchors like this...?<a href="http://www.mysite.com/getproduct.php?PRODUCTNUM=746463">something</a>
Yes, the anchors look like that. The goal is to get google to stop indexing the hundreds of dynamic pages generated by getproduct.php.
I guess the question is do these count as "thin" pages to google or are they ignored for ranking/pagerank, etc.
Normal pages you can put <meta name="robots" content="noindex,nofollow"> in the header. But php scripts like this that call an external site do not allow that.
You can use robots.txt to block a folder that contains getproduct.php, but I am not sure if search engines frown on that, or penalize you for blocking what would be hundreds of links from your site to this php script.