Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

analytics tracking code, put NOINDEX, NOFOLLOW in php file


111oneeleven

Recommended Posts

Posted

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:

Posted

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.

Posted

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.

Posted

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:

Posted

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/

Posted

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.

Posted

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...