<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>LoupeKit - notes: seo</title>
    <link>https://loupekit.com/blog/</link>
    <atom:link href="https://loupekit.com/blog/seo/rss.xml" rel="self" type="application/rss+xml" />
    <description>Notes on seo, from the blog that https://loupekit.com/blog/rss.xml carries in full.</description>
    <language>en</language>
    <lastBuildDate>Tue, 24 Nov 2026 00:00:00 GMT</lastBuildDate>
    <item>
      <title>Why hreflang fails when one page forgets to link back</title>
      <link>https://loupekit.com/blog/hreflang-return-links/</link>
      <guid isPermaLink="true">https://loupekit.com/blog/hreflang-return-links/</guid>
      <pubDate>Tue, 24 Nov 2026 00:00:00 GMT</pubDate>
      <category>seo</category>
      <dc:creator>Ján Turský</dc:creator>
      <description>Every hreflang line is a claim that another page is a translation of this one. A search engine believes the claim only when the other page makes it back, and nothing on the page you are looking at can tell you whether it does. (seo, 5 min)</description>
      <content:encoded><![CDATA[<p><strong>Every <code class="font-mono text-[0.92em]">hreflang</code> line is a claim that another page is a translation of this one. <strong>A search engine believes the claim only when the other page makes it back</strong>, and nothing on the page you are looking at can tell you whether it does.</strong></p><p>The markup is short and it is the same on every page in the set. Each language version lists every version, itself included, with a code saying who it is for:</p><p><em>the same four lines, on every page in the set</em></p><pre><code>&lt;link rel=&quot;alternate&quot; hreflang=&quot;en-GB&quot; href=&quot;https://example.com/en-gb/contact/&quot;&gt;
&lt;link rel=&quot;alternate&quot; hreflang=&quot;de-DE&quot; href=&quot;https://example.com/de-de/kontakt/&quot;&gt;
&lt;link rel=&quot;alternate&quot; hreflang=&quot;fr-FR&quot; href=&quot;https://example.com/fr-fr/contact/&quot;&gt;
&lt;link rel=&quot;alternate&quot; hreflang=&quot;x-default&quot; href=&quot;https://example.com/contact/&quot;&gt;</code></pre><p>There are three places to declare it: these links in the head, an HTTP <code class="font-mono text-[0.92em]">Link</code> header (the only option for a PDF), or <code class="font-mono text-[0.92em]">xhtml:link</code> entries in the XML sitemap. Google reads all three. Pick one - three sources for one fact are three sources that will eventually disagree.</p><h2>A cluster is confirmed in pairs</h2><p>Google's documentation is direct about it: if two pages do not both point to each other, the annotations are ignored. The reason is easy to see once you think about who can write a <code class="font-mono text-[0.92em]">&lt;link&gt;</code> tag. Anybody can publish a page claiming yours as its German version. <strong>The return link is the authentication</strong> - your page agreeing that the relationship exists.</p><p>Pairwise confirmation sounds forgiving, and in principle it is: one bad pair costs one pair. In practice the tags are not written page by page. They are written by a template per locale, so a mistake in the German template is a mistake on every German page at once - and every pair that includes German fails. German loses its alternates, every other language loses German, and the set is a locale short everywhere.</p><blockquote><p><mark class="bg-accent-light text-text">The page that is wrong is not the page that shows the symptom.</mark> The English page lists German perfectly and German searchers still land on English. The bug is in the German template, which nobody on the English team opens.</p></blockquote><h2>The rules every member has to keep</h2><dl><dt>It lists itself</dt><dd>Each page names its own URL in the set, under its own code. Google's documentation asks for it in so many words, and it is the line a hand-written set forgets first, because it feels redundant.</dd><dt>It lists everyone else</dt><dd>The full set on every page, not just a link to the default. A set where each translation points only at English is a star: the translations never confirm one another, so French and German are not alternates of each other at all.</dd><dt>Fully qualified URLs</dt><dd>Protocol and host included. A relative <code class="font-mono text-[0.92em]">href</code> is the commonest way a set that looks right in the template comes out wrong on the page.</dd><dt>The canonical URL</dt><dd>Each <code class="font-mono text-[0.92em]">href</code> should be the address the target names as its own canonical. A URL that redirects, returns an error, or canonicalises somewhere else points at a page that is not indexed as itself - and a page that is not indexed cannot confirm anything.</dd><dt>One page per code</dt><dd>Two URLs both claiming <code class="font-mono text-[0.92em]">de-DE</code> is a contradiction. One URL under two codes - <code class="font-mono text-[0.92em]">de-DE</code> and <code class="font-mono text-[0.92em]">de-AT</code> pointing at the same page - is fine and common.</dd></dl><p>The canonical rule is the one that breaks sets nobody touched. A migration adds trailing slashes, the old URLs redirect, and every <code class="font-mono text-[0.92em]">hreflang</code> in the set now points at a redirect. <strong>Each page still looks correct on its own</strong>; none of them are confirmed.</p><h2>The codes are not the ones you think</h2><p>The value is a language from ISO 639-1, optionally followed by a region from ISO 3166-1 alpha-2, with a script subtag where it matters (<code class="font-mono text-[0.92em]">zh-Hant</code>). The language is required. A region on its own is not a valid value, and several region codes happen to be language codes for something else:</p><dl><dt>uk</dt><dd>Ukrainian. The United Kingdom is <code class="font-mono text-[0.92em]">GB</code>, so British English is <code class="font-mono text-[0.92em]">en-GB</code> - and <code class="font-mono text-[0.92em]">en-UK</code> names a region that does not exist.</dd><dt>se</dt><dd>Northern Sami. Swedish is <code class="font-mono text-[0.92em]">sv</code>; Sweden is the region <code class="font-mono text-[0.92em]">SE</code>.</dd><dt>jp, dk, cz</dt><dd>Not languages at all. Japanese is <code class="font-mono text-[0.92em]">ja</code>, Danish is <code class="font-mono text-[0.92em]">da</code>, Czech is <code class="font-mono text-[0.92em]">cs</code>; the two-letter codes people reach for are the countries.</dd><dt>en_GB</dt><dd>An underscore. Locale strings from server frameworks often look like this, and <code class="font-mono text-[0.92em]">hreflang</code> takes a hyphen.</dd></dl><p>None of these fail loudly. A value that is not a valid code is dropped, and a valid code for the wrong language is believed. <mark class="bg-accent-light text-text">The second is worse</mark>, because the set is confirmed and simply says the wrong thing.</p><h2>x-default is a fallback, not a language</h2><p><code class="font-mono text-[0.92em]">x-default</code> names the page for anybody whose language matches nothing in the set - usually a language picker, or the international version of the site. It is optional. A set without one still works; a visitor with an unlisted language gets whichever version the engine decides suits them.</p><p>It follows the same rules as every other member. The page it points at carries the full set, and if that page is also the English version it appears twice, once under <code class="font-mono text-[0.92em]">en</code> and once under <code class="font-mono text-[0.92em]">x-default</code>. <strong>What it must not be is inconsistent</strong>: present on half the templates and absent from the rest is two different answers to one question.</p><h2>Why one page cannot tell you</h2><p>Every rule about a page's own list is visible in its head: whether it lists itself, whether the codes are shaped like codes, whether <code class="font-mono text-[0.92em]">x-default</code> is there. The return-link rule is not, because it lives on other pages. Checking it means fetching each alternate and reading its links back, and for a set of eight languages that is 64 links that all have to agree.</p><p>LoupeKit's SEO tab splits it the same way. The Overview lists the page's alternates and checks what one page can show - its own entry, <code class="font-mono text-[0.92em]">x-default</code>, the shape of every code - and a button beside them fetches each listed alternate and reads its links back. An alternate on another host answers only if that host lets the page read it, and the reading says when one did not. The Sweep section walks the sitemap, reads a sample of same-origin pages, and lists the ones named as an alternate that do not point back, the ones missing themselves, and the ones missing an <code class="font-mono text-[0.92em]">x-default</code> the others carry.</p><blockquote><p>A finding about a return link is a finding about two pages. <mark class="bg-accent-light text-text">Fix the template that renders the silent one</mark>, not the page that happened to report it.</p></blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Why the share card shows the wrong image</title>
      <link>https://loupekit.com/blog/open-graph-card-wrong/</link>
      <guid isPermaLink="true">https://loupekit.com/blog/open-graph-card-wrong/</guid>
      <pubDate>Tue, 03 Nov 2026 00:00:00 GMT</pubDate>
      <category>seo</category>
      <dc:creator>Ján Turský</dc:creator>
      <description>The page looks right in the browser and the card looks wrong in the chat. That is because they are two different readers: one runs your scripts and fetches fresh, the other reads the raw HTML once and remembers it. (seo, 5 min)</description>
      <content:encoded><![CDATA[<p><strong>The page looks right in the browser and the card looks wrong in the chat. That is because they are <strong>two different readers</strong>: one runs your scripts and fetches fresh, the other reads the raw HTML once and <strong>remembers it</strong>.</strong></p><p>When a link is pasted into a chat, a post or a message, the platform does not render the page. It sends its own crawler, which requests the URL, reads the <code class="font-mono text-[0.92em]">&lt;head&gt;</code> for a handful of meta tags, fetches the image they point at, and stores the result. The card everybody sees afterwards is built from that stored copy.</p><p><em>the tags a card is built from</em></p><pre><code>&lt;meta property=&quot;og:title&quot; content=&quot;Why the share card shows the wrong image&quot;&gt;
&lt;meta property=&quot;og:description&quot; content=&quot;A preview is built by a crawler…&quot;&gt;
&lt;meta property=&quot;og:image&quot; content=&quot;https://example.com/cards/share.png&quot;&gt;
&lt;meta property=&quot;og:url&quot; content=&quot;https://example.com/blog/share-card/&quot;&gt;
&lt;meta name=&quot;twitter:card&quot; content=&quot;summary_large_image&quot;&gt;</code></pre><p>Every wrong card is one of those reads going differently from what the author expected. There are five usual ways.</p><h2>The crawler did not run your JavaScript</h2><p>This is the commonest by a distance. A single-page app sets its title and its Open Graph tags from a router or a head manager, <strong>after</strong> the bundle has loaded. A browser sees them. The share crawlers generally do not execute scripts, so they see whatever the server sent - typically the tags of the app shell, identical on every route.</p><blockquote><p><strong>Every page shares as the home page</strong> is the signature of this bug. <mark class="bg-accent-light text-text">The served HTML and the rendered DOM are two different documents</mark>, and a card is built from the first one.</p></blockquote><p>The fix is to put the tags in the HTML the server returns: server rendering, static generation, or a small edge function that writes the right <code class="font-mono text-[0.92em]">&lt;head&gt;</code> per route. Injecting them faster on the client does not help, because the crawler is not waiting for the client at all.</p><h2>The URL is not one the crawler can use</h2><dl><dt>A relative og:image</dt><dd>The protocol expects an absolute URL. <code class="font-mono text-[0.92em]">/cards/share.png</code> resolves in a browser and is simply dropped by several consumers, which then show no image or pick one from the page body.</dd><dt>An og:url pointing elsewhere</dt><dd>Some platforms treat <code class="font-mono text-[0.92em]">og:url</code> as the canonical object and read the card from <strong>that</strong> address. A template that sets it to the site root makes every article share as the home page, even when the article's own tags are correct.</dd><dt>An image the crawler is refused</dt><dd>A bot-blocking firewall, hotlink protection, an authenticated asset host, or a <code class="font-mono text-[0.92em]">robots.txt</code> rule over the image path. Some crawlers honour <code class="font-mono text-[0.92em]">robots.txt</code> for the image as well as the page. The browser is let through; the crawler gets a 403 and the card has no picture.</dd><dt>An image behind redirects</dt><dd>An <code class="font-mono text-[0.92em]">http</code> address that redirects to <code class="font-mono text-[0.92em]">https</code>, then to a CDN. Each redirect is another request the crawler may or may not follow, and an image behind two of them is an image some platforms never reach.</dd></dl><h2>The image is outside what the platform accepts</h2><p>Each platform has its own limits, they change, and an image outside them is dropped <strong>without an error anywhere you would see it</strong>. What holds across the major ones:</p><ul><li><strong>1200 by 630 is the safe size.</strong> It is close to the 1.91:1 ratio the large card layouts use, and large enough not to be upscaled on a high-density screen.</li><li><strong>Too small falls back to a thumbnail layout.</strong> Below a platform's minimum the card shrinks to a small square beside the text, or drops the image entirely.</li><li><strong>There is a byte ceiling</strong>, in single-digit megabytes. An uncompressed PNG screenshot can be over it.</li><li><strong>SVG is not accepted</strong> by the major platforms. Use PNG, JPEG or WebP, and serve it with an image content type rather than a generic one.</li></ul><p>Without an <code class="font-mono text-[0.92em]">og:image</code> at all, most platforms show a title-only card or guess from an image in the page, and the guess is whatever came first in the markup - often a logo or a tracking pixel. <strong>Social card</strong> builds a 1200 by 630 image from the page's own title and host, with the tags that point a share at it.</p><h2>The card is cached, and you fixed it after the first share</h2><p>A crawler fetches a URL once and keeps the result. Correct the tags, deploy, paste the link again, and the old card comes back - because the platform did not fetch anything. It had an answer already.</p><dl><dt>Ask for a fresh read</dt><dd>Facebook's Sharing Debugger and LinkedIn's Post Inspector both refetch a URL on request. That is the reliable route where it exists.</dd><dt>Change the URL</dt><dd>The cache is keyed on the address. A query string on the shared link, or a new filename for the image, is a different object to every platform and gets a fresh fetch.</dd><dt>Wait</dt><dd>Where neither is available the stored card expires on the platform's own schedule. Nothing on your side shortens it.</dd></dl><blockquote><p><strong>Get the card right before the first share, not after.</strong> The first fetch is the one that sticks, and it happens the moment somebody pastes the link - often the author, testing.</p></blockquote><h2>Tags that are present but ambiguous</h2><ul><li><strong>Duplicates.</strong> A theme and an SEO plugin each write an <code class="font-mono text-[0.92em]">og:image</code>. Platforms disagree about which one wins, so the same page can share differently in two places.</li><li><strong><code class="font-mono text-[0.92em]">name</code> instead of <code class="font-mono text-[0.92em]">property</code>.</strong> Open Graph is specified with the <code class="font-mono text-[0.92em]">property</code> attribute. Many consumers accept either; none is obliged to.</li><li><strong>No <code class="font-mono text-[0.92em]">twitter:card</code>.</strong> X needs it to choose the large image layout. The title, description and image it can take from the Open Graph tags.</li><li><strong>Tags outside the <code class="font-mono text-[0.92em]">&lt;head&gt;</code>.</strong> A meta tag written into the body by a script or a CMS block is in the document and outside the place a crawler reads.</li></ul><h2>Seeing what the crawler saw</h2><p>The test that settles most of these is to request the page the way a crawler does and read the raw response, not the DOM:</p><p><em>the served tags, and whether the image is reachable</em></p><pre><code>curl -sL -A 'facebookexternalhit/1.1' https://example.com/blog/share-card/ \
  | grep -iE '&lt;meta[^&gt;]+(og:|twitter:)'

curl -sIL -A 'facebookexternalhit/1.1' https://example.com/cards/share.png
# want: a 200, an image/* content type, a sane content-length</code></pre><p>If the first command prints nothing, or prints the home page's tags, the tags are being added by script. If the second ends in a 403, the crawler is being refused the image even though your browser is not.</p><p>From the page itself: <strong>Head order</strong> reads the tags in the order the parser meets them and names the missing and the duplicated, and <strong>Page source</strong> shows the DOM after the scripts have run. The SEO tab's rendering view puts the two side by side - what arrived in the HTML against what JavaScript added - which is the comparison every one of these bugs comes down to.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
