Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

https://github.com/magesuite/seo-meta-robots

The module allows increased control over the robot's meta tag.

Installation

This module is optional.

composer require "creativestyle/magesuite-seo-meta-robots" ^1.0.0

Admin settings

Admin settings can be found in Stores -> Configuration -> MageSuite -> SEO in Meta Robots tab.

Name

Value

Comment

URL rules

Described below

NOINDEX on category pagination

Yes/No

Default value: No

When enabled only first page of a category will have INDEX,FOLLOW robots tag. All others will receive NOINDEX,FOLLOW

Make customer specific pages non-indexable

Yes/No

Default value: Yes

When enabled all pages under URLs contains "checkout/*" and "customer/*" will receive NOINDEX,FOLLOW

Noindex Url Params (comma separated)

Set robots tag to noindex if URL contains above param

URLs list

Textarea must be filled with one rule per line of text using the following format:

URL_EXPRESSION;ROBOTS_TAG

Where:
URL_EXPRESSION - URL expression that will be matched against the current site URL (see more in URLs matching section):
ROBOTS_TAG - one of:

  • INDEX_FOLLOW

  • INDEX_NOFOLLOW

  • NOINDEX_FOLLOW

  • NOINDEX_NOFOLLOW

Example textarea input:

de_de/women.html*;NOINDEX_NOFOLLOW
kontakt.html;INDEX_NOFOLLOW

URLs matching

When multiple rules can be matched to the current site, the URL value of the first one will be taken into account.

URLs can contain an asterisk * sign that will be matched to any string, Examples of rules with expected results:

Site Url

Expression

Will be matched

de_de/women.html

de_de/*

Yes

de_de/women.html

de_de/man.html

No

de_de/women.html

*/women.html

Yes

de_de/women.html

women.html

No

de_de/women.html

de_de/women.html

Yes

Products, categories and CMS pages

Products, categories and CMS page contains a new attribute that allows setting the value of the Robots Meta tag on them.
It can be done while editing them in the admin panel in the Search Engine Optimization section of the edit form.

Backend

Modules, Controllers and actions

Robot tags can also be set for whole modules, controllers or actions. It can be done using a di.xml file. Example:

<type name="MageSuite\SeoMetaRobots\Model\Resolver\Module">
    <arguments>
        <argument name="modules" xsi:type="array">
            <item name="customer" xsi:type="const">MageSuite\SeoMetaRobots\Model\Config\Source\Attribute\RobotsMetaTag::NOINDEX_NOFOLLOW</item>
        </argument>
    </arguments>
</type>
 
<type name="MageSuite\SeoMetaRobots\Model\Resolver\Controller">
    <arguments>
        <argument name="controllers" xsi:type="array">
            <item name="customer_account" xsi:type="const">MageSuite\SeoMetaRobots\Model\Config\Source\Attribute\RobotsMetaTag::NOINDEX_NOFOLLOW</item>
        </argument>
    </arguments>
</type>
 
<type name="MageSuite\SeoMetaRobots\Model\Resolver\Action">
    <arguments>
        <argument name="actions" xsi:type="array">
            <item name="customer_account_login" xsi:type="const">MageSuite\SeoMetaRobots\Model\Config\Source\Attribute\RobotsMetaTag::NOINDEX_NOFOLLOW</item>
        </argument>
    </arguments>
</type>

Frontend

There is no frontend functionality for this module.

  • No labels