SR

SEO and multilingual sites

Why is SEO important for multilingual sites?

When you have a site in several languages, search engines (Google, Bing) need to understand:

  • Which languages are available for each page
  • Which version is for which audience (country/language)
  • Which is the main (canonical) version of the page
  • Where all language versions are in the sitemap

Without correct SEO configuration, search engines may:

  • Show the wrong language version in search results
  • Treat translations as duplicate content
  • Ignore some language versions

Emit does all of this automatically — you do not need to configure anything manually.


hreflang tags

What are hreflang tags?

hreflang tags are HTML links in the page's <head> section that tell search engines: "This page also exists in other languages, and here is where those versions are."

What do they look like?

Emit automatically generates hreflang tags for every page that has translations:

<link rel="alternate" hreflang="sr" href="https://yoursite.com/o-nama" />
<link rel="alternate" hreflang="en" href="https://yoursite.com/en/o-nama" />
<link rel="alternate" hreflang="x-default" href="https://yoursite.com/o-nama" />

What does each tag mean?

Tag Meaning
hreflang="sr" This page in Serbian is at this URL
hreflang="en" This page in English is at this URL
hreflang="x-default" The default version for all other languages (usually the primary language)

When are they generated?

hreflang tags are generated only when:

  • Multilingualism is on
  • The page has at least one translation
  • There are two or more available languages

If multilingualism is off or the page has no translations, hreflang tags are not shown.

Why do they matter for SEO?

Without hreflang With hreflang
Google may show the Serbian version to someone in England Google shows the English version to users in England
Translations may be treated as duplicate content Google understands they are the same pages in different languages
Lower ranking for all versions Each version ranks for its matching market

Canonical URLs

What is a canonical URL?

A canonical URL tells search engines: "This is the main URL of this page." It prevents duplicate-content problems.

How does Emit generate canonical URLs?

Every language version of a page gets its own canonical URL:

Version Canonical URL
Serbian (primary) https://yoursite.com/o-nama
English https://yoursite.com/en/o-nama
German https://yoursite.com/de/o-nama
<!-- On the Serbian version -->
<link rel="canonical" href="https://yoursite.com/o-nama" />

<!-- On the English version -->
<link rel="canonical" href="https://yoursite.com/en/o-nama" />

Every language version is canonical for itself — it does not point to another version. This is the correct behaviour according to Google's guidelines.


Open Graph locale tags

What are Open Graph locale tags?

These tags tell social networks (Facebook, LinkedIn, Twitter) which language the page content is in. This helps the content display correctly when someone shares a link.

What do they look like?

<!-- Current page language -->
<meta property="og:locale" content="sr_RS">

<!-- Available alternatives -->
<meta property="og:locale:alternate" content="en_GB">
<meta property="og:locale:alternate" content="de_DE">

Mapping languages to locale codes

Emit automatically converts simple language codes into full Open Graph locale codes:

Language Code OG Locale
Serbian sr sr_RS
English en en_GB
German de de_DE
French fr fr_FR
Spanish es es_ES
Italian it it_IT
Croatian hr hr_HR
Bosnian bs bs_BA
Turkish tr tr_TR
Russian ru ru_RU

When are they generated?

The same as hreflang tags — only when multilingualism is on and translations exist. The og:locale tag for the current language is always shown, while og:locale:alternate is shown only for extra languages.


Multilingual sitemap

What is a sitemap?

A sitemap (/sitemap.xml) is an XML file that tells search engines which pages exist on your site. Search engines use the sitemap to discover and index your pages.

How does Emit generate a multilingual sitemap?

When multilingualism is on, Emit adds xhtml:link elements to the sitemap for every page that has translations:

<url>
  <loc>https://yoursite.com/o-nama</loc>
  <xhtml:link rel="alternate" hreflang="sr"
    href="https://yoursite.com/o-nama" />
  <xhtml:link rel="alternate" hreflang="en"
    href="https://yoursite.com/en/o-nama" />
