Build · Aesthetary Original

Multilingual sites search engines understand

You'll be able to build a site in two languages from one content file, with the tags search engines need to show the right one.

3 min video · captions on

In this skill

One content file, every language.

Give each language its own address

  1. Its own folder: /en/, /sq/
  2. Page names in its language
  3. lang on the html element
  4. Its own title and description
  5. A switch to the same page
The tags in the page source
1<link rel="canonical" href="…/sq/buka-e-sotme.html">
2<link rel="alternate" hreflang="en" href="…/en/bread.html">
3<link rel="alternate" hreflang="sq" href="…/sq/buka-e-sotme.html">
4<link rel="alternate" hreflang="x-default" href="…/en/bread.html">

One content file, one address per language, and tags that point both ways.

Transcript

Say the owner adds an Albanian version, for neighbors who speak it at home. Now every page exists twice. Search engines have to learn that the two are one page in two languages, and which one to show to whom. If they can't tell, they pick one, and an Albanian speaker lands on the English page.

Start with one content file. Every line of copy has a slot, and each slot holds both languages side by side, so the two versions can't quietly drift apart. The statuses from the translation lesson come along too: this description is still marked check. If someone adds a label in English and forgets the Albanian, the build stops and names the slot. Fill it in and build again: four pages, two in each language.

Each language gets its own address, so each version can be found, shared and indexed on its own. English lives under slash en, Albanian under slash s q, and the page names are in Albanian too. Don't swap languages on one address by guessing from the browser: a search engine would only ever see one of them. The page says which language it's in: s q, for Albanian. And it has its own title and description in that language, because those are what show up in search results. The language switch goes to the same page in the other language, not back to the home page. And the bakery's name and the loaf names are marked translate equals no, so a browser's automatic translation leaves them alone.

Now the tags that tie the versions together. The canonical points at this page, in its own language. Then there's one hreflang link for each version, including this one. And x-default names the page for anyone whose language isn't listed: here, English. The English page carries the same set, pointing back, because links that don't come back are ignored.

Here's the agent's first try, read by a small script that checks each page's head the way a search engine would. The Albanian page still says it's English, and its canonical points to the English page, which tells search engines to drop it. It uses A L, which is Albania's country code. The language code for Albanian is S Q. And there's no x-default, and the title and description are still in English. Built from the content file, all four pages pass.

One thing hasn't changed: this is still a review build, so every page says noindex. Language tags only count on pages search engines may index, so they start working at go-live. And the Albanian lines marked check and hold still wait for a fluent reader before anything is published.

One content file, one address per language, and tags that point both ways.