On-page SEO
Title, description, canonical, structured data
The SEO signals you control inside the page itself — as opposed to off-page (backlinks). It’s what the HTML starter template already wires up; Open Graph handles the social-sharing side.
The <head> essentials
<title>Unique title, ≤ 60 characters</title>
<meta name="description" content="Persuasive summary, ≤ 160 characters." />
<link rel="canonical" href="https://site.com/page" />
<meta name="robots" content="index, follow" />
title— the most visible on-page factor (it becomes the blue link on Google). Unique per page, with the keyword near the start.description— not a direct ranking factor, but the snippet text drives CTR. Write it like an ad.canonical— points to the preferred URL when the same content lives at several addresses (with/withoutwww, tracking params). Prevents duplicate content.robots—noindexremoves the page from the index;nofollowskips its links.
Semantic structure
Semantic HTML helps the crawler understand the hierarchy:
- A single
<h1>per page describing the main topic. <h2>/<h3>in logical order, without skipping levels for looks.- Descriptive
alton every<img>— accessibility and image SEO. - Short, readable URLs (
/blog/on-page-seo, not/p?id=42).
Structured data (JSON-LD)
Marks up the content in schema.org vocabulary and enables rich
results (stars, breadcrumbs, FAQ). It goes in a <script> in the <head>:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Article title",
"datePublished": "2026-06-27",
"author": { "@type": "Person", "name": "Name" }
}
</script>
Multilingual sites: hreflang
Each language is a URL, linked via hreflang so Google serves the right version — see
i18n on the web. Always include the x-default tag.
Quick checklist
- [ ] Unique
title≤ 60 anddescription≤ 160. - [ ]
canonicalpointing to the preferred URL. - [ ] One
<h1>and a coherent heading hierarchy. - [ ]
alton every image. - [ ] JSON-LD for the content type.
- [ ]
sitemap.xmlandrobots.txtpublished.
Related: Open Graph · HTML starter template.