-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
64 lines (62 loc) · 2.38 KB
/
Copy pathnext-sitemap.config.js
File metadata and controls
64 lines (62 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://www.dachhomeandbody.com",
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [
// Block all crawlers from private/admin areas
{
userAgent: "*",
disallow: ["/admin", "/account", "/checkout", "/auth", "/api", "/pay"],
},
// Allow everything else for all crawlers
{ userAgent: "*", allow: "/" },
// ── AI / LLM crawlers — explicitly allowed for GEO ──────────────────
// These bots power AI search (ChatGPT, Perplexity, Claude, Gemini)
// and need access to cite DACH Home & Body accurately.
{ userAgent: "GPTBot", allow: "/" }, // OpenAI / ChatGPT
{ userAgent: "ChatGPT-User", allow: "/" }, // ChatGPT browsing
{ userAgent: "anthropic-ai", allow: "/" }, // Anthropic / Claude
{ userAgent: "ClaudeBot", allow: "/" }, // Claude web search
{ userAgent: "Google-Extended", allow: "/" }, // Gemini + AI Overviews
{ userAgent: "PerplexityBot", allow: "/" }, // Perplexity AI
{ userAgent: "Meta-ExternalAgent", allow: "/" }, // Meta AI
{ userAgent: "Applebot-Extended", allow: "/" }, // Apple Intelligence
{ userAgent: "Cohere-ai", allow: "/" }, // Cohere
{ userAgent: "YouBot", allow: "/" }, // You.com AI
],
additionalSitemaps: [
"https://www.dachhomeandbody.com/server-sitemap.xml",
],
},
// Exclude private routes from the static sitemap
exclude: [
"/admin/*",
"/account/*",
"/checkout/*",
"/auth/*",
"/api/*",
"/pay/*",
"/test-link",
"/server-sitemap.xml",
],
changefreq: "weekly",
priority: 0.7,
transform: async (config, path) => {
if (path === "/") {
return { loc: path, changefreq: "daily", priority: 1.0, lastmod: new Date().toISOString() }
}
if (path === "/shop" || path === "/gift-box") {
return { loc: path, changefreq: "daily", priority: 0.9, lastmod: new Date().toISOString() }
}
if (path === "/about" || path === "/faq") {
return { loc: path, changefreq: "monthly", priority: 0.6, lastmod: new Date().toISOString() }
}
return {
loc: path,
changefreq: config.changefreq,
priority: config.priority,
lastmod: new Date().toISOString(),
}
},
}