111oneeleven Posted July 15, 2010 Share Posted July 15, 2010 Working with STS, did I put the google analytics tracking code into the html template. This works fine. I want the conditions.php not to be indexed or crawled by google. Just this single page. Usually do I put <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"> into the header of html files. Where and how do I place the code into the conditions.php? :blink: Link to comment Share on other sites More sharing options...
MrPhil Posted July 15, 2010 Share Posted July 15, 2010 Why can't you just put it in the conditions.php file, just after the <head> line? Is there a problem? <head> <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> It might be easier to put an entry in your robots.txt file. Remember that in either case, it's just a suggestion to search engines -- they're not obligated to obey. Link to comment Share on other sites More sharing options...
111oneeleven Posted July 16, 2010 Author Share Posted July 16, 2010 Why can't you just put it in the conditions.php file, just after the <head> line? Is there a problem? <head> <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> It might be easier to put an entry in your robots.txt file. Remember that in either case, it's just a suggestion to search engines -- they're not obligated to obey. Thanks MrPhil. This solution works fine. There is no problem with the header, I just overlooked it. Link to comment Share on other sites More sharing options...
111oneeleven Posted July 16, 2010 Author Share Posted July 16, 2010 Thanks MrPhil. This solution works fine. There is no problem with the header, I just overlooked it. However this goes for catalog/conditions.php. The text for it sits in catalog/includes/languages/english/conditions.php. The later one does not have a html header. Any chance to prevent google from crawling this page? Or is this protected via the NOINDEX, NOFOLLOW in catalog/conditions.php? :blink: Link to comment Share on other sites More sharing options...
Hotclutch Posted July 16, 2010 Share Posted July 16, 2010 However this goes for catalog/conditions.php. The text for it sits in catalog/includes/languages/english/conditions.php. The later one does not have a html header. Any chance to prevent google from crawling this page? Or is this protected via the NOINDEX, NOFOLLOW in catalog/conditions.php? :blink: No need to worry about that. Just make sure that you have something like this in your robots.txt already. User-agent: * Disallow: /includes/ Link to comment Share on other sites More sharing options...
MrPhil Posted July 16, 2010 Share Posted July 16, 2010 The "languages" includes files (all the "includes" files, in fact), are never seen by themselves (only as part of a main page, such as conditions.php). So, they don't need their own spider meta tags. Link to comment Share on other sites More sharing options...
111oneeleven Posted July 17, 2010 Author Share Posted July 17, 2010 The "languages" includes files (all the "includes" files, in fact), are never seen by themselves (only as part of a main page, such as conditions.php). So, they don't need their own spider meta tags. Thanks MrPhil. I found this contribution very helpful also.These are osc sample robots.txt files. Available here: http://addons.oscommerce.com/info/2162 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.