I recently saw this tweet from Danielle Navarro about purchasing a domain to serve redirects to important links.
Possibly the most ridiculous thing I've spent $14/year on… buying djnavarro.link so that I can have my own personal link shortening service. Because djnavarro.link/scholar
— Danielle Navarro (@djnavarro) January 22, 2020
is a much nicer link to my Google Scholar profile and at least I can remember the damn thing
What a great idea! I’m pretty sure I will never memorize https://orcid.org/0000-0002-4648-654X, so it would be nice to have something easier to share. But, I don’t want to purchase a separate domain. 💸😭
Fear not, Rob J Hyndman notes that netlify has an easy way to setup redirects from your domain!
I think netlify can do something similar. See docs.netlify.com/routing/redirects
— Rob J Hyndman (@robjhyndman) January 22, 2020
Let’s see if I can get this to work! According to the netlify documentation, there are two ways to do redirects. One is fairly simple, but less powerful. I like simple, so I’ll go with that.
Here are the steps:
Create the following file:
static/_redirects
Fill it with urls like so:
# Redirect from yourdomain.com*, to url /orcid https://orcid.org/0000-0002-4648-654X /researchgate https://www.researchgate.net/profile/Eric_Bryant /twitter https://twitter.com/EricBryantPhD /github https://github.com/EricBryantPhD
Now, I can share my ORCID profile with ericbryantphd.com/orcid. 🥳
Of course, the downside of this is that it isn’t really clear that these links will redirect, which is not very transparent (i.e. kinda rude actually) as noted by Danielle:
I kind of like it. I really like the fact that there's some transparency to the process because it's a .link domain.
— Danielle Navarro (@djnavarro) January 22, 2020
Anything at djnavarro.net is my own website, anything at djnavarro.link goes elsewhere 🙂
For this use case though, I think it is fairly clear that e.g. ericbryantphd.com/orcid will take you to a page having something to do with ORCID, and e.g. ericbryantphd.com/github will take you to a page having something to do with GitHub, so I’m sticking to it!