Skip to content

Titles, descriptions and canonicals, fixed at the source

Give every page a unique title, a real description and the right canonical, from one helper.

  • Free, no sign-up
  • 45 to 90 minutes with an agent
  • By Devvrat Hans
  • Version 1.0, updated Oct 26, 2026

1Your site and stack

Optional. The prompt adapts as you type; leave a field blank and the agent works it out.

2Copy it into your agent

titles-descriptions-canonicals.md66 lines, about 1,052 tokens

Paste into any coding agent: Claude Code, Cursor, Codex, Copilot, Windsurf or Cline.

# Titles, descriptions and canonicals, fixed at the source

The title, meta description and canonical URL decide how each page of the production site appears in search results and which URL gets the credit. Duplicates, missing descriptions and wrong canonicals are among the most common technical SEO problems, and they are almost always caused by one shared layout. Fix them once, at the source, for every page type.

Site: not given. Find the production URL in the project config, or ask me.

## Ground rules

1. Read before you write. Explore the parts of the codebase this job touches and tell me what is already in place.
2. Plan, then stop. Give me a numbered plan: what you will change, in which files, and why. Wait for my approval before editing anything.
3. Fix things at their source (the shared layout, the config, the generator), not with one-off patches page by page.
4. Keep the project's conventions: its framework APIs, file layout, naming and code style. Add no new dependency without asking.
5. Where something is already done well, say so and leave it alone.

## You will not

- Edit `.env` files, secrets or API keys, or print their values.
- Deploy, push, merge or publish anything.
- Delete data, or run migrations or scripts against a production database.
- Add tracking, third-party scripts or links to any site I did not ask for.
- Change copy, design or behaviour that this job does not need.
- Change URLs or slugs (that needs redirects and its own plan).

## Your stack

- Framework: Work out the framework, router and build output from the project files (package.json, lockfiles, framework config) before planning, and say which you found.
- Host: Work out where the site is hosted from the config files (vercel.json, netlify.toml, wrangler config, Dockerfile, fly.toml) and say which you found.

## Steps

### 1. Inventory

For every page type (home, static pages, each dynamic template, paginated lists, filtered views), show what the title, description and canonical would be, and where each comes from. Flag duplicates across pages, titles over about 60 characters, descriptions missing or over about 155 characters, and canonicals that point at the homepage or at a different page.

### 2. One metadata helper

Route every page through one helper that takes the page's own title, description and canonical path and outputs the title, meta description, canonical link, and the matching Open Graph and X fields.

- **Titles:** unique, the specific thing first, the brand last ("Invoice templates for freelancers | Acme"), about 50 to 60 characters.
- **Descriptions:** written per page or built from the page's own data (a product's summary, a post's excerpt), about 120 to 155 characters, never the same sentence everywhere.
- **Canonicals:** absolute, self-referencing for normal pages, lowercase, one form for trailing slashes, and without tracking parameters.

### 3. Pagination, filters and duplicates

Page 2 and later of a list should be self-canonical (not pointing at page 1) and have "Page 2" in the title. Filtered or sorted views that only reorder the same items should canonicalise to the unfiltered page or be `noindex`. Pages reachable at two URLs (with and without `www`, with and without a trailing slash, old slugs) should redirect to one, not just carry a canonical.

### 4. Guard it

Add a test (or a build check) that fails when two indexable routes share a title, when a page has no description, or when a canonical is relative or points elsewhere unexpectedly. Use the project's existing test setup.

## Done means

- [ ] Every indexable page has a unique title with the brand last and a page-specific description.
- [ ] Every page has an absolute, self-referencing canonical unless it intentionally points elsewhere.
- [ ] Paginated pages are self-canonical with the page number in the title.
- [ ] All page metadata comes from one helper.
- [ ] A test fails on duplicate titles, missing descriptions or bad canonicals.

## Report back

When you finish, give me:

- what you changed, file by file;
- anything you skipped, and why;
- anything I must do by hand (DNS records, dashboards, accounts, deploys);
- how to check each change on the live site.

One-line version

For agents that can read a URL. It fetches this prompt with your settings applied.

Read https://abacklaunch.com/prompts/titles-descriptions-canonicals.md and follow it for this project.

3Check the result

When the changes are live, run these free checks. Add your site URL above and each one opens already running on it.

