spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.83k stars 40.61k forks source link

Impossible to find up to date documentation on Google #32159

Closed mwisnicki closed 2 years ago

mwisnicki commented 2 years ago

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

philwebb commented 2 years ago

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

mwisnicki commented 2 years ago

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).

mwisnicki commented 2 years ago

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?

mwisnicki commented 2 years ago

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

mwisnicki commented 2 years ago

Ugghhh, you are already using this header so it's not helpful :(