elm / package.elm-lang.org

website for browsing packages and exploring documentation
https://package.elm-lang.org/
BSD 3-Clause "New" or "Revised" License
293 stars 114 forks source link

Google search gives you old versions of packages #225

Closed norpan closed 7 years ago

norpan commented 7 years ago

Let's say I search Google (I know, I should be searching package.elm-lang.org directly) for "elm json". Right now, the first link in the results is http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Json-Decode but the latest version is http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode (currently 5.1.1).

At least there is a warning at the top, so that's good.

I believe this could be fixed by having a dynamic sitemap (pointed to by robots.txt) that lists all the "latest" pages with a high priority.

process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

evancz commented 7 years ago

I am already setting <link rel="canonical" href="..."> on the pages, but Google is not listening to that.

I'll look into providing a sitemap and see if it helps. Thanks for the suggestion!