---
title: "PageWeave Documentation"
---

# SEO & Meta Tags

PageWeave generates the platform-level `<head>` elements automatically — `<meta charset>`, `<meta viewport>`, CSS, the canonical link, and the robots directives — from the page and website settings. You provide the content-specific metadata.

## Basic SEO Checklist

For every public page, set these elements:

| Element | Tool | Required |
|---------|------|----------|
| `<title>` | `create_page` / `update_page_settings` — `title` param | Yes |
| `<meta name="description">` | `update_component` with `kind: "html_head"` (global) or page `additional_html_head_html` | Yes |
| `<html lang>` | `create_website` / `update_website` (site) or `create_page` / `update_page_settings` (page) — `language` param | Yes |
| favicon | `update_component` with `kind: "html_head"` | Recommended |

## Favicon

Upload via `list_assets` and `upload_asset` (PNG/SVG/ICO, 32x32px minimum). Add via `update_component` with `kind: "html_head"`:

```html
<link rel="icon" type="image/png" href="/assets/<asset-id>/favicon.png">
```

For broader browser support, include multiple sizes:

```html
<link rel="icon" type="image/svg+xml" href="/assets/<asset-id>/favicon.svg">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/<asset-id>/favicon-32x32.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/<asset-id>/apple-touch-icon.png">
```

## Meta Description

Concise summary, 150-160 characters. Used in search result snippets.

```html
<meta name="description" content="Artisan bakery in Berlin. Fresh sourdough, croissants, and custom cakes. Open daily 7-22.">
```

## Open Graph (Facebook, LinkedIn, etc.)

```html
<meta property="og:title" content="Sweet Crumbs Bakery">
<meta property="og:description" content="Artisan bakery in Berlin. Fresh sourdough daily.">
<meta property="og:image" content="https://sweet-crumbs.pageweave.site/assets/<asset-id>/og-image.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="https://sweet-crumbs.pageweave.site/">
```

- `og:image` — 1200 x 630px JPEG/PNG recommended. Use `list_assets` and `upload_asset` to upload.
- `og:type` — `website` for pages, `article` for blog posts.

## Twitter Cards

```html
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Sweet Crumbs Bakery">
<meta name="twitter:description" content="Artisan bakery in Berlin.">
<meta name="twitter:image" content="https://sweet-crumbs.pageweave.site/assets/<asset-id>/og-image.jpg">
```

## Canonical URLs

You never write the canonical link. PageWeave emits `<link rel="canonical">` for every page from the canonical host and the served path — the platform subdomain, or the first serving custom hostname on Pro. Dev-environment and release-permalink hosts keep pointing at that primary host, so mirrors never compete with it.

A canonical link in your HTML is rejected on every write path. Shape the URL instead:

- Page paths — `update_page_settings(website: "...", path: "/about", new_path: "/about-us")`, and pass `old_path` on the create or update call so the old URL redirects.
- Template rows — the row's `slug` field drives the URL; placeholder defaults collapse the default-locale segment (`/blog/seo`, not `/blog/en/seo`).

## Robots Meta

PageWeave writes the robots meta tag and the `X-Robots-Tag` header. Indexability is a setting, not markup: `index`, `noindex`, `none`, `all`, `indexifembedded`, and `unavailable_after` — on `robots`, `googlebot`, or any crawler-specific meta — are rejected on every write path. Directives that do not decide indexing (`nofollow`, `nosnippet`, `max-snippet`, `noarchive`, …) stay allowed.

- `update_page_settings(website: "...", path: "/about", indexable: false)` is a persistent per-page opt-out. The page still renders for visitors, is excluded from the sitemap, and is omitted from the generated `/llms.txt`.
- The website-level `indexable` flag is the launch master switch: off keeps the whole site out of search and overrides every page. `create_website` requires it.
- A page inherits the website flag; `indexable: false` on the page is a persistent per-page opt-out. There is no draft or unpublished page state — pages are live immediately; use a dev environment to stage work.

## JSON-LD Structured Data

Help search engines understand your content:

```html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Sweet Crumbs",
  "description": "Artisan bakery in Berlin",
  "url": "https://sweet-crumbs.pageweave.site/",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Example Str. 1",
    "addressLocality": "Berlin",
    "postalCode": "10115",
    "addressCountry": "DE"
  }
}
</script>
```

## Website Indexing

Control whether search engines can index the entire site:

- **`indexable: true`** — Search engines may crawl and index. `create_website` requires the flag.
- **`indexable: false`** — Site is excluded from search results. PageWeave serves `X-Robots-Tag: noindex` on all pages.

Set via `update_website(website: "...", indexable: true)`. Set per-page via `update_page_settings(website: "...", path: "/about", indexable: false)`.

## Language & Hreflang

Set the default language at the website level:

```
update_website(website: "...", language: "de")
```

Override per-page:

```
create_page(website: "...", path: "/en/about", html_content: "...", language: "en")
```

For multilingual sites, add hreflang links via `update_component` with `kind: "html_head"`:

```html
<link rel="alternate" hreflang="de" href="https://example.com/de/">
<link rel="alternate" hreflang="en" href="https://example.com/en/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">
```

For the complete internationalization guide — URL strategy, language switchers, RTL support, per-locale SEO, and scalable translation patterns — see [Internationalization (i18n)](/i18n).

## Implementation

Use `update_component(website: "...", kind: "html_head", replacements: [{ old_content: "", new_content: "...", mode: "append" }])` to add meta tags. The platform appends your extras after its own generated elements.

**Do NOT add:** `<meta viewport>`, `<meta charset>` — these are handled automatically.

## Assets for Social Sharing

Upload Open Graph images via `list_assets`, `upload_asset`, or `request_upload_url`. Use the `relative_url` from the response in your `og:image` and `twitter:image` tags. The original URL auto-serves WebP/AVIF to browsers that support it.
