Email for professionals and teams
add rules to prevent bots / crawlers
Hieu Nguyen (Jack)981326cc89f5
diff --git a/public/robots.txt b/public/robots.txtnew file mode 100644index 0000000..e2ef15b--- /dev/null+++ b/public/robots.txt@@ -0,0 +1,56 @@+User-agent: *+Disallow: /++User-agent: GPTBot+Disallow: /++User-agent: ChatGPT-User+Disallow: /++User-agent: OAI-SearchBot+Disallow: /++User-agent: ClaudeBot+Disallow: /++User-agent: Claude-SearchBot+Disallow: /++User-agent: Claude-User+Disallow: /++User-agent: Google-Extended+Disallow: /++User-agent: PerplexityBot+Disallow: /++User-agent: Perplexity-User+Disallow: /++User-agent: Bytespider+Disallow: /++User-agent: CCBot+Disallow: /++User-agent: Applebot-Extended+Disallow: /++User-agent: Amazonbot+Disallow: /++User-agent: Meta-ExternalAgent+Disallow: /++User-agent: Meta-ExternalFetcher+Disallow: /++User-agent: cohere-ai+Disallow: /++User-agent: AI2Bot+Disallow: /++User-agent: Diffbot+Disallow: /diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex 95b6d31..83e32b8 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -17,6 +17,20 @@ export const metadata: Metadata = {title: "Mailflare",description: "Multi-tenant email on Cloudflare",icons: { icon: "/api/branding/icon" },+ robots: {+ index: false,+ follow: false,+ noarchive: true,+ nosnippet: true,+ noimageindex: true,+ googleBot: {+ index: false,+ follow: false,+ noarchive: true,+ nosnippet: true,+ noimageindex: true,+ },+ },};export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {diff --git a/src/lib/security/headers.ts b/src/lib/security/headers.tsindex 8503b6d..f1913e0 100644--- a/src/lib/security/headers.ts+++ b/src/lib/security/headers.ts@@ -15,6 +15,7 @@ const csp = [export function getSecurityHeaders() {return [+ { key: "X-Robots-Tag", value: "noindex, nofollow, noarchive, nosnippet, noimageindex" },{ key: "Content-Security-Policy", value: csp },{ key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains" },{ key: "X-Content-Type-Options", value: "nosniff" },