{{Name}}
and {{Summary}}
.You can dynamically change the meta title and description on a Webflow site using JavaScript, but doing so comes with important SEO limitations.
You can update the document’s title and meta tag content like this in a script:
Title: document.title = 'New Title from CMS';
Description: document.querySelector('meta[name="description"]').setAttribute('content', 'New description from CMS');
To pull values from a Webflow Collection List item, place the values in hidden elements or data attributes, and then retrieve them using JavaScript. For example:
Add a hidden div
with an attribute like data-title
and data-description
.
In JavaScript, fetch these values and update the title
and meta
:
const title = document.querySelector('[data-title]').getAttribute('data-title');
const desc = document.querySelector('[data-description]').getAttribute('data-description');
Modifying meta tags via JavaScript does not help with SEO, because:
Search engine bots may not run or wait for JavaScript execution.
The modified meta content won't appear in page source or server-rendered responses.
For SEO purposes:
Use Webflow’s CMS ‘SEO Settings’ fields in Collection Templates to set per-page meta titles and descriptions.
Go to the Collection Template Page, then click the Page Settings (gear icon), and populate the Title Tag and Meta Description fields using fields from your collection (e.g., {{Name}}
, {{Summary}}
).
You can change the meta title and description using JavaScript for client-side personalization, but it won’t benefit SEO. For search engine optimization, set tags directly in Webflow’s CMS SEO settings on Collection Template pages.