Everything about Domino, PHP and other programming languages

SEO optimization for Lotus Domino websites

Ferdi Verlaan  October 28 2010 05:19:52 PM

We have launched our new website a few months ago, and had training by Alain Sadon, an
SEO Guru. After training my hands were itching to optimize our own website. Although the basic setup of our new website was good, there were a few optimalizations to be done. One of them was to implement a clean hierarchial path to the content.

Previous setup

I’ve already set up the website in the following manner: website.nsf/view/pagename
The view contained all the documents sorted by key and pagename was the actual key. It delivered a construction where a hierarchy was only two elements deep, for example:



If I wanted to add specs to the cool product (ex: website.nsf/products/coolproduct1/specs), the hierarchy in Domino couldn't go deeper. At least, that was my initial assumption. After some reading and some testing I’ve come up with another construction.

New setup

In the website form I already had a field ‘key’, which contains a userfriendly alias for the document, for example  ‘coolproduct1’. I’ve also setup a button where the user can select which parent the current document has. After selecting the parent, a field parentunid is filled with a unique id.  After that I’ve created a computed field called ‘urlkey_seo’ which contains the following formula:

punid := parentunid;
pkey := "";

@While(punid != "";

pkey :=  "/" + @GetDocField(punid;"key") + pkey;

punid := @GetDocField(punid;"parentunid")


@LowerCase(pkey + "/" + key)

In essence, the formula loops through all parents and gets the field ‘key’ and separates the entries with a slash. Then I created the SEO template view ‘vw-tpl-SEO’ with the alias ’SEO’ which is sorted on the first column, with the value of the field ‘urlkey_seo’. Below a subset of the hierarchy of our corporate website.

Image:SEO optimization for Lotus Domino websites

To be able to open a document by key with a slash in it you have to add ‘?OpenDocument’ after the key: website.nsf/products/coolproduct1/specs?OpenDocument where ‘products/coolproduct1/specs’ is the key. But this isn’t the SEO way to go. We need to remove the '?OpenDocument ' and remove the .nsf in the path. For that issue we have the Domino subsitution rules on the server.

Substitution rules

Launch your Domino Administrator, go to the tab ‘Configuration’, in the tree select ‘Web’ \ ‘Internet sites’. In the middle you will see the website documents created for your websites. There we make three rules to keep our entire website working (our website.nsf  is located in the root, but could be used with deeper directory paths as well). Create a new website rule from within your website document with ‘Web site’ > ‘Create rule’.

Image:SEO optimization for Lotus Domino websites

First rule:

Type: Substitution

Incoming URL pattern:  /website.nsf/*

Replacement pattern: /website.nsf/*

Second rule:

Type: Substitution

Incoming URL pattern:  /*

Replacement pattern: /website.nsf/*

Third rule:

Type: Substitution

Incoming URL pattern:  /*/*

Replacement pattern: /website.nsf/SEO/*/*?OpenDocument

The first rule is to ensure our old links, that we don’t get a lot of 404’s. The second rule is to redirect the homepage (/website.nsf), since the third rule will mess that up. The third rule is the most important, it will replace all incoming paths to the newly created SEO view and fills in the wildcards with our 'urlkey_seo' value. The need of the double /* is again for the homepage, Domino doesn’t see the difference for a / or a /* in the incoming url pattern, and you will get a exception error that /website.nsf/SEO/?OpenDocument is not valid.

Screenshot of our substitution rules:

Image:SEO optimization for Lotus Domino websites

Restart the http task on the server and our new hierarchy
www.domain.com/products/coolproduct1/specs is working. You can go as deep as you want because of the wildcard(s).


With the above rules in place a /$FILE/attachmentname.jpg will result in a error. Because of the substitution it will append ?OpenDocument, and will result in an error. Therefor setup a new website document (ex: images.domain.com) and link to that path for your images. It will also give you an small improvement on your ratings, since Google appreciates cookie-less domains for images.

To see the whole thing in action, take a look on our new corporate website (only Dutch at the moment) at

Next step is to optimize the default IBM blog for use with the above principle. We will post a new entry when we got that fixed.

Interesting links

Other interesting websites for SEO optimalization for Lotus Domino websites:

Codestore: http://www.codestore.net/store.nsf/unid/BLOG-20100617-0347

Domino Guru: http://www.dominoguru.com/pages/08112010083541.html

No Comments Found