SEO blunder in Joomla extensie JTAGS en de fix
Door deze plugin gaat Google en andere zoekmachines alle content van je site dubbel, driedubbel of wie weet hoe vaak opnemen. Steeds met een andere url maar wel leidend naar steeds dezelfde artikelen. Duplicate Content vliegt om je oren en dat wordt niet gewaardeerd door zoekmachines.
Hiervoor is een simpele fix, namelijk bij iedere link waarvan je wilt dat deze niet gevolgd wordt door een zoekmachine, 'rel="nofollow"' zetten.
De bouwers van JTAGS hebben dit ook getracht in te bouwen, ware het niet dat dit fout gedaan is. De tekst die JTAGS standaard meegeeft is 'rel="tag nofollo"'. En daar doen zoekmachines niets mee met als gevolg dat de link wel degelijk wordt geindexeerd.
Daarnaast geeft de extensie per link ook nog wat opmaakstijlen mee die er niets toe doen, maar dat heeft geen SEO restricties tot gevolg.
De volgende drie files moeten worden aangepast:
- components/com_jtags/views/all/tmpl/default.php
- modules/mod-jtags/mod-jtags.php
- plugins/content/jtags.php
Aanpassing in bestand components/com_jtags/views/all/tmpl/default.php
$attribs['rel'] = "tag nofollow";
foreach($this->list as $l):
if ($l->notToShow == 1) continue;
$link = JRoute::_('index.php?option='.$this->com.'&searchword=' .
$l->formattedName .'&areas[]=jtags');
$text = JHTML::link($link, "<span style=\"font-size:".$l->fontSize."px;\" >".$l->name."</span>", $attribs)." (".$l->used.") ";
echo $text;
endforeach;
Vervang de cursieve delen door de bold weergegeven code hieronder:
$attrib_s = 'rel="nofollow"';
foreach($this->list as $l):
if ($l->notToShow == 1) continue;
$link = JRoute::_('index.php?option='.$this->com.'&searchword=' .
$l->formattedName .'&areas[]=jtags');
$text = JHTML::link($link, "<span style=\"font-size:".$l->fontSize."px;\" >".$l->name."</span>", $attrib_s)." (".$l->used.") ";
echo $text;
endforeach;
Aanpassingen in bestand modules/mod-jtags/mod-jtags.php
$attribs['rel'] = "nofollow"
if (!$max) echo JText::_('no tagged');
else
foreach($rows as $row)
{
if ($row->publish_down != '0000-00-00 00:00:00' && (time() > strtotime($row->publish_down)+( $offset * 60 * 60))) continue;
$formattedName = str_replace(" ", "+", substr($row->name, 0, 21));
$size = getFontSize($min, $max, $row->used, $minFontSize, $maxFontSize);
echo JHTML::link(JRoute::_('index.php?option='.$com.'&searchword=' .$formattedName . '&areas[0]=jtags'),
'<span style="font-size:'.$size.'px;" >' . $row->name .'</span>', $attribs).' ';
}
Vervang de cursieve delen door de bold weergegeven code hieronder:
$attrib_s = 'rel="nofollow"';
if (!$max) echo JText::_('no tagged');
else
foreach($rows as $row)
{
if ($row->publish_down != '0000-00-00 00:00:00' && (time() > strtotime($row->publish_down)+( $offset * 60 * 60))) continue;
$formattedName = str_replace(" ", "+", substr($row->name, 0, 21));
$size = getFontSize($min, $max, $row->used, $minFontSize, $maxFontSize);
echo JHTML::link(JRoute::_('index.php?option='.$com.'&searchword=' .$formattedName . '&areas[0]=jtags'),
'<span style="font-size:'.$size.'px;" >' . $row->name .'</span>', $attrib_s).' ';
}
Aanpassingen in bestand plugins/content/jtags.php
$attribs['rel'] = "tag nofollow";
foreach($tags as $tag) {
$formattedName = str_replace(" ", "+", substr($tag->name, 0, 20));
if ($flag == 0) $flag = 1;
else $text .= " ".$separator." ";
$link = JRoute::_('index.php?option='.$com.'&searchword=' .
$formattedName . '&areas[]=jtags', $attribs);
$text .= JHTML::link($link, $tag->name);
}
Vervang de cursieve delen door de bold weergegeven code hieronder:
$attrib_s = 'rel="nofollow"';
foreach($tags as $tag)
{
$formattedName = str_replace(" ", "+", substr($tag->name, 0, 20));
if ($flag == 0) $flag = 1;
else $text .= " ".$separator." ";
$link = JRoute::_('index.php?option='.$com.'&searchword=' .
$formattedName . '&areas[]=jtags', $attrib_s);
$text .= JHTML::link($link, $tag->name);
}
Even de html code van je pagina's checken en je ziet dat er nu keurig bij alle links uit de tags cloud een 'rel="nofollow"' staat!
We helpen elkaar!
Las je in dit artikel het antwoord op je vraag?
- Ja: Neem contact op! Wij moeten praten!
- Nee: Vertel mij hieronder waar je wel naar op zoek bent! Of neem contact op voor een verhelderend gesprek!
Interessant artikel? Deel het in uw netwerk!