Configure site URL, Open Graph defaults, robots, and per-page titles in messages.
SEO is split into two places:
config/seo.ts — global, non-translated settings (production URL, default share image, Twitter handles, robots, Google verification).config/messages/<locale>.json → Metadata — translated titles, descriptions, and keywords for each route.Next.js merges the locale layout metadata (defaults + metadataBase) with each page generateMetadata output. Canonical URLs and hreflang alternates are built from seo.siteUrl and your configured locales (en, es).
config/seo.ts| Field | Purpose |
|---|---|
siteUrl | Production origin without a trailing slash, e.g. https://yourdomain.com. Used for metadataBase, Open Graph url, and canonical links. |
defaultOgImage | Path under public/ for shared previews when a page does not set its own image (default: /hero_bg.png). |
openGraphType | Usually website. |
twitterCard | Usually summary_large_image. |
twitterSite / twitterCreator | Optional X (Twitter) handles, e.g. @YourBrand. |
robots | Default indexing rules (index / follow and googleBot). |
googleSiteVerification | Optional HTML tag token from Google Search Console. |
After changing siteUrl, redeploy so metadata points at the real domain.
Metadata in locale JSONUnder Metadata in config/messages/en.json and config/messages/es.json:
siteName — Application / OG site name.titleTemplate — Pattern for inner pages, e.g. %s \| Sifo. The home page uses defaultTitle as the full title without going through the template.defaultTitle, defaultDescription, defaultKeywords — Home page and fallbacks. Keywords are a comma-separated string.pages.<key>.title, pages.<key>.description, pages.<key>.keywords — Static routes such as about, games, knowledgebase, faq, etc.Edit the same keys in both en.json and es.json so each language ranks and shares correctly.
These take titles and descriptions from content, not from Metadata.pages:
/games/[slug]) — use the game’s name and description from config/games/*.json; Open Graph image uses the game backgroundImage./vps, /website, /dedicated) — use localized name and description from config/cloud/*.json.name, description, and image; article pages use the article frontmatter title and description, with og:type set to article.lib/seo-metadata.ts — builds alternates, Open Graph, and Twitter fields.lib/cloud-product-metadata.ts — cloud product pages.app/[locale]/layout.tsx — calls createRootLayoutMetadata for global defaults.If you add a new static route, register it in staticSeoPaths inside lib/seo-metadata.ts and add matching pages.<key> entries under Metadata in both locale files.