I'm not showing the print icon and have that turned off.. But I'm seeing some of my products are indexed by the print page..
/shop-now/compressor-abpn83304783-detail?tmpl=component&print=1
What would be the line I put into the robot.text...
It can not done using robots.txt
You can ask the robots not to index these pages by adding the following codes to your template's component.php file. i.e., templates/YOUR-TEMPLATE-FOLDER/component.php
<?php
JFactory::getDocument()->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
?>
OR
<?php
if (JFactory::getApplication()->input->getInt('print', 0)) {
JFactory::getDocument()->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
}
?>
Thank you...
mmmm
Disallow: /*&print=1
works ok in robots.txt
but agree that it just block the access, and google need to access to know IF it must index it or not.