</url>

What does this mean for search engines?

Without a multilingual sitemap With a multilingual sitemap
The search engine sees only one version of the page The search engine sees all language versions
It must discover translations by itself It knows immediately where the translations are
Slower indexing of translations Faster indexing of all versions

When is xhtml:link added?

  • Multilingualism on + translation exists → xhtml:link is added
  • Multilingualism off → the sitemap contains no xhtml:link elements
  • The page has no translation → only the basic <loc> element without alternatives

Translation files in the sitemap

Emit automatically filters translation files (e.g. o-nama.en.json) out of the sitemap. Translated pages appear only as xhtml:link alternatives, not as separate URLs. This prevents duplication in the sitemap.


HTML lang attribute

Emit automatically sets the lang attribute on the <html> element of every page:

<!-- Serbian version -->
<html lang="sr">

<!-- English version -->
<html lang="en">

This helps:

  • Search engines understand the content language
  • Screen readers use the correct pronunciation
  • Text search use the correct rules

The language switcher on the site

What is the language switcher?

The language switcher is a dropdown menu that automatically appears in your site's navigation when multilingualism is on and you have 2 or more available languages.

What does it look like?

The switcher shows:

  • The flag of the current language
  • The name of the current language
  • Clicking it opens a dropdown with all available languages

How does it work?

  1. The visitor clicks the language switcher
  2. A list of available languages with flags is shown
  3. The visitor picks the desired language
  4. The site opens at the URL for that language — the primary language at the standard address, the others with a prefix (e.g. /en/o-nama)

The language depends solely on the URL — it is not remembered in a cookie. Every address always shows the same language (/o-nama is primary, /en/o-nama English), which matters both for sharing links and for caching/SEO.

When is it shown?

Condition Switcher visible?
Multilingualism off ❌
Multilingualism on, 1 language ❌
Multilingualism on, 2+ languages ✅

Where is it shown?

The language switcher is added automatically to the site navigation. You do not need to add it manually — Emit inserts it into the supported navigation templates.


Checking the SEO configuration

How to check hreflang tags

  1. Open your page in the browser
  2. Right-click → "View Page Source" (or Ctrl+U)
  3. Search for hreflang in the source code
  4. You should see <link rel="alternate" hreflang="..."> tags for every available language

How to check the sitemap

  1. Open https://yoursite.com/sitemap.xml in the browser
  2. Look for <xhtml:link> elements inside the <url> blocks
  3. Every page with a translation should have an xhtml:link for every language

Useful checking tools

Tool URL Purpose
Google Search Console search.google.com Check indexing and hreflang status
hreflang Tags Checker technicalseo.com/tools/hreflang Validate the hreflang implementation
XML Sitemap Validator xmlsitemapvalidator.com Check the sitemap's validity

Frequently asked questions

Do I have to add hreflang tags manually?

No. Emit automatically generates all hreflang tags. You do not need to change anything in the HTML manually.

Do I need a separate sitemap for every language?

No. Emit uses one sitemap that includes all language versions with xhtml:link elements. This is the approach recommended by Google.

How quickly does Google index translations?

Usually a few days to a week after you create the translation. You can speed up the process by:

  1. Opening Google Search Console
  2. Entering the URL of the translated page
  3. Clicking "Request Indexing"

Does multilingualism slow the site down?

No. hreflang tags and OG locale tags are small HTML elements that do not affect the site's loading speed. The sitemap is generated dynamically and cached for an hour.

What if I have no translation for a page?

Pages without a translation will have no hreflang tags for that language. Google will show only the versions that exist. Visitors who try to reach a non-existent version are redirected to the primary language.

This guide is part of the official knowledge base for Emit (emit.rs). Emit is a platform for building your own website, online store and booking system - with AI or by yourself. Free during the introductory period.

Start for free What is Emit →