setTitle( )


Sets the page's title.

Setting a proper title is important to let search engines determine the topic of your page.

Note: You should always set the title inside the onReady() event handler to ensure search engines can read it.

Method Declaration
Copy
function setTitle(title: string): Promise<void>;
Method Parameters
titlestringRequired

The title to set.

Set a page's SEO title
JavaScript
import wixSeoFrontend from "wix-seo-frontend"; // ... $w.onReady(() => { wixSeoFrontend .setTitle("New Title") .then(() => { console.log("title set"); }) .catch(() => { console.log("failed setting title"); }); });
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?