SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH
redirect url
auto redirect to base url magento 2

How to add meta tags on product page in Magento 2

If you are in need of a custom meta tag for a specific product page on Magento 2, then you can refer to the way below. You can use the default block to add as many meta tags as you want.

What are meta tags?

Meta tags are tags used in HTML that contain a description of the page’s content, it is not displayed on the page, but only in the source code of the page. These tags provide information about the page to web browsers and search engines that help search engines understand the content of the page, thus potentially helping to boost SEO.

Step by step

Step 1: Create the file catalog_product_view.xml in the folder app\design\frontend\\Magento_Catalog\layout and add the following code:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="head.additional">
            <block class="Magento\Catalog\Block\Product\View" name="meta_type_name" template="Magento_Catalog::product/view/tags.phtml" />
        </referenceBlock>
     </body>
</page>

Step 2: Create file tags.phtml in app\design\frontend\Magento_Catalog\templates\product\view\ and add the following code:

<meta property=”og:meta_tags_name” content=”discription_meta_tags” />

Note that, meta_tags_name and discription_meta_tags are the content you have to change.

After that, run the following command to save your change.

php bin/magento c:c
php bin/magento c:f