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:
1
client/public/ads.txt
Normal file
1
client/public/ads.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
google.com, pub-1104166651501135, DIRECT, f08c47fec0942fa0
|
||||||
@@ -531,6 +531,11 @@ Sitemap: ${SITE_URL}/sitemap.xml
|
|||||||
res.send(robotsTxt);
|
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) => {
|
app.get('/sitemap.xml', (req, res) => {
|
||||||
try {
|
try {
|
||||||
const sitemap = buildSitemapXml();
|
const sitemap = buildSitemapXml();
|
||||||
|
|||||||
Reference in New Issue
Block a user