diff --git a/app/(main)/admin/_tabs/settings.tsx b/app/(main)/admin/_tabs/settings.tsx index 63468cf7..cbd6b4c1 100644 --- a/app/(main)/admin/_tabs/settings.tsx +++ b/app/(main)/admin/_tabs/settings.tsx @@ -125,6 +125,7 @@ export function SettingsTab() { )} + diff --git a/app/(main)/layout.tsx b/app/(main)/layout.tsx index 05572ca3..65d4bba1 100644 --- a/app/(main)/layout.tsx +++ b/app/(main)/layout.tsx @@ -49,6 +49,11 @@ export async function generateMetadata(): Promise { return { title: process.env.APP_NAME || process.env.NEXT_PUBLIC_APP_NAME || "Webmail", description: t("meta_description"), + // A private webmail should not be indexed by search engines. This is opt-in + // via Settings -> General; the default (false) emits noindex/nofollow. + robots: configManager.get("searchEngineIndexing", false) + ? { index: true, follow: true } + : { index: false, follow: false }, appleWebApp: { capable: true, statusBarStyle: "black-translucent", diff --git a/lib/admin/types.ts b/lib/admin/types.ts index 4a89ba26..b2a7e8bd 100644 --- a/lib/admin/types.ts +++ b/lib/admin/types.ts @@ -136,6 +136,7 @@ export const CONFIG_ENV_MAP: Record