Gitit and SEO

From a Search Engine Optimisation perspective Gitit has several weakneses, the most important ones are to do with URL canonicalisation:

  • The same content can be reached at 2 different URLs: /Foo+Bar and /Foo%20Bar point to the same page. In addition to this, “+” is not the preffered word separator. I have written a plugin to help fix this. On it’s own the plugin will prevent the creation of URLs which contain the “%20” string. You can use this code instead of the normal gitit executable to redirect the URLs that contain “%20” to a version that contains “+” or “-”.

  • /Front+Page and /Front%20Page should redirect to /

Implementing a 301 redirect here makes it impossible to edit the front page. Instead I altered my page template so that pages no longer link to themselves in the title. This should mean there are no links to /front-page or similar.

  • URIs should not be case sensitive; at the moment, /front+page is not the same as /Front-Page. It should be pretty easy to write a plugin that prevents URIs with capital letters from being created. I think it is better to have URIs all in lowercase letters and this plugin will help with that. What is really required is a plugin to redirect URIs that contain captital letters to the lowercase version.

  • A non logged in user who requests a non existant page should get a 404 error. Currently they are asked if they want to create the page. This is fine for a logged in user but I think a non logged in user should be returned 404