Apologies if this is a wrong repo but I couldn't find the right one for docs.
It's very frustrating that google always returns outdated or even ancient documentation pages.
I couldn't find a combination of keywords that would result in current docs, even adding site:https://docs.spring.io/spring-boot/docs/current/ does not help (I believe site only considers domain).
I don't know much about SEO but if there is no better way I would suggest delisting all but current docs via robots.txt
Comment From: philwebb
Unfortunately we've had issues with SEO for a long time. Long-term we want to migrate to Antora which should help by providing a single URL for the docs. Spring Security has been prototyping things (see https://github.com/spring-projects/spring-security/issues/5835). We've got a more complicated documentation setup so it's going to take us a little time.
In the meantime, the best way to get to the docs is via https://spring.io/projects/spring-boot#learn
Comment From: mwisnicki
Antora looks nice but from what I see they also publish all versions under different urls - https://docs.antora.org/antora/latest/ vs https://docs.antora.org/antora/3.0/. I have no experience searching for docs on Antora-based sites but won't it have the same SEO issues as Spring Docs right now?
I guess at least it will be easy to switch to the right version thanks to the dropdown so that's a huge improvement (as long as the sections match across versions).
Comment From: mwisnicki
I did some digging and looks like they are setting <link rel="canonical" href=".../latest/..."> on all pages which according to what I found improves SEO.
Would it be hard to add this to existing docs?
Comment From: mwisnicki
Looks like it's possible to set it via HTTP header so perhaps that's easy enough?
https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls#rel-canonical-header-method
Comment From: mwisnicki
Ugghhh, you are already using this header so it's not helpful :(