SEO: Crawl- und Reputationsgrundlage für die neue Domain

- docs/seo-und-reputation.md: Ist-Zustand, DNS-Records (DMARC/CAA/DNSSEC,
  SPF -all), Einreich-Adressen für Firewall-Kategorien, Backlink-Reihenfolge
- build.py: Verification-Meta-Tokens (Google/Bing), IndexNow-Key-Datei,
  JSON-LD als @graph (ChildCare + WebSite) plus BreadcrumbList je Unterseite,
  lastmod der Sitemap aus dem Git-Commit der Seitenquelle
- layout.html: Platzhalter für Verification-Meta-Tags
- .htaccess: Trailing Slash per 301 auf die kanonische URL
- deploy.sh: IndexNow-Ping nach erfolgreichem Upload (nicht blockierend)
- check.py: validiert JSON-LD und Sitemap-Einträge
This commit is contained in:
torsten 2026-11-30 09:51:56 +01:00
parent 2c7cae11a5
commit edc7f0b863
9 changed files with 411 additions and 28 deletions

View file

@ -114,3 +114,40 @@ if [ "$DRY_RUN" -eq 0 ]; then
exit 1
fi
fi
# ------------------------------------------------------------------ IndexNow
# Meldet die Sitemap-URLs bei api.indexnow.org an (Bing, Yandex, Seznam, Naver).
# Voraussetzung: INDEXNOW_KEY in scripts/build.py gesetzt – der Build legt dann
# <key>.txt im Web-Root an, die als Nachweis dient. Details:
# docs/seo-und-reputation.md
if [ "$DRY_RUN" -eq 0 ] && [ "$REMOTE_DIR" = "/" ] && [ -f "$SITE/sitemap.xml" ]; then
KEY_FILE="$(find "$SITE" -maxdepth 1 -name '*.txt' ! -name 'robots.txt' -print -quit)"
if [ -n "$KEY_FILE" ]; then
echo "▶ IndexNow"
python3 - "$(basename "$KEY_FILE" .txt)" "$SITE/sitemap.xml" <<'PY'
import json, re, sys, urllib.request
key, sitemap = sys.argv[1], sys.argv[2]
host = "sonjasrasselbande.de"
urls = re.findall(r"<loc>(.*?)</loc>", open(sitemap, encoding="utf-8").read())
payload = {
"host": host,
"key": key,
"keyLocation": f"https://{host}/{key}.txt",
"urlList": urls,
}
req = urllib.request.Request(
"https://api.indexnow.org/indexnow",
data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json; charset=utf-8",
"User-Agent": "sonjasrasselbande-deploy"},
method="POST",
)
try:
with urllib.request.urlopen(req, timeout=20) as res:
print(f" ✓ {len(urls)} URL(s) gemeldet (HTTP {res.status})")
except Exception as exc: # IndexNow ist optional, nie deploy-blockierend
print(f" · IndexNow nicht bestätigt: {exc}")
PY
fi
fi