FastStore projects can now use new experimental flags to manage how search engines interact with and categorize store content:
Flag | Type | Description |
---|---|---|
noRobots | boolean | Disables the default robots meta tag on all pages, removing the default crawler instructions.
|
noindex | boolean | Instructs web crawlers not to index the store page, which keeps the page out of search results.
|
nofollow | Boolean | Prevents search engines from following links on the page to ensure that sensitive or irrelevant content is not included in search results.
|
These flags are experimental and may have limitations. Before using them in a production environment, run tests to make sure they are compatible with your store.
What needs to be done?
To use these flags, update your FastStore project and add them to the discovery.config.js
file:
-
Open your store project in the code editor of your choice.
-
Open the terminal and run the following command to update the FastStore packages to the latest version:
_10yarn upgrade -L --scope @faststore -
Open the
discovery.config.js
file and, under theexperimental
field, add thenoRobots
andnoindex
, ornofollow
flags. The experimental field will look like this: -
Run
yarn dev
in the terminal. -
Open the available localhost URL and check if the flags are applied by inspecting the
<head>
element of the page or using SEO tools: