From 8c9a6006456f483f43bdfacdf675286fb55c3a98 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Tue, 16 Jun 2026 12:47:58 +0200 Subject: [PATCH] fixed some domain issues --- README-PRODUCTION.md | 16 +++++++++--- SEO-TODO.md | 26 +++++++++---------- .../java/de/ypchat/android/ui/YpChatRoot.kt | 2 +- .../app/src/main/res/values-de/strings.xml | 2 +- android/app/src/main/res/values/strings.xml | 2 +- apache-config-example.conf | 17 +++++++++--- apache-config-ssl-split.conf | 10 +++---- client/index.html | 10 +++---- client/src/router/index.js | 2 +- client/src/views/PrivacyView.vue | 2 +- client/src/views/SeoLandingView.vue | 2 +- server/index.js | 6 ++--- server/routes-seo.js | 6 ++--- 13 files changed, 61 insertions(+), 42 deletions(-) diff --git a/README-PRODUCTION.md b/README-PRODUCTION.md index f8e1178..2afada3 100644 --- a/README-PRODUCTION.md +++ b/README-PRODUCTION.md @@ -37,12 +37,11 @@ Die Apache-Konfiguration sollte bereits vorhanden sein. Stelle sicher, dass sie ```apache ServerName ypchat.net - ServerAlias www.ypchat.net # SSL-Konfiguration Include /etc/letsencrypt/options-ssl-apache.conf - SSLCertificateFile /etc/letsencrypt/live/www.ypchat.net/fullchain.pem - SSLCertificateKeyFile /etc/letsencrypt/live/www.ypchat.net/privkey.pem + SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem # Reverse Proxy zu Node.js ProxyPreserveHost On @@ -55,6 +54,17 @@ Die Apache-Konfiguration sollte bereits vorhanden sein. Stelle sicher, dass sie RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://localhost:4000/$1" [P,L] + + + ServerName www.ypchat.net + + Include /etc/letsencrypt/options-ssl-apache.conf + SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem + + RewriteEngine On + RewriteRule ^ https://ypchat.net%{REQUEST_URI} [R=301,L] + ``` Wichtig: Die WebSocket-Rewrite-Regeln sind für Socket.IO erforderlich! diff --git a/SEO-TODO.md b/SEO-TODO.md index 11ac10c..29275fa 100644 --- a/SEO-TODO.md +++ b/SEO-TODO.md @@ -2,7 +2,7 @@ ## 1) Host-/TLS-Konsistenz (Apex und www) -- [x] App-Fallback-Redirect in Node aktiv (`ypchat.net` + HTTP -> `https://www.ypchat.net`). +- [x] App-Fallback-Redirect in Node aktiv (kanonischer Host: `https://ypchat.net`). ### Zertifikatserstellung (Let's Encrypt / Certbot, Apache) @@ -20,10 +20,10 @@ ### Apache-Redirects (kanonischer Host + HTTPS) Empfohlene Logik: -- `http://ypchat.net/*` -> `https://www.ypchat.net/*` (301) -- `http://www.ypchat.net/*` -> `https://www.ypchat.net/*` (301) -- `https://ypchat.net/*` -> `https://www.ypchat.net/*` (301) -- Nur `https://www.ypchat.net/*` liefert `200` +- `http://ypchat.net/*` -> `https://ypchat.net/*` (301) +- `http://www.ypchat.net/*` -> `https://ypchat.net/*` (301) +- `https://www.ypchat.net/*` -> `https://ypchat.net/*` (301) +- Nur `https://ypchat.net/*` liefert `200` Beispiel (VirtualHost fuer Port 80): @@ -32,32 +32,32 @@ Beispiel (VirtualHost fuer Port 80): ServerName ypchat.net ServerAlias www.ypchat.net RewriteEngine On - RewriteRule ^ https://www.ypchat.net%{REQUEST_URI} [R=301,L] + RewriteRule ^ https://ypchat.net%{REQUEST_URI} [R=301,L] ``` -Beispiel (VirtualHost fuer `https://ypchat.net`): +Beispiel (VirtualHost fuer `https://www.ypchat.net`): ```apache - ServerName ypchat.net + ServerName www.ypchat.net SSLEngine on SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem RewriteEngine On - RewriteRule ^ https://www.ypchat.net%{REQUEST_URI} [R=301,L] + RewriteRule ^ https://ypchat.net%{REQUEST_URI} [R=301,L] ``` Verifikation: -- `curl -I https://ypchat.net/` -> `301 Location: https://www.ypchat.net/` -- `curl -I https://www.ypchat.net/` -> `200` +- `curl -I https://ypchat.net/` -> `200` +- `curl -I https://www.ypchat.net/` -> `301 Location: https://ypchat.net/` - Browser ohne TLS-Warnung fuer beide Hosts ## 3) Search Console / Reindexing -- [ ] In Google Search Console `https://www.ypchat.net` als Hauptproperty nutzen. -- [ ] Sitemap neu einreichen: `https://www.ypchat.net/sitemap.xml`. +- [ ] In Google Search Console `https://ypchat.net` als Hauptproperty nutzen. +- [ ] Sitemap neu einreichen: `https://ypchat.net/sitemap.xml`. - [ ] Live-Tests ausfuehren fuer: - [ ] `/` - [ ] `/partners` diff --git a/android/app/src/main/java/de/ypchat/android/ui/YpChatRoot.kt b/android/app/src/main/java/de/ypchat/android/ui/YpChatRoot.kt index 1b9f166..b176f73 100644 --- a/android/app/src/main/java/de/ypchat/android/ui/YpChatRoot.kt +++ b/android/app/src/main/java/de/ypchat/android/ui/YpChatRoot.kt @@ -112,7 +112,7 @@ private val Primary600 = Color(0xFF2F6F46) private val Primary500 = Color(0xFF3D8654) private val Primary100 = Color(0xFFE7F1EA) private val Danger = Color(0xFFA24040) -private const val PrivacyPolicyUrl = "https://ypchat.net/datenschutz" +private const val PrivacyPolicyUrl = "https://www.ypchat.net/datenschutz" private data class GenderOption(val value: String, val label: String) private data class SmileyItem(val token: String, val hexCode: String, val tooltip: String) diff --git a/android/app/src/main/res/values-de/strings.xml b/android/app/src/main/res/values-de/strings.xml index 150cede..b1640fa 100644 --- a/android/app/src/main/res/values-de/strings.xml +++ b/android/app/src/main/res/values-de/strings.xml @@ -105,7 +105,7 @@ Wähle einen Nicknamen, gib deine Profildaten an und starte den Chat. Teile keine sensiblen Daten wie Telefonnummern, Adressen, Passwörter oder Zahlungsinformationen. Du kannst Bilder senden, Benutzer blockieren und Feedback für ernste Vorfälle nutzen. Keine Beleidigungen, Hassrede, illegalen Inhalte, Spam oder unerwünschte Belästigung. Sende nur Bilder, die du teilen darfst, und respektiere die Privatsphäre anderer. Nutze einen Nicknamen, der dich nicht identifiziert. Teile keine privaten Kontakt- oder Zahlungsdaten. Sei vorsichtig mit Links von Unbekannten und beende Gespräche, die sich falsch anfühlen. Nutze Blockieren und Feedback bei schweren Vorfällen. - SingleChat verarbeitet den von dir gewählten Nickname, Profildaten wie Alter, Geschlecht und Land, Chat-Nachrichten, von dir aktiv gesendete Bilder, Feedback-Nachrichten sowie technisch notwendige Sitzungsdaten. Die Android-App fragt den Kamerazugriff nur an, wenn du in der App aktiv ein Foto aufnehmen möchtest. Die vollständige Datenschutzerklärung für Website und App ist auf ypchat.net veröffentlicht. + SingleChat verarbeitet den von dir gewählten Nickname, Profildaten wie Alter, Geschlecht und Land, Chat-Nachrichten, von dir aktiv gesendete Bilder, Feedback-Nachrichten sowie technisch notwendige Sitzungsdaten. Die Android-App fragt den Kamerazugriff nur an, wenn du in der App aktiv ein Foto aufnehmen möchtest. Die vollständige Datenschutzerklärung für Website und App ist auf www.ypchat.net veröffentlicht. Datenschutzerklärung öffnen Torsten Schulz, Friedrich-Stampfer-Str. 21, 60437 Frankfurt. Kontakt: tsschulz@tsschulz.de. Für externe Links sind deren Betreiber verantwortlich. diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index bfb3a7f..e622be5 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -105,7 +105,7 @@ Choose a nickname, enter your profile details and start chatting. Do not share sensitive data like phone numbers, addresses, passwords or payment information. You can send images, block users and use feedback for serious issues. No insults, hate speech, illegal content, spam or unwanted harassment. Only send images you are allowed to share and respect the privacy of others. Use a nickname that does not identify you. Do not share private contact or payment data. Be careful with links from strangers and end conversations that feel wrong. Use block and feedback for serious incidents. - SingleChat processes the nickname you choose, profile details such as age, gender and country, chat messages, images you actively send, feedback messages and technically necessary session data. The Android app requests camera access only if you actively want to take a photo in the app. The full privacy policy for website and app is published on ypchat.net. + SingleChat processes the nickname you choose, profile details such as age, gender and country, chat messages, images you actively send, feedback messages and technically necessary session data. The Android app requests camera access only if you actively want to take a photo in the app. The full privacy policy for website and app is published on www.ypchat.net. Open privacy policy Torsten Schulz, Friedrich-Stampfer-Str. 21, 60437 Frankfurt. Contact: tsschulz@tsschulz.de. External links are the responsibility of their operators. diff --git a/apache-config-example.conf b/apache-config-example.conf index a77b744..45d9e43 100644 --- a/apache-config-example.conf +++ b/apache-config-example.conf @@ -1,12 +1,11 @@ ServerName ypchat.net - ServerAlias www.ypchat.net # SSL-Konfiguration Include /etc/letsencrypt/options-ssl-apache.conf - SSLCertificateFile /etc/letsencrypt/live/www.ypchat.net/fullchain.pem - SSLCertificateKeyFile /etc/letsencrypt/live/www.ypchat.net/privkey.pem + SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem # DocumentRoot (nur für statische Dateien wie ads.txt) DocumentRoot /opt/ypchat/docroot @@ -64,5 +63,15 @@ RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" - + + ServerName www.ypchat.net + + Include /etc/letsencrypt/options-ssl-apache.conf + SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem + + RewriteEngine On + RewriteRule ^ https://ypchat.net%{REQUEST_URI} [R=301,L] + + diff --git a/apache-config-ssl-split.conf b/apache-config-ssl-split.conf index 872933f..11fd27f 100644 --- a/apache-config-ssl-split.conf +++ b/apache-config-ssl-split.conf @@ -1,19 +1,19 @@ - # 1) Apex-Domain (ypchat.net) liefert NUR Redirect auf www + # 1) www-Domain liefert NUR Redirect auf Apex - ServerName ypchat.net + ServerName www.ypchat.net Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/ypchat.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/ypchat.net/privkey.pem RewriteEngine On - RewriteRule ^ https://www.ypchat.net%{REQUEST_URI} [R=301,L] + RewriteRule ^ https://ypchat.net%{REQUEST_URI} [R=301,L] - # 2) Canonical Host (www.ypchat.net) liefert die App + # 2) Canonical Host (ypchat.net) liefert die App - ServerName www.ypchat.net + ServerName ypchat.net # SSL-Konfiguration Include /etc/letsencrypt/options-ssl-apache.conf diff --git a/client/index.html b/client/index.html index 31ffcff..68d756e 100644 --- a/client/index.html +++ b/client/index.html @@ -14,8 +14,8 @@ - - + + @@ -23,16 +23,16 @@ - + - + - +
diff --git a/client/src/router/index.js b/client/src/router/index.js index f6da8db..3d13734 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -14,7 +14,7 @@ import GuideSafetyView from '../views/GuideSafetyView.vue'; import GuideRedFlagsView from '../views/GuideRedFlagsView.vue'; import SeoLandingView from '../views/SeoLandingView.vue'; -const SITE_URL = 'https://ypchat.net'; +const SITE_URL = 'https://www.ypchat.net'; const DEFAULT_IMAGE = `${SITE_URL}/static/favicon.png`; const SUPPORTED_LOCALES = ['de', 'en', 'fr', 'es', 'it', 'ja', 'zh', 'th', 'tl']; const LOCALIZED_HOME_META = { diff --git a/client/src/views/PrivacyView.vue b/client/src/views/PrivacyView.vue index f38c961..bd2acc9 100644 --- a/client/src/views/PrivacyView.vue +++ b/client/src/views/PrivacyView.vue @@ -15,7 +15,7 @@

Datenschutzerklärung für Website und App

Diese Datenschutzerklärung gilt für die Website und die Android-App von SingleChat unter - der Domain ypchat.net. + der Domain www.ypchat.net.

Sie beschreibt die Verarbeitung personenbezogener Daten im Zusammenhang mit der Nutzung der diff --git a/client/src/views/SeoLandingView.vue b/client/src/views/SeoLandingView.vue index a64170b..cbce5cf 100644 --- a/client/src/views/SeoLandingView.vue +++ b/client/src/views/SeoLandingView.vue @@ -13,7 +13,7 @@

-

Single-Chat.net

+

YPChat

{{ landing.heading }}

{{ landing.intro }}

diff --git a/server/index.js b/server/index.js index 68b934d..579bd4e 100644 --- a/server/index.js +++ b/server/index.js @@ -20,12 +20,12 @@ const server = createServer(app); const NODE_ENV = process.env.NODE_ENV || 'development'; const PORT = process.env.PORT || (NODE_ENV === 'production' ? 4000 : 3300); const IS_PRODUCTION = NODE_ENV === 'production'; -const PRIMARY_HOST = 'ypchat.net'; -const LEGACY_HOSTS = new Set(['www.ypchat.net', 'single-chat.net', 'www.single-chat.net']); +const PRIMARY_HOST = 'www.ypchat.net'; +const LEGACY_HOSTS = new Set(['ypchat.net']); // CORS-Origins konfigurieren const allowedOrigins = IS_PRODUCTION - ? ['https://ypchat.net', 'https://www.ypchat.net', 'https://single-chat.net', 'https://www.single-chat.net'] + ? ['https://www.ypchat.net', 'https://ypchat.net'] : ['http://localhost:5175', 'http://127.0.0.1:5175']; // Socket.IO auf dem gleichen HTTP-Server wie Express diff --git a/server/routes-seo.js b/server/routes-seo.js index 6b3c79c..ad2c9fd 100644 --- a/server/routes-seo.js +++ b/server/routes-seo.js @@ -2,7 +2,7 @@ import { readFileSync, existsSync } from 'fs'; import { join, resolve } from 'path'; import { loadFeedback } from './feedback-store.js'; -const SITE_URL = 'https://ypchat.net'; +const SITE_URL = 'https://www.ypchat.net'; const DEFAULT_IMAGE = `${SITE_URL}/static/favicon.png`; const SEO_LOCALES = [ { code: 'de', label: 'Deutsch' }, @@ -363,7 +363,7 @@ for (const page of landingPages) { isPartOf: { '@type': 'WebSite', name: 'SingleChat', - alternateName: 'Single-Chat.net', + alternateName: 'YPChat', url: `${SITE_URL}/` }, inLanguage: 'de-DE' @@ -515,7 +515,7 @@ function buildSeoLandingContent(route) { .join('\n'); return `
-

Single-Chat.net

+

YPChat

${escapeHtml(page.heading)}

${escapeHtml(page.intro)}

${sectionMarkup}