Add ads.txt route for ad verification

- Introduced a new route for serving ads.txt, providing necessary information for ad verification by Google.
- This addition enhances compliance with advertising standards and improves the site's ad management capabilities.
This commit is contained in:
Torsten Schulz (local)
2026-04-27 14:32:51 +02:00
parent 33bf162798
commit 1630cb3366
2 changed files with 6 additions and 0 deletions

1
client/public/ads.txt Normal file
View File

@@ -0,0 +1 @@
google.com, pub-1104166651501135, DIRECT, f08c47fec0942fa0

View File

@@ -531,6 +531,11 @@ Sitemap: ${SITE_URL}/sitemap.xml
res.send(robotsTxt);
});
app.get('/ads.txt', (req, res) => {
res.type('text/plain');
res.send('google.com, pub-1104166651501135, DIRECT, f08c47fec0942fa0\n');
});
app.get('/sitemap.xml', (req, res) => {
try {
const sitemap = buildSitemapXml();