# SEO & AI Visibility

## SEO & AI Visibility

**Files:** `src/config/config.toml`, page frontmatter · **Skill level:** Beginner

Consultiz does the technical SEO for you: titles, descriptions, canonical links, language alternates, Open Graph tags, structured data, a sitemap, `robots.txt`, a blog RSS feed per language, and optional files for AI tools. Your job is to set your address and write good titles and descriptions.

### First, Set Your Address
```toml
[site]
  baseUrl = "https://www.example.com"   # ships empty
```

Canonical links, Open Graph URLs, the sitemap and its line in `robots.txt`, the RSS feeds, `llms.txt`, and structured data all use it. While it is empty:

- `npm run build` ends with a yellow `[site]` warning
- **no sitemap is built**
- canonical links, feed links, and `llms.txt` links point to the build host instead of your domain

Don't deploy while you see that warning. Restart `npm run dev` after you change `baseUrl`.

A `SITE_URL` environment variable on the build takes priority over `baseUrl`, for example `SITE_URL=https://www.example.com npm run build`, or a variable in your host's settings.

### Titles And Descriptions
Every page and entry accepts these frontmatter fields (`src/content/_file_format.md` explains each one):

```yaml
---
title: "Pricing Plan"                    # shown on the page
metaTitle: "Advisory plans and fees"     # search result title (optional)
description: "..."                       # page summary
metaDescription: "Compare advisory plans for..."   # search result description, 140–160 characters (optional)
image: "/images/contact/breadcrumb-bg6.webp"        # social preview image (optional)
canonical: ""                            # only if the page is a copy of another URL
robots: ""                               # for example "noindex, nofollow"
keywords: ["advisory", "tax planning"]
---
```

Titles get your tagline added ("Pricing Plan - Business Consulting & Advisory"), from `[site] tagline` or, when that is empty, `common.tagline` in the language's i18n file. `disableTagline: true` turns it off for a page. Site-wide defaults are in `[site]` and `[seo]`.

### Language Alternates
With more than one language enabled, every page lists its other language versions (`hreflang`) and an `x-default`, so search engines show visitors the right language. Keep the same file name in every language for this to work.

### Sitemap And Robots
- `/sitemap-index.xml` lists every page, once `baseUrl` is set. Leave a page out with `excludeFromSitemap: true`, or whole folders with `[seo.sitemap] exclude`. Draft pages and pages marked `noindex` are left out automatically.
- `/robots.txt` is built from `[seo.robotsTxt]`. It allows everything and points to the sitemap; add paths crawlers must skip to `disallow`, for example `["/landing/"]`.

### Structured Data
Every page carries structured data (JSON-LD) that describes it as a `WebPage`, part of your `WebSite`, published by your `Organization`. It is built from `[site]`, `[seo] author`, your logo, and the enabled links in `src/config/social.json`, so there is nothing else to fill in. After launch, check a page with Google's [Rich Results Test](https://search.google.com/test/rich-results).

### Social Preview Images
```toml
[opengraph]
  image       = "/images/og-image.jpg"   # public/images/og-image.jpg
  twitter     = ""                       # your X (Twitter) handle
  twitterCard = "summary_large_image"
```

A page with its own `image` uses it; others use `[opengraph] image`. Replace `public/images/og-image.jpg` with a 1200×630 image of your brand.

### RSS Feeds
`/blog/rss.xml` lists your published blog posts, one feed per language (`/fr/blog/rss.xml`). Every page links to the feed of its language in the `<head>`, so feed readers find it. Feed links are only correct once `baseUrl` is set.

### AI Tools: llms.txt And Markdown Copies
```toml
[seo.ai]
  llmsTxt       = true   # /llms.txt (an index of the site) and /llms-full.txt (every page's text)
  markdownPages = true   # a Markdown copy of posts, solutions, industries, and more at <page>.md
```

- `/llms.txt` follows a proposed convention: a Markdown map of your site that some AI tools and coding agents can read. `/llms-full.txt` holds the text of every page. Each language gets its own (`/fr/llms.txt`).
- With `markdownPages`, a page such as `/blog/gap-between-strategy-execution/` is also available as `/blog/gap-between-strategy-execution.md`. Copies are built for blog posts, solutions, industries, portfolio projects, roles, people profiles, the FAQ, and the text pages in `src/content/pages/` (such as the legal pages). Case studies are listed in `llms.txt` without a copy. A page with a copy links to it in its `<head>`.
- Leave a page out of all of these with `excludeFromAi: true`. Drafts and pages marked `noindex` are left out automatically.

Search engines don't document using these files, so treat them as a convenience for tools that look for them, not as an SEO setting. Set both to `false` if you don't want them.

<Aside type="note">
  The links inside these files are absolute, so set `baseUrl` before you
  deploy. Without it they point to `localhost`.
</Aside>