SEO:TYPO3不会呈现<meta name =“ robots” content =“ index,follow”>

问题描述

注意到TYPO3仅呈现以下标记组合(取决于设置):

<Meta name = "robots" content = "noindex,nofollow">
<Meta name = "robots" content = "noindex,follow">
<Meta name = "robots" content = "index,nofollow">

它从不渲染:

<Meta name="robots" content="index,follow">

它什么也没呈现。

这不是错误,因为这是TYPO3创建标签的方式:

if ($noIndex === 'noindex' || $nofollow === 'nofollow') {
  $manager = $MetaTagManagerRegistry->getManagerForProperty('robots');
  $manager->addProperty('robots',implode(',',[$noIndex,$nofollow]));
}

我有索引并关注时,我需要这个标签吗?

解决方法

由于搜索引擎的工作是为所有可用文档建立索引并跟踪所有链接以获取所有文档,因此这是默认行为。

仅当您想要其他行为时,才需要声明它。