Add a unique <title> tag to every page — Cursor
The <title> tag is the single strongest on-page ranking signal. Without unique, descriptive titles per page, Google cannot tell your pages apart and your search CTR collapses.
Fixing this in Cursor
Agentic AI code editor built on VSCode
If you are in a Next.js App Router project, export a `metadata` object from each `page.tsx`. For Pages Router, use `next/head`.
Files to touch in Cursor:
app/**/page.tsxapp/layout.tsx for defaultsCursor gotchas:
- !Never hardcode the title in `app/layout.tsx` for all pages — that creates 100 pages with identical titles.
Using a different tool? Pick your stack:
The prompt for Cursor
Copy and paste this into your Cursor chat exactly as-is.
Apply these changes to my codebase. Edit the files directly and keep existing formatting: Add a unique <title> tag 1. Add a unique, descriptive <title> in <head> on every page (10-60 characters). 2. Include the primary keyword and the brand name. 3. Make sure no two pages share the same title.
Why this matters
Google reads the <title> tag before anything else on your page. It becomes the blue link text in search results, the browser tab label, and the default text when someone bookmarks or shares your URL. A weak or duplicate title quietly caps how high any page can rank, no matter how good the content is.
Studies of CTR in the Google SERP consistently show that rewriting a bland title to something specific and benefit-led lifts click-through by 15-40%. That is a free traffic multiplier — the ranking does not need to move for you to get more visitors.
AI tools like Lovable, Bolt and v0 often generate an entire site with a single templated <title> like "App" or "Home" because the user never asked for better. This is the #1 SEO miss in AI-built apps and takes 5 minutes to fix.
How to use this prompt in Cursor
- 1. Open your Cursor project.
- 2. Copy the prompt above with the copy button.
- 3. Paste into the Cursor chat and send.
- 4. Review the diff, accept the changes, redeploy.
- 5. Verify the fix using the checklist below.
Common mistakes to avoid
- error_outlineSetting `document.title` inside a useEffect — crawlers without JS execution see the empty default.
- error_outlineUsing the same title on every page (e.g., the company name alone).
- error_outlineWriting titles over 60 characters — Google truncates anything beyond ~580px of pixel width.
- error_outlineStuffing 5 keywords separated by pipes. One primary keyword + brand is plenty.
- error_outlineForgetting to set a title at all on route files — some frameworks fall back to "React App" or the build tool name.
How to verify the fix worked
- check_circleView page source (Ctrl+U) and confirm `<title>` appears with the right text in raw HTML, not only after JS runs.
- check_circleRun `curl -s https://yoursite.com/page | grep "<title>"` — the correct title must appear.
- check_circleCrawl the site with Screaming Frog or Sitebulb and sort by title — no duplicates allowed.
- check_circleCheck Google Search Console → Indexing → Pages for "Duplicate title tag" warnings.
Frequently asked questions
What is the ideal title length?expand_more
Does setting document.title in JavaScript count?expand_more
Will Google rewrite my title?expand_more
Want all 34 prompts tailored to your Cursor site?
Pantra scans your site in 10 seconds, detects the stack, and generates the exact prompts that apply — only the ones you actually need.
Scan my siteRelated Cursor prompts
Add unique meta descriptions to every page — Cursor
Prompt to add unique 50-160 character meta descriptions to every page — controls the grey snippet text in Google search results.
SEOFix the H1 tag — exactly one per page — Cursor
Prompt to enforce exactly one H1 per page with the primary keyword, for Lovable, Cursor, Bolt, v0, Replit, Windsurf, Claude Code, Base44.
SEOAdd Open Graph + Twitter Card tags — Cursor
Prompt to add og:title, og:description, og:image, and Twitter Card meta so links look right when shared on Slack, LinkedIn, WhatsApp, Twitter.
SEOGenerate a sitemap.xml covering every route — Cursor
Stack-specific prompt to create /public/sitemap.xml listing all public routes, for Lovable, Cursor, Bolt, v0, Replit, Windsurf, Claude Code, and Base44.