fix: SEO — prevent Google from indexing /text instead of main page
- Add X-Robots-Tag: noindex, nofollow header to /text endpoint - Add Link: canonical header pointing to HTML version - Add Disallow: /text to robots.txt - Update sitemap.xml lastmod to 2026-04-09
This commit is contained in:
@@ -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", `<https://juan.andres.morenorub.io/?lang=`+langCode+`>; rel="canonical"`)
|
||||
|
||||
// Check if download is requested
|
||||
if r.URL.Query().Get("download") == "true" {
|
||||
|
||||
Reference in New Issue
Block a user