Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NOINDEX, NOFOLLOW code showing up in catagory pages


pete2007

Recommended Posts

Hello,

 

I am using this code to block google for indexing certain products:

<script type="text/javascript">
     $(document).ready(function() {

if( window.location.href == 'https://www.mysite.com/page.html'){
         
 $("head").append('<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">');
}

});
    
</script>

But the code is displaying when browsing through the catagory pages, is there a way to find this code?

 

Thank you in advance.

Link to comment
Share on other sites

What osC version are you modifying? Where (what file, and where in it) did you put this code? Are you using any SEO, that might make the location.href different from what you see in the address line? How consistent is the problem -- is it happening for all products, no products, or some? Are you looking to get rid of it from category pages, but leave it for certain product pages?

Link to comment
Share on other sites

What osC version are you modifying? Where (what file, and where in it) did you put this code? Are you using any SEO, that might make the location.href different from what you see in the address line? How consistent is the problem -- is it happening for all products, no products, or some? Are you looking to get rid of it from category pages, but leave it for certain product pages?

 

Sorry this error has now been resolve but thank you for your reply.

Link to comment
Share on other sites

It might be good to post what was done to cure the problem in case someone searches and this thread shows in the results. Theres nothing worse than finding an incomplete thread.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...