# SEO — Strategy and Implementation
> **Status:** Active — delivered (BIT-349)
---
## Overview
SEO is a first-class concern for this platform. All pages are server-rendered, so search engines receive complete HTML without running JavaScript. The SEO implementation follows the standards used by top-tier news sites (Record, BBC Sport, The Athletic).
---
## Principles
1. **SSR-first.** No client-side rendering for content. Crawlers see full HTML.
2. **Canonical URLs.** Every page has one canonical URL; duplicates redirect (301).
3. **Structured data.** `NewsArticle` JSON-LD on all article pages.
4. **Fast first paint.** LCP < 2.5 s; CLS < 0.1 — both are Core Web Vitals ranking signals.
5. **Domain-aware.** Each domain generates its own sitemap, robots.txt, and meta tags.
---
## URL Structure
| Page type | URL pattern |
|-----------|-------------|
| Homepage | `/` |
| Category | `/{category}/` |
| Article | `/{category}/{slug}/` |
| Tag | `/tag/{slug}/` |
| Search | `/search?q={query}` |
| Sitemap | `/sitemap.xml` |
| Robots | `/robots.txt` |
---
## Meta Tags
Every page renders the following in `
`:
```html
{title} | {site_name}
```
---
## Structured Data (JSON-LD)
### Article Page
```json
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{title}",
"description": "{excerpt}",
"image": ["{featured_image_url}"],
"datePublished": "{published_at}",
"dateModified": "{modified_at}",
"author": {
"@type": "Person",
"name": "{author.name}"
},
"publisher": {
"@type": "Organization",
"name": "{site_name}",
"logo": {
"@type": "ImageObject",
"url": "{logo_url}"
}
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{canonical_url}"
},
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{site_url}" },
{ "@type": "ListItem", "position": 2, "name": "{category}", "item": "{category_url}" },
{ "@type": "ListItem", "position": 3, "name": "{title}" }
]
}
}
```
### Homepage / Site-wide
```json
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "{site_name}",
"url": "{site_url}",
"potentialAction": {
"@type": "SearchAction",
"target": "{site_url}/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
```
---
## Sitemap
Generated dynamically at `/sitemap.xml` via Astro's `sitemap.xml.ts` endpoint. The bridge provides all published post slugs, categories, and tags. The sitemap is split by content type and updated on every request (cached 5 min in Redis).
```xml
https://newsproject.bitreport.pt/futebol/porto-bate-benfica/2026-03-23T12:00:00Zweekly0.8
...
```
---
## Robots.txt
Generated dynamically at `/robots.txt` per domain:
```
User-agent: *
Allow: /
Disallow: /search
Disallow: /api/
Sitemap: https://newsproject.bitreport.pt/sitemap.xml
```
---
## Image SEO
- All images have `alt` text (sourced from WP media library `alt` field)
- Featured images include `width` and `height` attributes (no CLS)
- Astro `` component generates WebP with JPEG fallback
- Hero image uses `fetchpriority="high"` to prioritize LCP element
---
## AMP (Research Note)
AMP is **not** in the initial scope. Astro can generate AMP-compliant pages via a parallel route (`/amp/[slug].astro`). Google no longer requires AMP for Top Stories eligibility (since 2021), so the ROI is low. Revisit if analytics show significant AMP traffic from legacy search placements.