Everything works fine, except, for some reason I noticed that Google does not index the original page. Google Search Console shows the reason: metadata noindex:
Running Hugo by typing the ‘hugo’ command instead of ‘hugo server‘ will give you a ‘public’ folder you can explore. Make sure to clear it first. Then analyze the actual output from Hugo. This might solve your mystery.
Everything is okay from the hugo perspective, it generates a proper alias, it works, all is good.
It is just Google does not index both the alias (client-side redirect page) AND the actual page. I am curious if others see the same, for example duckduckgo does index it correctly.
Your output is a redirect with a noindex instruction. Your canonical does not have a noindex instruction (if I am correct). This page should be indexed.
Search for “hidden gems of xterm” via Google right know, you will find zero links to my blog. I have just updated my blog with custom alias template that does not have that noindex and asked Google for a new visit. Tomorrow, my page should be back.
I will report back if it helps.
Edit: I can confirm that Google immediately picked up the mentioned page.
What exactly should not be indexed? There is literally no content on the alias page. What I mean is: what should I search for in order for such page to appear in results. There is the URL in the HTML title tag that is the only content I can see.
I am fully aware Google is not the only one and it is not my choice, but I was running my blog for several years without knowing Google users are unable to find any of my migrated content. I think it makes sense to optimize for Google in the first place.
I am still of the opinion the default template is wrong, even after all this time. I’ve been using my own alias template without the no-index without any problems whatsoever.
The key thing is shown on how Google treats it in the search console with and without the no-index. There are now two of us saying exactly the same thing.
I did the same research, yeah, it is unfortunately something that has not been officially documented.
As Jonathan said, Google Search Console is extremely confusing. So this is something that Google should probably look at. I would not hold my breath waiting for a fix, there is probably a reason why they do this.