<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Canonical on Nick Liu - Software Engineer</title><link>https://nick-liu.com/tags/canonical/</link><description>Recent content in Canonical on Nick Liu - Software Engineer</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>nickboy@users.noreply.github.com (Nick Liu)</managingEditor><webMaster>nickboy@users.noreply.github.com (Nick Liu)</webMaster><copyright>2026 Nick Liu</copyright><lastBuildDate>Sat, 11 Jul 2026 15:08:00 -0700</lastBuildDate><atom:link href="https://nick-liu.com/tags/canonical/index.xml" rel="self" type="application/rss+xml"/><item><title>My og:image URLs were broken for months. baseURL was the culprit.</title><link>https://nick-liu.com/posts/hugo-baseurl-dual-domain-canonical/</link><pubDate>Fri, 10 Jul 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/hugo-baseurl-dual-domain-canonical/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;
 
Paste one of my post links into a social preview and the card comes up with no image. The site itself renders fine, every page, every browser. The culprit was one character in `hugo.toml`: `baseURL = "/"`, which quietly turns every absolute URL the site emits into a relative one that only a browser can love.

&lt;/div&gt;

&lt;div class="tested-with" role="note"&gt;
 &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;
 &lt;span&gt;Tested with &lt;strong&gt;Hugo&lt;/strong&gt; &lt;code&gt;0.163.3&lt;/code&gt; · Blowfish 2.104&lt;/span&gt;
&lt;/div&gt;


&lt;h2 class="relative group"&gt;The symptom
 &lt;div id="the-symptom" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-symptom" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Share cards without images, that was the visible part. View source on any page and the metadata told the fuller story:&lt;/p&gt;</description></item></channel></rss>