diff --git a/internal/handlers/cv_text.go b/internal/handlers/cv_text.go index 3c1d521..6ba76d5 100644 --- a/internal/handlers/cv_text.go +++ b/internal/handlers/cv_text.go @@ -152,6 +152,8 @@ func (h *CVHandler) PlainText(w http.ResponseWriter, r *http.Request) { // Set response headers w.Header().Set(c.HeaderContentType, c.ContentTypePlainText) w.Header().Set(c.HeaderXContentTypeOpts, c.NoSniff) + w.Header().Set("X-Robots-Tag", "noindex, nofollow") + w.Header().Set("Link", `; rel="canonical"`) // Check if download is requested if r.URL.Query().Get("download") == "true" { diff --git a/static/robots.txt b/static/robots.txt index 50a2b32..43e6c22 100644 --- a/static/robots.txt +++ b/static/robots.txt @@ -13,6 +13,10 @@ Disallow: /api/internal/ Disallow: /.git/ Disallow: /.env +# Plain text version — prevent duplicate content indexing +# Canonical HTML version at / should be indexed instead +Disallow: /text + # ============================================================================= # SITEMAPS & AI CONTENT # ============================================================================= diff --git a/static/sitemap.xml b/static/sitemap.xml index 52fddd3..05c8398 100644 --- a/static/sitemap.xml +++ b/static/sitemap.xml @@ -5,7 +5,7 @@ https://juan.andres.morenorub.io/?lang=en - 2024-10-18 + 2026-04-09 monthly 1.0 @@ -15,7 +15,7 @@ https://juan.andres.morenorub.io/?lang=es - 2024-10-18 + 2026-04-09 monthly 1.0 @@ -25,7 +25,7 @@ https://juan.andres.morenorub.io/ - 2024-10-18 + 2026-04-09 monthly 0.9 @@ -33,7 +33,7 @@ https://juan.andres.morenorub.io/health - 2024-10-18 + 2026-04-09 daily 0.3