Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue
idmodule

Included by default

Private

No

No

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

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

Table of Contents
maxLevel7
minLevel1

Installation

Info

This module is optional.

Code Block
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:

Code Block
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:

Code Block
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

Customer-specific pages

All customer-specific pages will have NOINDEX,NOFOLLOW, configuration for these pages can be done using a di.xml file. Example:

Code Block
languagexml
<type name="MageSuite\SeoMetaRobots\Model\Resolver\NoIndexCustomerSpecificPages">
    <arguments>
        <argument name="modules" xsi:type="array">
            <item name="checkout" xsi:type="string">checkout</item>
            <item name="customer" xsi:type="string">customer</item>
            <item name="newsletter" xsi:type="string">newsletter</item>
            <item name="pwanotifications" xsi:type="string">pwanotifications</item>
            <item name="sales" xsi:type="string">sales</item>
            <item name="wishlist" xsi:type="string">wishlist</item>
            <item name="backinstock" xsi:type="string">backinstock</item>
        </argument>
        <argument name="controllers" xsi:type="array">
            <item name="review_customer" xsi:type="string">review_customer</item>
        </argument>
    </arguments>
</type>

Modules, Controllers and

actions

Actions

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

Code Block
languagexml

<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.