From 82c627c7561694539beab50940e5c70a95a8a522 Mon Sep 17 00:00:00 2001 From: Ihor_Zhekov Date: Mon, 4 May 2026 10:32:00 +0200 Subject: [PATCH] robots.txt DSGVO fix --- public/robots.txt | 37 ++++++++++++++++++++++++++++++++++++- public/sitemap.xml | 10 ---------- src/pages/Datenschutz.jsx | 8 ++++++++ src/pages/Impressum.jsx | 9 +++++++++ 4 files changed, 53 insertions(+), 11 deletions(-) diff --git a/public/robots.txt b/public/robots.txt index d5c1692..df1ea77 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,26 +1,61 @@ +# ── Default: all bots ──────────────────────────────────────────── User-agent: * Allow: / +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ + +# ── AI crawlers: same restrictions ─────────────────────────────── +# Personal data (Impressum, Datenschutz) must not be indexed — DSGVO. +# Business content and llms.txt are explicitly available. -# AI crawlers — explicitly welcome User-agent: GPTBot Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: ClaudeBot Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: PerplexityBot Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: GoogleOther Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: Applebot Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: YouBot Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ User-agent: anthropic-ai Allow: / +Allow: /llms.txt +Disallow: /impressum +Disallow: /datenschutz +Disallow: /api/ Sitemap: https://www.superfice.de/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml index ad35b4c..1b3aac6 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -5,14 +5,4 @@ weekly 1.0 - - https://www.superfice.de/impressum - yearly - 0.3 - - - https://www.superfice.de/datenschutz - yearly - 0.3 - diff --git a/src/pages/Datenschutz.jsx b/src/pages/Datenschutz.jsx index 0b93ae4..c33f31d 100644 --- a/src/pages/Datenschutz.jsx +++ b/src/pages/Datenschutz.jsx @@ -3,6 +3,14 @@ import { Link } from 'react-router-dom' import './LegalPage.css' export default function Datenschutz() { + useEffect(() => { + const meta = document.createElement('meta') + meta.name = 'robots' + meta.content = 'noindex, nofollow' + document.head.appendChild(meta) + return () => document.head.removeChild(meta) + }, []) + useEffect(() => { const host = window.location.hostname if (host === 'localhost' || host === '127.0.0.1') return diff --git a/src/pages/Impressum.jsx b/src/pages/Impressum.jsx index f67c572..30882e3 100644 --- a/src/pages/Impressum.jsx +++ b/src/pages/Impressum.jsx @@ -1,7 +1,16 @@ +import { useEffect } from 'react' import { Link } from 'react-router-dom' import './LegalPage.css' export default function Impressum() { + useEffect(() => { + const meta = document.createElement('meta') + meta.name = 'robots' + meta.content = 'noindex, nofollow' + document.head.appendChild(meta) + return () => document.head.removeChild(meta) + }, []) + return (