Prepare a page head for a new guide without losing its canonical
Admin ·
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.
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.
| Field in the file | Value with the loaded example | Check before pasting |
|---|---|---|
| title | Field Notes & Maps | Check the page title in your CMS or theme. |
| og:title and twitter:title | A map for your next walk | Clear the shared social override to reuse the page title. |
| rel=canonical and og:url | https://example.com/field-notes | Use your preferred page address in both values. |
| og:image and twitter:image | https://example.com/trail-map.png | Use 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.
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
- Find Duplicate Titles and Meta Descriptions
- Write a Meta Description for Narrow Snippets
- Compare Open Graph and X Share Card Crops
- How to Create and Check FAQPage Markup
- Compare Two Headlines by Topic Position
- Check Two Layouts for a Link Preview Card
- Retag a URL and Preserve its Query and Anchor
- Preview the Field Notes Search Result
- Build Event Markup for a Studio Workshop
- Trace a Canonical Conflict in Saved HTML
- Find Duplicate Page Titles in a CSV
- Set Noindex in HTML or a Response Header
- Choose Which Parameters a Canonical URL Keeps
- Set Image Order in Open Graph HTML
- Compare Meta Description Variants and Coverage