SEO

Set Up Metadata and Open Graph

Set up metadata and Open Graph by giving each important page a unique title, useful description, canonical URL and social preview that matches the visible page content.

What this workflow solves

Target outcome

Consistent page metadata that improves search snippets, social sharing previews and technical SEO confidence.

Work through Metadata and Open Graph

Track each step, focus the current task and copy a starter outline for your project notes or implementation plan.

0% complete
Write the search snippet first

The title and description should make the page's promise clear before users click.

  • Keep the title specific to the page intent.
  • Write a description that explains what users can do or learn.
  • Avoid duplicating the same title across multiple pages.
Starter codeCopy and adapt this outline for the workflow.
<section aria-labelledby="set-up-metadata-open-graph-title">
  <p>Metadata and Open Graph</p>
  <h2 id="set-up-metadata-open-graph-title">Set Up Metadata and Open Graph</h2>
  <p>Consistent page metadata that improves search snippets, social sharing previews and technical SEO confidence.</p>
  <ol>
    <li>Write the search snippet first</li>
    <li>Set canonical and robots rules</li>
    <li>Prepare Open Graph and Twitter cards</li>
  </ol>
</section>

Work this way

These are the patterns that keep the workflow practical, accessible and easier to maintain.

Keep the title specific to the page intent.
Use the production domain, not localhost.
Use a clear title and description for sharing.

Avoid these traps

Writing metadata that does not match the visible page promise.
Adding structured data for content that is not visible on the page.
Leaving internal links vague or disconnected from user intent.

Step-by-step workflow

Follow the steps in order, then use the resource sections when you need a tool, reference or UI pattern.

1

Write the search snippet first

The title and description should make the page's promise clear before users click.

  • Keep the title specific to the page intent.
  • Write a description that explains what users can do or learn.
  • Avoid duplicating the same title across multiple pages.
2

Set canonical and robots rules

Canonical URLs and robots settings help crawlers understand which public URL should be indexed.

  • Use the production domain, not localhost.
  • Point canonical URLs at the preferred public route.
  • Keep noindex rules for pages that should stay private or temporary.
3

Prepare Open Graph and Twitter cards

Social previews should reinforce the same promise as the page title and first visible content.

  • Use a clear title and description for sharing.
  • Choose a preview image that represents the page.
  • Check that the preview does not overpromise features.

Tools, cheatsheets and components

Use these linked DevKitYard sections when the guide moves from planning to doing.

Align page sections with metadata in ElementYard

Use ElementYard to tune the visible hero and supporting sections so they match your metadata promise.

Open ElementYard

Metadata and Open Graph questions

Should Open Graph text match the meta description exactly?

It can, but it does not have to. It should make the same honest promise in a format that works well for social sharing.

Can structured data fix weak page content?

No. Structured data helps describe visible content, but it cannot replace a clear page, useful headings and helpful copy.