3 ms·
Strange. HN seems to automatically change the URL when I post it. This is the correct one https://kk.org/thetechnium/class-1-class-2-problems/ https://kk.org/t
by imartin2k 5y ago
Strange. HN seems to automatically change the URL when I post it.
This is the correct one https://kk.org/thetechnium/class-1-class-2-problems/ https://kk.org/thetechnium/class-1-class-2-problems/
But every time I try to post it, it changes automatically to kk.org once posted.
- peey 5y agolooks like a class 1 problem
- peey 5y agoYou're right! Even I tried to post it. This is what I observed: 1. After posting, I'm redirect to https://news.ycombinator.com/newest https://news.ycombinator.com/newest where the link works 2. I click to open the discussion, now on this page link no longer works 3. Going back to /newest, the link no longer works!
- deleted 5y ago[deleted]
- Jtsummers 5y agoHN tries to use canonical addresses. In the page source two canonical addresses are provided, the first is: <link itemprop="url" rel="canonical" href="http://kk.org"> And the second is the correct one: <link rel='canonical' href='https://kk.org/thetechnium/class-1-class-2-problems/' /> I'm imagining HN takes the first, always, and doesn't use any extra logic to try and discern (when there are multiple) which should be used.
- dang 5y agoHmm that's a new one. Anyone know how to figure out which canonical URL should be used?
- pvg 5y agothere's some useful stuff that pops up if you google 'itemprop' and 'canonical' but the rel-and-itemprop-at-once thing seems to be out of spec https://html.spec.whatwg.org/multipage/semantics.html#the-link-element:names:-the-itemprop-attribute https://html.spec.whatwg.org/multipage/semantics.html#the-li... Doesn't really help too much with which one is the url to use but the link rel one is more righteous.
- imartin2k 5y agoI emailed the HN team and asked if they can fix it manually, since this submission now unexpectedly ended up on the frontpage.
- dang 5y agoFixed now. Sorry. Thanks all!
- ssss11 5y agoWow that seems odd!