
According to the Magento SEO best practices each product and category should have a unique meta titles and description.
However, if you have ever tried to optimise meta tags manually, you know it's impossible to cover them for all pages as your store scales into thousands of products. That's when Magento 2 meta tags templates come into play to automate the process.
So, today you'll learn how to generate meta tags in Magento, make them dynamic and optimise according to the best practices.
What are Magento 2 Meta Tags Templates?
Magento meta tags templates are predefined SEO patterns that automatically generate meta titles, descriptions, keywords and H1 tags using dynamic variables like product name, price, category or brand, etc. Instead of writing metadata for each page one by one, you create a template once and apply it to multiple pages.
e.g. instead of creating 1000 unique product meta tags, you can create product meta tag template like: Buy {product_name} Online | {store_name}.
Once the template is applied, Magento replaces {product_name} with the actual product name across all relevant pages.
This means you can optimise SEO metadata for your store faster, eliminate repetitive manual work and stay consistent.
Why Use Meta Tag Templates in Magento?
Setting up meta tags in Magento manually is not only a waste of time but a missed SEO opportunity. That's why meta templates are a must if you want to scale, optimise, and improve consistently.
Save time
Considering the number of meta tags you have to create and manage for all your products, categories and layered navigation pages, doing it manually just isn't realistic.
Meta tags templates help you to save hours of work and cover thousands of products in minutes.
Improve consistency
It's hard to keep up with the same SEO logic across all pages, especially when multiple people are working on products. Magento meta tags template allows you to define exactly how the metadata should look across all pages.
So, they follow the same SEO format, target relevant keywords and highlight important details.
Reduce human error
It's easy to miss some fields, duplicate meta tags, or just forget to use important keywords. Meta tags templates eliminate those risks since you define exactly what products or categories to add the metadata for.
Boost organic traffic
Well-optimised meta tags templates in Magento optimise click-through rates. They allow you to create keyword-rich variations by inserting multiple attributes naturally. So you can target specific queries without much effort.
Magento Meta Tag Template Examples
Magento SEO templates help you create dynamic meta title, description, keywords and H1 tags for every product and category.
So, let's review a few template examples before you start creating them.
Product page SEO template
For product pages, a strong point is to combine a product name with some value proposition, like a reason to buy, price, or delivery time. This ensures relevance and improves CTR to your product pages.
e.g.
H1: Brand new {name} only for {final_price}
Meta title: New {name} from the {category_name} collection. Hurry up!
Meta description: Buy new {name} from the {category_name} collection only for {final_price}.
Category page SEO template
Category page templates should focus on broader keywords to highlight the variety, availability or pricing. This attracts people who are looking for a product collection rather than a specific product.
e.g.
H1: {category_name} only for {filter_price_range}!
Meta title: {category_name} – best prices online | {store_name}
Meta description: Explore our wide range of {category_name} – {filter_price_range}. Great deals, fast shipping, and top brands.
Long-tail SEO templates
Long-tail templates include specific product attributes and help you generate very specific meta tags. This helps you target niche traffic with very specific search queries.
Note: this doesn't apply to configurable, bundle or grouped products that don't have unique attributes like size, colour, etc.
e.g.
H1: {name} in {color} and {size}
Meta title: Buy {name} in {color} and {size}! | {store_name}
Meta description: Looking for {name} in {color}? Discover the best deals and fast delivery options.
Location-based SEO templates
If you manage a multi-language store, location-based details like shipping or country of manuafacturer might be useful.
e.g.
H1: {name} from {country}
Meta title: Buy {name} in {country}! | {store_name}
Meta description: Order {name} online in {country}. Quick delivery and great prices guaranteed.
How to Create Meta Tags Templates in Magento?
The easiest way to create SEO templates in Magento is to use the Magefan . It comes with extensive conditions for SEO templates to help you create templates for certain groups of products.
e.g. you can create different templates for new arrivals, products on sale, branded products or based on any other product or category attribute.
Step 1: Create an SEO rule
To create meta tags templates via Magefan SEO extension, use SEO rules. Navigate to Marketing > SEO by Magefan > SEO Rules and press the Add New SEO Rule button. Then just Enable, Name it and set a Priority.
Note: by default, the meta tags templates are applied only if the metadata fields are empty or equal to the category/product name. Enable the Override Existing Attributes Values option if you want to override existing attribute values.
Finally choose Page Type to define whether you're creating a template for products or categories.
![]()
Step 2: Create meta tags template
Review relevant attributes using the List of Available Attributes. You can use any product attiribute in your template. Just make sure a product has a corresponding attributed filled out.
Then use those attribute variables to create templates for product or category meta title, meta description, meta keywords, H1 tag, description and short description.
Note: you don't have to fill out all the fields, just the ones you need to create templates for, e.g. meta titles and descriptions or only the H1 tags.
![]()
Note: you can also use these SEO rules to set custom meta robots for Magento product or categories or override some canonical tags.
Step 3: Choose store views
Since you can create meta tags templates in Magento based on store view, choose a corresponding locale in the Display Settings section
![]()
Step 4: Set template conditions
To create dynamic meta tags templates that change depending on the product attributes (e.g. sale, new, quality, size, price) use conditions.
![]()
e.g. you can set one template for all products that are new, products with a discounted price, etc.
Step 5: Preview meta data
After you create a template, you can Preview how it will look like. If you've set any product attribute conditions, you'll also see what products the template will be applied to.
![]()
Don't forget to Save the SEO rule once you finish to apply the meta tags template. If you've also set the template for the H1 tags and product description, go to frontend to check it out.
![]()
Best Practices for Magento SEO Meta Templates
Creating SEO templates in Magento is easy. But creating templates that perform is where the real impact happens. Use these best practices to create highly-effective meta tags templates and avoid mistakes.
Keep metadata within the character limit
One of the most important things is to keep meta titles and descriptions within the length limit — 50-60 characters for titles and 150-160 for descriptions. If they are too long, they will get cut off, affecting the click-through rates.
So don't stuff metadata with keywords and attribute variables to stay within the limit and keep them natural.
Avoid duplicate meta tags
Even with Magento meta tags templates, it's possible to generate very similar tags across multiple pages. Avoid this by using dynamic variables that generate unique values for each tag.
Combine static and dynamic content
Avoid using just variables in the SEO templates. While it makes your meta tags more flexible and dynamic, static text adds consistency and branding. It's best to combine both static and dynamic content for templates.
Don't rely only on templates
Meta tags template provides a baseline. But it's important to know when not to rely on them.
Top-performing pages or high-competition keywords should still be optimised manually to ensure you have a competitive edge.
Apply templates to filters
When people use filters on category pages, this creates unique pages too.
To create dynamic metadata for these pages, too, configure the Magento layered navigation SEO settings.
Review and optimise
Since SEO and trends are not static. What works today might need adjustment tomorrow. Monitor impressions and click-through rates to your pages, review and refine your templates regularly to ensure long-term success.
Frequently asked questions
In Magefan SEO extension, you can create meta templates and enable the Override Existing Attributes Values option to override any meta titles or descriptions you've already set manually.