Permanent identifiers and vocabulary publication: and w3id

Some time ago, I wrote a tutorial with the common practices for publishing vocabularies/ontologies on the Web. In particular, the second step of the tutorial addressed the guidelines for describing how to set a stable URI for your vocabulary. The tutorial referred to, a popular service for creating permanent urls on the web. had been working for more than 15 years and was widely used by the community.

However, several months ago stopped registering new users. Then, only a couple of months ago the website stopped allowing registering or editing the permanent urls from a user. The official response is that there is a problem with the SOLR index, but I am afraid that the service is not reliable anymore. The current purl redirects work properly, but I have no clue on whether they intend to keep maintaining it in the future. It’s a bit sad, because it was a great infrastructure and service to the community.

Fortunately, other permanent identifier efforts have been hatched successfully by the community. In this post I am going to talk a little about, an effort launched by the W3C permanent identifier community group that has been adopted by a great part of the community (with more than 10K registered ids). W3id is supported by several companies, and although there is no official commitment from the W3C for maintenance, I think it is currently one of the best options for publishing resources with a permanent id on the web.

Differences with w3id is a bit geekier, but way more flexible and powerful when doing content negotiation. In fact, you don’t need to talk to your admin to do the content negotiation because you can do it yourself! Apart from that, the main difference between and w3id is that you don’t have a user interface to edit you purls. You do so through Github by editing there the .htaccess files.

How to use it: let’s imagine that I want to create a vocabulary for my domain. In my example, I will use the coil ontology, an extension of the videogame ontology for modeling a particular game. I have already created the ontology, and assigned it the URI: I have produced the documentation and saved the ontology file in both rdf/xml and TTL formats. In this particular case, I have chosen to store everything in one of my repositories in Github: So, how to set up the w3id for it?

  1. Go to the w3id repository and fork it. If you don’t have a Github account, you must create one before forking the repository.
  2. Create the folder structure you assigned in the URI of your ontology (I assume that you won’t be rewriting somebody else’s URI, as if that is the case, the admins will likely detect it). In my example, I created the folders “games/spec/” (see in repo)
  3. Create the .htaccess. In my case it can be seen in the following url: Note that I have included negotiation for three vocabularies in there.
  4. Push your changes to your local repository.
  5. Create a pull request to the perma-id repository.
  6. Wait until the admins accept your changes.
  7. You are done! If you want to add more w3id ids, just push them to your local copy and create additional pull requests.

Now every time somebody accesses the URL, it will redirect to where the htaccess file points to. In my case, for the documentation, for TTL and for rdf/xml. This works also if you want to do simple 302 redirections as well. W3id administrators are usually very fast to review and accept the changes (so far I haven’t had to wait more than a couple of hours before having everything reviewed). The whole process is perhaps slower than what used to be, but I really like the approach. And you can do negotiations that you were unable to achieve with

Http vs https: As a final comment, w3id uses https. If you publish something with http, it will be redirected to https. This may look as an unimportant detail, but is critical in some cases. For example, I have found that some applications cannot negotiate properly if they have to handle a redirect from http to https. An example is Protégé: if you try to load, the program will raise an error. Using https in you URI works fine with the latest version of the program (Protégé 5).


17 thoughts on “Permanent identifiers and vocabulary publication: and w3id

  1. How do you create ontology ‘’? I mean, I understand the steps you explain but at some point, I got lost. I want to create my own ontology from the very beginning. I think I missed the step you create your video game ontology. It would be great if you can help me with that. Thanks 😉

  2. That is so helpful 🙂 Thank you very much! Just one thing, I am currently working with Protege and it provides you a ‘local’ URI but I would like to use a real one. What do I need to obtain one from Github? Just upload my .owl or .rdf? or do I need something else? Sorry for bothering you

    1. Yes, you would need to upload your rdf to github. However, I think it would be better to create a w3id url in case you want to host your ontology somewhere else (as I mention in the post)

    1. Well, Github has a lot of support from the community. I think it is unlikely that they suddenly change their business model. Besides, w3id uses git, so I guess that in the event of that happening, they can also adopt another approach.

      The internet archive initiative is great. Thanks for posting the pointer. However, I haven’t still been able to access most of the purls I created in I hope they manage to add them soon…

  3. What did you do to get .htaccess working on GitHub Pages? I thought it didn’t worked. I tried following your tutorial and point to a github page but the redeferencing doesn’t work.

    I have also created the documentation using OnToology and pushed it here

    1. is an external service. Htaccess files do not work directly on GitHub pages. What step of the tutorial didn’t work? I haven’t seen any pull requests from you at OnToology is a separated service (which by the way, will do the publishing by default 😉 but in order to see the documentation, you need to accept the pull request done to your repository

      1. I was trying your old tutorial, the one that uses But I will create the pull request for this one.
        I will check the documentation for OnToology about the publishing as soon as their site goes live again (I’m getting 503 since yesterday).
        Actually I didn’t merge that pull request because I have been editing the old files at my other branch: which was created with the publishing option, but as long as I understood it doesn’t generate a permanent link, or does it?
        In any case coming by your tutorial was great, it’s super useful.

      2. Hello again, used to let you do some content negotiation, it would not be done in GitHub. I prefer w3id, as you can directly edit the htaccess.
        And yes, OnToology has a permanent publishing option. You can reserve w3ids with OnToology in the form of and they will be published permanently 🙂
        Thanks for your feedback on the tutorial!

      3. Hi, so I got this working but now I’m coming across the “unable to find valid certification path to requested target” that has been issued on the Protege and repos.
        I was wondering if you would consider updating the purl tutorial (now that it’s back up). I got quite lost as in how to set up the redirections, takes me correctly to the documentation but not to the owl file. The UI has change a bit and maybe that’s why I’m not understanding it.
        I have a deadline on the end of August and need to have this working, the stack overflow solutions didn’t work and I’m not sure if it will be fixed from w3id side.

      4. Not sure I will be able to spend time on this, as I will be traveling. A fast solution you can implement is set up the purl to point to your server where you do the negotiation yourself.
        Also, that Protege doesn’t open an ontology doesn’t mean it’s not correctly published. At the moment, the content negotiation in w3id works perfectly (you can check it out through a curl command).

      5. “Also, that Protege doesn’t open an ontology doesn’t mean it’s not correctly published. At the moment, the content negotiation in w3id works perfectly (you can check it out through a curl command).” You are right! I will try with another editor and document the curl results and leave it as it is. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s