This prompt will not

  • Edit .env files, secrets or API keys, or print their values.
  • Deploy, push, merge or publish anything.
  • Delete data, or run migrations or scripts against a production database.
  • Add tracking, third-party scripts or links to any site I did not ask for.
  • Change copy, design or behaviour that this job does not need.
  • Change URLs or slugs (that needs redirects and its own plan).

It reads your code first, shows you a plan, and waits for your approval before it changes anything.

What you get

  • One metadata helper every page goes through
  • Unique titles and real descriptions for every page type
  • Correct canonicals, including pagination and filtered views
  • A test that stops duplicate titles coming back

How to use this prompt

  1. 1

    Describe your stack

    Add your site, framework and host. The prompt adapts; blank fields are left for the agent to work out.

  2. 2

    Paste it into your agent

    Open your project in Claude Code, Cursor, Codex, Copilot, Windsurf or Cline, and paste the prompt or the one-line version.

  3. 3

    Approve the plan

    The agent reads your code, shows you a plan with the files it will touch, and waits. Change anything you disagree with.

  4. 4

    Check the result

    When the changes are live, run the free checks below on your site to confirm each fix.

What the agent does

The title, meta description and canonical URL decide how each page of the production site appears in search results and which URL gets the credit. Duplicates, missing descriptions and wrong canonicals are among the most common technical SEO problems, and they are almost always caused by one shared layout. Fix them once, at the source, for every page type.

  1. 1. Inventory

    For every page type (home, static pages, each dynamic template, paginated lists, filtered views), show what the title, description and canonical would be, and where each comes from. Flag duplicates across pages, titles over about 60 characters, descriptions missing or over about 155 characters, and canonicals that point at the homepage or at a different page.

  2. 2. One metadata helper

    Route every page through one helper that takes the page's own title, description and canonical path and outputs the title, meta description, canonical link, and the matching Open Graph and X fields.

    • Titles: unique, the specific thing first, the brand last ("Invoice templates for freelancers | Acme"), about 50 to 60 characters.
    • Descriptions: written per page or built from the page's own data (a product's summary, a post's excerpt), about 120 to 155 characters, never the same sentence everywhere.
    • Canonicals: absolute, self-referencing for normal pages, lowercase, one form for trailing slashes, and without tracking parameters.
  3. 3. Pagination, filters and duplicates

    Page 2 and later of a list should be self-canonical (not pointing at page 1) and have "Page 2" in the title. Filtered or sorted views that only reorder the same items should canonicalise to the unfiltered page or be noindex. Pages reachable at two URLs (with and without www, with and without a trailing slash, old slugs) should redirect to one, not just carry a canonical.

  4. 4. Guard it

    Add a test (or a build check) that fails when two indexable routes share a title, when a page has no description, or when a canonical is relative or points elsewhere unexpectedly. Use the project's existing test setup.

Done means

  • Every indexable page has a unique title with the brand last and a page-specific description.
  • Every page has an absolute, self-referencing canonical unless it intentionally points elsewhere.
  • Paginated pages are self-canonical with the page number in the title.
  • All page metadata comes from one helper.
  • A test fails on duplicate titles, missing descriptions or bad canonicals.

Questions

Does Google use my meta description?

Often, but it rewrites it when it thinks another passage answers the search better. A specific, accurate description is used more often than a generic one.

Should every page have a canonical tag?

Yes, a self-referencing one on normal pages. It protects against duplicates created by tracking parameters and alternate URLs.

Can a canonical replace a redirect?

Not for pages you control at two URLs. A canonical is a hint; a 301 redirect is an instruction, and it sends visitors to the right URL too.

Does this prompt add links to Aback Launch to my site?

No. Nothing in the prompt mentions Aback Launch or asks your agent to link to us. The only exception is an optional badge step, which stays off unless you tick it. Some prompt libraries slip their own link into your codebase by default; we think that should always be your choice.

Which coding agents does it work with?

Claude Code, Cursor, Codex, GitHub Copilot, Windsurf, Cline, and any agent that can read your project and edit files. You can copy it as a plain prompt, save it as a Claude Code skill or a Cursor rule, or add it to AGENTS.md.

Is it safe to run on my real codebase?

The prompt makes the agent read first, show a plan and wait for your approval, and it forbids touching secrets, deploying and deleting data. Still review the changes and run your tests before you deploy, as with any change.

Changelog

  • v1.0First version.

Launch your startup on Aback Launch

Get a launch page that search engines and AI assistants can read, a place in the weekly launch list, and a review by a real person. Free to join.