Sub topic 3
Controlling link previews with Open Graph
This chapter assumes you know basic HTML, the <head> section of a page, and what a canonical URL is.
Controlling link previews with Open Graph
Open Graph tags are <meta> elements that tell social platforms which title, description, and image to show when someone shares a link. Without them, platforms guess from the page content, often badly.
<meta property="og:type" content="article">
<meta property="og:title" content="Acme launches Widget 2">
<meta property="og:description" content="Widget 2 cuts setup time for small teams.">
<meta property="og:url" content="https://example.com/newsroom/acme-launches-widget-2">
<meta property="og:image" content="https://example.com/img/widget-2-1200x630.jpg">
<meta name="twitter:card" content="summary_large_image">Use a 1200×630 image, and keep og:url identical to the canonical URL.
Describing the organization and news with JSON-LD
JSON-LD is a block of JSON that uses schema.org vocabulary to describe a page to search engines. Place it in a <script type="application/ld+json"> element in the head.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "Acme launches Widget 2",
"datePublished": "2026-03-12T09:00:00Z",
"publisher": {"@type": "Organization", "name": "Acme"}
}
</script>The headline must match the visible page text.
Offering an RSS feed
RSS is an XML file that lists recent items so readers and tools can subscribe. Advertise it from the page head:
<link rel="alternate" type="application/rss+xml" title="Acme Newsroom" href="/newsroom/feed.xml">Give each item a stable <guid>, usually the release URL, so subscribers do not see duplicates.
Canonical URLs, sitemap, and crawlability
A canonical URL is the one address you want search engines to index. Declare it with <link rel="canonical" href="...">. List every release in a sitemap so crawlers can find new pages. Each <url> entry needs a <loc> and a <lastmod>.
Checking accessibility
Use landmark elements such as <main> and <section> with headings, and give every image alt text. Make link text descriptive, not "click here." Test with the keyboard alone: every link and button should be reachable with the Tab key.
Keeping the page and downloads fast
Compress photos before upload, and serve images at the size they display. Add loading="lazy" to images below the fold.
<img src="/img/widget-2-800.jpg" alt="Widget 2 on a desk" width="800" height="600" loading="lazy">Keeping the newsroom current and measuring use
When facts change, update the boilerplate, feed, and sitemap lastmod dates together. Measure page views and downloads with your analytics tool, and review them monthly.
Exercise
Why must og:url match the canonical URL?
Show answer
Social platforms and search engines should agree on one address for the page, so shared links and search rankings point to the same page.