pkgdown site SEO

Since the release of pkgdown, the best documentation has often been package websites, not CRAN. If people go to the website rather than CRAN, that could be a 'win for users' as @maelle put it. But often the website is relatively low on search terms for packages, meaning little use of beautiful and useful websites :frowning:

Any suggestions on how to boost website prominence? I know this is an R forum not a search engine optimisation forum (!) but asking here as I suspect others may be wondering the same thing.

Reproducible example: click here and find the pkg website: https://www.google.com/search?q=stplanr

Context: https://github.com/ropensci/stplanr/issues/295#issuecomment-475133034

2 Likes

I dont understand the last part....

I have worked in SEO, and from that experience put in a suggestion which was implemented about pkgdown's default SEO practices, namely title tags that should reflect your function names, so I think it should be fairly well set up, especially as the auto-linking of functions will give you a good internal link structure. Other than that you may want to:

  1. Register a domain name and put your documentation on that domain
  2. Think about what key-phrases you want your documentation to appear for, and make sure that those phrases are in your vignette/article titles. Make sure you have content to cover popular phrases. Consider images and videos as they give you more coverage in the search results.
  3. Get external links to link to your documentation website - make sure to include your documentation website in your DESCRIPTION file, blogs etc.
  4. Register your website with Google search console, to see what phrases your website is appearing for, and flag up any issues with crawling

CRAN by itself is a very trusted so will usually appear higher than your own, but you should with above appear on front page. After that the most deciding factor on increasing to position #1 after your content is all sorted is people linking to your website. For evidence the googleAnalyticsR website (see what I did there :wink: ) appears #1 with CRAN at #2 and GitHub at #3 ( see search results: https://www.google.com/search?q=googleAnalyticsR ) which is perfect in my mind. By far the most referrals to the documentation comes through Google search.

A bonus with good SEO is that you can see people searching for error messages and the functions of the package via the Search Console query reports, which is useful info for prioritising documentation.

4 Likes

I don't have an answer, but I share this. I find that I usually search for "github pkgname" in the hopes that the github page will have a link to the pkgdown page. There has to be a better way!

It looks like you've added in the Github version, but I did notice that the current CRAN page for stplanr links to the github page, but not the pkgdown page. I assume that the CRAN domain is highly trusted by google, so maybe links from CRAN can help with search results.

I wonder if there are other places that package authors can control where the links go to direct more of them to pkgdown pages to help boost in search results.

Many thanks for a great reply. I will implement some of these suggestions in the coming month. Should be useful to other pkg devs who frequent this site, and the thousands of users who frequent Google searching for good documentation on software!

It should also be mentioned that discussion forums like this and stack overflow are useful to search-engines in determining search position. So making sure discussions of these packages always have links to the correct documentation pages will help search engines point to the best result.


On this, I was thinking about developing support on community.rstudio.com to "own" an r-package tag, so (in addition to the "watch" options you now have with tags) package creators, maintainers and others interested can stay on top of discussions related to it. (For example, we really should be pointing most Bioconductor and rOpenSci package questions to their respective -- and excellent -- support forums)

If we did that, it would make sense to have tag/package landing pages here, which point to the author's preferred documentation website.

But Other than a list of desirables (tag ownership, better monitoring options, tag landing page header text), I haven't started on this yet.

2 Likes