Keyword

Stop Google from indexing 'tag' pages when tags are used ?

More
6 years 1 month ago #167130 by Daily Deals UK
Hi sorry to bump an old thread but if I added the code suggested:

<?php
$doc = JFactory::getDocument();
$doc->addCustomTag('<meta name="robots" content="noindex" />');
?>

Would it stop all tags from being indexed?

I want only tags that have a menu attached to be indexed.

Thanks
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167132 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop Google from indexing 'tag' pages when tags are used ?
The above code is correct.
You can check the menu item's id - stackoverflow.com/questions/19005478/joomla-3-1-get-active-menu-item-url - and print the snippet you found at will.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
6 years 1 month ago #167166 by Daily Deals UK
Hi Krikor

I don't understand what you mean.

Would that code stop all tags being indexed? even ones as a menu?

Basically I only want menus indexed and most of mine are made from K2 tags. But the rest of the tags I don't want indexed.
The topic has been locked.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 1 month ago #167180 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop Google from indexing 'tag' pages when tags are used ?
This code will tell the search engines not to include these pages.
It is up to the actual search engine to respect this code.
You can always block all bots, spiders etc and submit a sitemap of your own.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
More
4 years 1 month ago #175036 by Claire Roach
works
The topic has been locked.

Powered by Kunena Forum