inventivo Full-Service Webagentur
+49 (0)2536 319 55 28 (Mo–Fr 9:00–17:00 Uhr)
Dülmener Str. 12 C, 48163 Münster, NRW, Deutschland
The x-default tag in WPML (or Weglot) is missing – What now?

The x-default tag in WPML (or Weglot) is missing – What now?

In this article you will learn what the WPML Multilanguage Plugin for WordPress does and how you can add the x-default tag missing there to your multilingual website with WordPress and WPML (NEW!) or Weglot. So you can improve the onpage optimization of your WordPress website by making it easier for Google to index your website. Besides, you will get detailed information about hreflang tag and x-default tag and their usage. Should you be short on time, here’s directly to the solution.

What do the WPML Multilanguage Plugin and Weglot Plugin for WordPress do?

With the WPML Multilanguage Plugin and Weglot Plugin for WordPress you can easily implement and maintain your WordPress website in multiple languages. The plugins do not do the translation work for you, but still have a great benefit. This is especially evident in a clear input and maintenance of the different language texts.

WPML and Weglot also offer very useful functions, such as the insertion of certain additional information in the source text of your website. These make it easier for Google to index the languages of the page correctly. These include, among others, the hreflang tags (what this is all about, you can read further below). However, one important tag, the x-default tag is missing entirely. Why this is a problem and how you can still add the x-default tag to your WordPress site using WPML or WEGLOT, you can find out here.

What do the WPML and WEGLOT plugins not do?

The WPML Multilanguage plugin for WordPress unfortunately does not set the important hreflang x-default tag for multilingual pages in the current version. This is especially a problem when a user searches for content on your website in a language where the website is not available. To make it easier for the search engine (e.g. Google) to index correctly even in this case, the x-default hreflang tag is set. It specifies which page URL with which language should be used as default.

Now how can you add the missing x-default tag to WPML or WEGLOT?

1. Manually adding it in the theme code

manually add x-default tag
One possibility would be to insert the x-default tag manually into the code of your WordPress theme outside of WPML or WEGLOT. The sticking point here, however, is that depending on the theme you use, the integration would always be a rather individual matter. Another difficulty is that the URL and the language of the hreflang tags must be set dynamically per subpage. So deeper programming knowledge is needed to customize your own WordPress theme accordingly.

Another option would be to hire a programmer to do it, which would certainly be possible, but also not the most cost-effective option. So adding it manually is basically out of the question.

2. child’s play by plugin for WordPress insert

To solve the admittedly somewhat tricky task, I developed a special WordPress plugin that extends the hreflang functionality of the WPML Multilanguage plugin and WEGLOT Plugin. On of the plugins only needs to be installed and activated in your WordPress. No programming knowledge or configuration on your part is required. The x-default tag is automatically inserted into the source code of each page of your website. In combination with the WPML or WEGLOT hreflang functionality there is practically nothing to prevent a correct language indexing.

Purchase, download and install plugin:

You can download and install the plugin right after purchase. So immediately after the purchase you will receive an email with the license code and a download link. The installation is done as with other WordPress plugins, by uploading via FTP to the „/plugin“ directory of your WordPress installation or via the WordPress plugin installer. After the installation you can activate the plugin with the received license code.

One license includes 1 year access to the plugin updates. The x-default WordPress plugin is continuously maintained and developed by me. At the end of the year you can renew the license and secure access to future updates.

„hreflang x-default Tag for WPML and WEGLOT“-Plugin for WordPress

  • Developed specifically for multilingual WordPress websites with the WPML Multilanguage plugin
  • Adds to your WordPress website the hreflang x-default tag missing in WPML
  • Specify default language for users who do not speak any of the website languages provided
  • Upgrade onpage SEO of your website

Buy now

Premium Support

Should you need assistance with installation or for support inquiries feel free to email me at Returns are understandably excluded due to the digital nature of the product.

Further information about the hreflang tag

In the following you will find more information about the hreflang tag and x-default tag. You’ll learn what the tag does, how it is used in practice, and how the tag element is constructed.

Hreflang Tag – What does it mean?

If a website is available in multiple languages, then the hreflang link attribute (simplified as hreflang) should be used. The hreflang tag tells search engines which URLs to use for which languages and regions. Each subpage is assigned a specific language and region. The special code architecture makes it easier for Google to better capture and categorize the content. This ensures that for users from a specific country, Google only displays the pages that are relevant to them in the search results.

Good to know: By the way, the hreflang attribute was introduced by Google back in 2011 and has become more and more important with the increasing globalization and internationalization of companies. So you should have it on your mind when you seo-optimize your multilingual site.

Practical application

Google recommends tagging pages with the hreflang element in the following cases:

  • For fully translated, multilingual websites. That is, all pages of the base language (x-default) are translated into English and/or French (or more), for example
  • The vast majority of pages on a website are presented in a single language, but there are occasional pages that are translated into other languages. These may be, for example, certain performance pages that are also of international interest.
  • If the site uses the German language throughout, but the content is to be delineated regionally/content-wise for users from Germany, Switzerland and/or Austria. In this case, the correct markup using hreflang tag and x-default hreflang tag is particularly important to avoid duplicate content.

Construction of the href lang element and the x-default tag

< link rel="alternate" href="URL" hreflang="xx-XX" />
< link rel="alternate" href="URL" hreflang="x-default"/>
  • < link is the opening part of the link element. This indicates that the currently open page and the page specified in „href“ are related.
  • rel=“alternate“tells the search engine about the existence of an alternate language version of the currently opened page.
  • hreflang=“xx-XX“ indicates for which language the opened page should be indexed by search engines. The placeholder xx-XX used for explanatory purposes would then be replaced with de-DE for „German and Region Germany“.
  • href=“URL“ specifies the URL of the alternative language version of the opened page.
  • /> closes the previously opened link element

Using the hreflang annotation correctly

When using the alternate link, it is important to know that each page must contain both a backlink to itself with the language matching the current page and to each additional language version of the current page. The source code of a German-language subpage should therefore contain a hreflang tag with a link to the page itself and a further hreflang tag to each additional language version.

In addition, there is the aforementioned x-default hreflang specification, which you can have automatically inserted into your multilingual website with the above-mentioned plugin.

Furthermore, it is important to set the country codes in the tags correctly. The codes correspond to the ISO standard. For example, for the German language with region Germany you choose de-DE, for Austria then accordingly de-AT, for Switzerland de-CH, for Spain es-ES and so on.

Meaning of the hreflang tag for search engine optimization SEO

From the official side, Google does not mention the special tag as a ranking factor. Nevertheless, it can indirectly affect the SEO quality of your website through improved structuring.

By using it correctly, you actively reduce the risk of duplicate content, which would negatively affect the rating of your website by search engines.
Also, by integrating the code, you ensure that users actually find the content in the search results that is most relevant to them.

If a user then clicks on the search result and finds content that is interesting to him – also linguistically – he will most likely stay longer on the page. This leads to a lower bounce rate. This is high when many users click on a search result, only to return directly to the search results in Google via the back button in the browser.

This so-called user signal is then used by Google in the evaluation of your content. The fact that this will most likely not be positive probably needs no further explanation.

Finally, it should be pointed out that WPML is a very good – if not THE – plugin when it comes to implementing a multilingual website, despite the missing x-default tag. I use it successfully in numerous customer projects and could not really imagine implementing such a WordPress site without the plugin. Also, the correct integration of the hreflang and x-default tags is only a help for Google indexing. Google can optionally ignore the tags. Nevertheless, from my point of view it always makes sense to take measures that support improved SEO quality and user experience.