7 comments

[ 2.2 ms ] story [ 34.9 ms ] thread
the post HTML claims a wrong URL as the correct one and HN code "corrects" based on that (and I guess the localhost thing gets treated as a relative path due to not being a full domain):

      <link rel="canonical" href="http://localhost:4000/server-slower-than-a-laptop/">
Indeed, will fix it, thanks. Never happened before to me on HN before, but you're right - my site is incorrect - will need to change the way I generate it.
I fixed it but will HN pick up the change? The "edit" doesn't allow to change the URL. Is it ok to delete it and repost?
It occurs to me that this feature might be better implemented as an optional element in a preview, giving authors the opportunity to choose between their own URL and the canonical one before publishing.

or HN should double check that the canonical URL connects and leads to the same content (checking for multiple schemes and localhost should be done anyway) (downside - now every post eats up two HTTP request/response cycles, one to parse for the canonical url and another to validate it)

or HN should use the author's URL but present a canoncial URL elsewhere when displaying the thread. (downsides, slightly more noise in the layout, no actual quality check.)

seems someone else reposted in the mean time, for the future: yes, reposting if theres something obviously wrong with the first attempt is fine.