DESCRIPTION URL trailing slashes

I use GitHub Pages and pkgdown for package docs. I added both github.com/user/repo and user.github.io/repo URLs to DESCRIPTION. However, R CMD check gives me the following notes (on some platforms):

Found the following (possibly) invalid URLs:
  URL: https://user.github.io/repo (moved to https://user.github.io/repo/)
    From: DESCRIPTION
    Status: 200
    Message: OK

In _pkgdown.yml, I have the URL specified without a slash. That is the only place that I am aware of where it may be adjusted.

Curiously, while I see this alert for the github.io URL, I don't get it for the github.com version. The URL works with and without the trailing slash. I was going to ignore it, but it was specifically mentioned when I submitted to CRAN recently. This is a little irrational, but I really don't want to have one URL with and the other without. I see a lot of other packages without a trailing slash which makes me wonder I can resolve this. Is there a good solution?

This reminded me of https://github.com/r-lib/downlit/pull/45 where I first read that "GitHub Pages started to redirect URLs".

1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.

It says "GitHub Pages started to redirect URLs of the form https://r-prof.github.io/procmaps to https://r-prof.github.io/procmaps/", so it seems like this is a new behavior.

1 Like