Search engines
The titles, addresses, canonical and language links, the sitemap and robots.txt of a WBengine site, and how to set them.
What a site tells search engines
| Signal | Where it comes from |
|---|---|
| Browser title and description | the fields of the page, translated per language. The title should have at most 60 characters and no site name, the template adds it. The description should have 120 to 160 characters. |
| Address | the link of the page: lowercase letters, digits and hyphens, with a trailing slash, for example /blog/spring-opening-hours/. |
| Canonical link | every page has one <link rel="canonical"> with the absolute address of the page in its own language. |
| Language links | hreflang links to every language of the page and x-default for the default language, with absolute addresses. |
/sitemap.xml |
the list of pages a visitor can open, once per language, with links to the other languages. |
/robots.txt |
what crawlers may visit, and where the sitemap is. |
The canonical link and the hreflang links use the same addresses, so a page and its translations point at each other consistently.
The public address
All absolute addresses are built from i18n.baseUrl, for example https://www.example.org. Set it in production. Without it the address is taken from the Host header of the request, which the visitor controls, and the page cache then keeps one copy per host. See Languages and the settings reference.
The sitemap
/sitemap.xml is generated for every request, so a page that was just published is there at once. It lists a page when a visitor can open it: the page is visible, does not need a login and has no hidden article. A language of a page is listed only when the page has a translation; the default language is always listed.
Only the address of the page itself is listed. A page that is not strict is a dynamic page: the box behind it receives the rest of the address as parameters and decides which are valid, so the framework cannot list those addresses and does not guess them. A strict page answers only its own address. See Boxes.
The date of a page (lastmod) is the date of the newest published article of the page, and is left out for a page without an article. changefreq and priority are never written, because crawlers ignore them. One file holds up to 50,000 addresses. The sitemap needs the public address; without it, it answers 404.
robots.txt
/robots.txt allows everything, lists the paths you name, and names the sitemap with its absolute address:
User-agent: *
Disallow: /login/
Sitemap: https://www.example.org/sitemap.xml
Settings
| Key | Effect |
|---|---|
seo.disallow |
a list of paths for robots.txt, each starting with / |
seo.sitemapExclude |
a list of page links to leave out of the sitemap, for example ["/login/"] |
seo.allowIndexing |
false closes the whole site to crawlers: robots.txt says Disallow: / and the sitemap answers 404. Use it on a staging copy. |
The skeleton leaves the login page out of the sitemap and names it in robots.txt.
For editors
Nothing needs to be done by hand. The assistant of the MCP server proposes the address, the browser title and the description for a new article, checks them before publishing, and warns when a language has no translated title or description for the page. Publishing the page puts it into the sitemap.
What it does not do
- It does not redirect an old address to a new one. Changing the address of a visible page breaks the old links, so the assistant asks for confirmation first.
- It has no setting to hide a single page from search engines while keeping it visible.
- It writes one sitemap file, not an index of several files, and no sitemap of images or news.
- It does not submit the sitemap to search engines. Name it in their webmaster tools.