Metadata and search guides

Prepare a page head for a new guide without losing its canonical

·

When a CMS theme and a page editor both emit metadata, adding a new block can leave readers and crawlers with two competing titles or canonicals. Build the intended tags in the generator, then replace their counterparts in the page head.

Meta Tag Generator

Give the search and sharing titles separate jobs

Choose Load example to open the Field Notes draft. Page title says Field Notes & Maps. Social title says A map for your next walk. The first names the page in the HTML title. The second supplies the title in both sets of social tags.

Clear Social title and inspect the output again. The HTML title stays the same and the social tags now pick up Field Notes & Maps. The ampersand is written as & in the HTML. That encoding keeps it part of the title when the source is read.

Open X Card overrides and enter Check the trail entrances for X Card title. Only the twitter:title entry changes. Use the site and creator fields if you want to attribute the card to particular X handles.

Give the search and sharing titles separate jobs
Field in the fileValue with the loaded exampleCheck before pasting
titleField Notes & MapsCheck the page title in your CMS or theme.
og:title and twitter:titleA map for your next walkClear the shared social override to reuse the page title.
rel=canonical and og:urlhttps://example.com/field-notesUse your preferred page address in both values.
og:image and twitter:imagehttps://example.com/trail-map.pngUse the intended image URL and provide alt text.

WHATWG HTML Living Standard, document metadataGoogle Search Central, title linksOpen Graph protocol, basic metadataX Help Center, usernames and handles

Check who emits each tag before inserting the output

Download the HTML and look for the page title, canonical and social URL. For this example the two address tags agree. In your own page, use the address you want to associate with the page and check that it agrees with links elsewhere on the site.

In a CMS, use the page's title, description and canonical fields when they already populate the head. If you edit the template directly, replace existing equivalents. Leave a single canonical declaration and confirm the final source with Meta Tags Analyzer.

WHATWG HTML Living Standard, document metadataGoogle Search Central, canonical URL signals

Check indexing settings against the intended release

The example omits the robots tag. Enable Noindex to see the robots tag request exclusion from search results. Clear it if this is a public page you intend to make eligible for indexing.

Check HTTP headers and the hosted page separately when you publish. A robots meta tag is one source of crawling and indexing information, and restrictions in other places can still apply.

Google Search Central, robots meta tags

Common questions

Why is the canonical a link element?

The canonical annotation identifies a relationship to a URL, so the HTML version uses link with rel set to canonical. Put it in the document head.

Can I use a relative path for the social image here?

Enter an absolute HTTP(S) image URL. Review the published image separately to check that the platforms that need it can access it.

Sources

Put it into practice.

Related guides