Skip to Content
DocsSEOSEO Settings

SEO Settings

Control how your site appears in search results and when shared on social media. Ycode provides per-page and global SEO settings.

Per-Page SEO

Each page has its own SEO configuration:

SettingDescription
TitlePage title shown in search results and browser tabs. On dynamic pages, use the inline editor to insert CMS field variables
DescriptionMeta description for search snippets. On dynamic pages, use the inline editor to insert CMS field variables
ImageSocial sharing image. Choose an image from the file manager, or bind to a CMS image field on dynamic pages
NoindexWhen enabled, instructs search engines not to index the page

On dynamic pages, the title and description fields use an inline editor where you can insert CMS field variables directly. You can mix static text with field values (e.g., a field variable followed by ” | My Site”). Rich text fields are automatically converted to plain text for meta tags.

On multilingual sites, the SEO title, description, and static social preview image are all translatable per locale — localized URLs serve the translated metadata and fall back to the original where no translation exists.

Global SEO Settings

Configure site-wide defaults in project settings:

SettingDescription
Google Site VerificationMeta tag value for Google Search Console
Global Canonical URLBase URL for canonical links
GA Measurement IDGoogle Analytics 4 measurement ID
Favicon AssetFavicon for browser tabs
Web Clip AssetApple touch icon for home screen

Open Graph and Twitter Cards

Ycode generates Open Graph and Twitter Card metadata from your page settings. When you share a link, social platforms use:

  • Title
  • Description
  • Image

Canonical URLs and og:url are included when a site base URL is set, so social platforms and crawlers share the same absolute page URL.

Sitemap and Robots

Ycode automatically generates:

  • sitemap.xml — Lists all published pages for search engines
  • robots.txt — Instructs crawlers which paths to index or exclude

These files update when you publish or unpublish pages. Configure the sitemap in project settings under SEO → Sitemap: No sitemap, Ycode generated, or Custom XML.

A Ycode generated sitemap lists each localized URL as its own <url> entry, with that locale’s URL as <loc> and the full reciprocal hreflang set (including x-default as a child link, not a duplicate <loc>). Single-locale sites emit one entry per page with no alternates. Preview, error, and noindex pages are excluded. Dynamic CMS pages produce one entry per locale per collection item.

hreflang for Multilingual Sites

On sites with more than one published locale, Ycode emits <link rel="alternate" hreflang="..."> tags in the document <head> from the first HTML byte, so crawlers see language alternates without waiting for client scripts. Tags cover every published locale plus an x-default pointing at the default-locale URL.

Published pages also set <html lang> from the URL (/ uses the default locale, /fr/... uses fr) and <html dir="rtl"> or dir="ltr" from the language. These attributes are in the initial HTML, not applied after paint.

Both static pages and dynamic CMS pages get the right URLs — dynamic pages use the translated item slug per locale where one exists, and fall back to the default slug otherwise. Preview, error, and noindex pages are excluded. Hreflang, canonical, and og:url are omitted when no site base URL is set (Global Canonical URL or a primary domain). The same reciprocal cluster is reused by sitemap.xml, where each locale is also listed as its own <url> entry, so the two surfaces can’t drift.

If a CMS item has a translated slug, the default-locale slug under that locale prefix is not a second live URL. A request such as /de/my-english-slug permanently redirects (308) to /de/my-german-slug, matching the hreflang and canonical tags. Locales without a translated slug keep serving the default slug with no redirect.

Custom Code for Structured Data

Inject custom code in Header or Body for structured data (JSON-LD). Use this for:

  • Organization schema
  • Article schema
  • Product schema
  • Breadcrumb lists
  • Other schema.org types

Add your JSON-LD script in the custom code section. Field variables work in custom code so you can output item-specific structured data on dynamic pages.

Tip

Use unique titles and descriptions for each page. Avoid duplicate content by varying meta descriptions and using canonical URLs.

Last updated on