Our website is a WordPress site with 2 different languages. Original is German and we use Weglot plugin for translation into English.
So the problem is that LinkedIn and Slack are picking the German metadata when sharing the English version.
Here're meta tags from https://www.example.com/en/
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<title>Title in English</title>
<meta name="description" content="description in english" />
<meta name="robots" content="noodp" />
<link rel="canonical" href="https://www.example.com/en/" />
<meta property="og:locale" content="en" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Title in English" />
<meta property="og:description" content="description in english" />
<meta property="og:url" content="https://www.example.com/en/" />
<meta property="og:site_name" content="Company" />
<meta property="og:image" content="https://www.example.com/wp-content/uploads/image.png" />
<meta property="og:image:width" content="1383" />
<meta property="og:image:height" content="1195" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:description" content="description in English" />
<meta name="twitter:title" content="Title in English" />
<meta name="twitter:image" content="https://www.example.com/wp-content/uploads/image.png" />
<script type='application/ld+json'>
{
"@context": "http:\/\/schema.org",
"@type": "WebSite",
"@id": "#website",
"url": "https:\/\/www.example.com\/",
"name": "Title in German",
"potentialAction": {
"@type": "SearchAction",
"target": "https:\/\/www.example.com\/?s={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script type='application/ld+json'>
{
"@context": "http:\/\/schema.org",
"@type": "Organization",
"url": "https:\/\/www.example.com\/",
"sameAs": [],
"@id": "#organization",
"name": "Company",
"logo": "https:\/\/www.example.com\/wp-content\/uploads\/2017\/01\/122.png"
}
</script>
<link rel="alternate" hreflang="de" href="https://www.example.ht/"/
<link rel="alternate" hreflang="en" href="https://www.example.ht/en/"/>
Every other possible network, incl. WhatsApp and iMessage are displaying correct language.
When I check https://www.linkedin.com/post-inspector/inspect, I see that it loads all the German meta.
In the URL information it says:
Fetched URL
https://www.example.com/en/
Canonical URLhttps://www.example.com/
URL redirect trail: 1: 200 Success
How do I debug this issue?
example.com
German andexample.com/en/
English? If so, why do you say one is the canonical of the other. Canonical tags should not be used across languages, only for duplicate pages. – Stephen Ostermiller♦ Dec 11 '18 at 16:14<link rel="canonical" href="https://www.example.com/en/"/>
I don't really know why LinkedIn shows original URL as canonical. Do you think that could be the reason? – Nikita Dec 11 '18 at 20:16hreflang
implementation? How that could be related? – Nikita Dec 11 '18 at 20:20hreflang
on the page, see my edit, please. – Nikita Dec 12 '18 at 10:11