Page Properties | ||||
---|---|---|---|---|
| ||||
|
https://github.com/magesuite/seo-meta-robots
The module allows increased control over the robot's meta tag
...
.
Table of Contents | ||||
---|---|---|---|---|
|
Installation
Info |
---|
This module is optional. |
Code Block |
---|
composer require "creativestyle/magesuite-seo-meta-robots" ^1.0.0 |
Admin settings
Additional settings are added to the admin panel category form in Search Engine Optimization
tab:
...
and for the CMS page form in Search Engine Optimization
tab:
...
Backend
...
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: | 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: | 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:
|
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:
|
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 | ||
---|---|---|
| ||
<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
Robot tags can also be set for whole modules, controllers or actions. It can be done using a di.xml file. Example:
|
Frontend
There is no frontend functionality for this module.