Noindex tag Opencart?

It is very easy to put a “noindex” tag on the tag pages from your Opencart store.


You need to find and edit the file named “header.tpl”. This can be found in “catalog\view\theme\your theme\template\common”.

Open “header.tpl” and add anywhere in the header, before the style tag.

< ? $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if (preg_match('/tag/', $url)) { echo'‘;
? >

This will work if your tag url is something like “index.php?route=product/search&tag=purple maxi dress” (it contains the word “tag”).

Yes, php scripts are working in the header.tpl file.

The tag pages will have NOIndex, Follow while the rest of the pages won’t have any Googlebot tag. You can add “Index, Follow” but it won’t matter.