← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

HTML Meta Tags & SEO

Frontend PHP 5.0+ Beginner
debt(d7/e3/b3/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7), slightly better at d7. Tools listed are Lighthouse, Google Search Console, and Screaming Frog — these are specialist audit/crawl tools, not inline linters or compilers. Missing meta tags, duplicate descriptions, or absent canonicals won't surface during development; you need to run an explicit SEO audit or wait for search ranking signals, making it closer to d7 than d5.

e3 Effort Remediation debt — work required to fix once spotted

Closest to 'simple parameterised fix' (e3). The quick_fix is adding unique <title> and <meta name='description'> per PHP-rendered page plus Open Graph tags and canonicals — a small, repeatable pattern applied per page/template. It's more than a single-line patch but doesn't span multiple components architecturally; fixing a PHP template or layout file covers most cases.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3). The applies_to scope is web context only, and meta tag management is typically handled in a layout/template file or a thin SEO helper. It imposes a small ongoing discipline (each new page needs unique tags) but doesn't reshape the architecture or create cross-cutting concerns across the codebase.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception field explicitly states that meta keywords still matter — a documented gotcha that many beginners carry as a false belief. Additionally, missing canonical tags on paginated URLs and duplicate descriptions are common_mistakes that a competent developer might easily overlook. This is a well-known documented trap rather than a catastrophic or architectural one.

About DEBT scoring →

Also Known As

meta description Open Graph canonical URL structured data JSON-LD

TL;DR

Essential meta tags for search engine visibility and social sharing — title, description, canonical, Open Graph, Twitter Card, and structured data.

Explanation

Key meta tags: title (50-60 chars, unique per page), meta description (150-160 chars, compelling summary), meta robots (index/noindex, follow/nofollow), canonical (prevents duplicate content penalties), Open Graph (og:title, og:description, og:image — for Facebook/LinkedIn sharing), Twitter Card (twitter:card, twitter:image), and lang attribute on html element. Structured data (JSON-LD with Schema.org) enables rich snippets in search results — FAQPage, Product, Article, BreadcrumbList. Each PHP page template should generate unique, meaningful meta tags dynamically.

Common Misconception

Meta keywords still matter for SEO — Google has ignored the meta keywords tag since 2009; focus on quality content, title, description, and structured data instead.

Why It Matters

Missing canonical tags cause duplicate content penalties when the same product appears at multiple URLs — a single missing meta tag can halve a page's search ranking.

Common Mistakes

  • Same meta description on every page — each page needs a unique, descriptive description.
  • Missing canonical tag on paginated pages — /products?page=2 competes with /products.
  • Open Graph image not specified — social shares show a blank or incorrect image.
  • Title tag over 60 characters — truncated in search results.

Code Examples

✗ Vulnerable
<!-- Static/missing meta — same on every page:
<title>My Website</title>
<!-- No meta description -->
<!-- No canonical -->
<!-- No Open Graph -->
✓ Fixed
<!-- Dynamic meta in PHP template:
<title><?= esc($page->title) ?> | CodeClarityLab</title>
<meta name="description" content="<?= esc($page->description) ?>">
<link rel="canonical" href="<?= esc($page->canonicalUrl) ?>">

<!-- Open Graph:
<meta property="og:title" content="<?= esc($page->title) ?>">
<meta property="og:description" content="<?= esc($page->description) ?>">
<meta property="og:image" content="<?= esc($page->ogImage) ?>">
<meta property="og:type" content="article">

<!-- Structured data:
<script type="application/ld+json">
<?= json_encode(['@context'=>'https://schema.org','@type'=>'Article','name'=>$page->title]) ?>
</script>

Added 16 Mar 2026
Edited 22 Mar 2026
Views 68
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 5 pings S 2 pings M 1 ping T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 1 ping M 1 ping T 1 ping W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Amazonbot 10 Perplexity 9 Scrapy 7 Google 6 SEMrush 5 Ahrefs 4 Bing 3 Unknown AI 2 ChatGPT 2 Majestic 1 Claude 1 Meta AI 1
crawler 48 crawler_json 3
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Low
⚡ Quick Fix
Set a unique <title> and <meta name='description'> on every PHP-rendered page; add Open Graph tags for social sharing; use canonical URLs to prevent duplicate content
📦 Applies To
PHP 5.0+ web
🔗 Prerequisites
🔍 Detection Hints
Same <title> on all pages; missing meta description; no Open Graph tags; duplicate content on multiple URLs without canonical
Auto-detectable: ✓ Yes lighthouse google-search-console screaming-frog
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: Low Context: File


✓ schema.org compliant