logo

Domino Navigation and the Search Engine

Until recently I couldn't have pointed you to a website I'd created with Domino (apart from the obvious of course). All my work has been on intranets. Then came Kwik Kopy AU and now I am working on a new version of ShowLED.com. With this transition comes a new way of thinking. There are things you can get away with only on an intranet - not the web.

With ShowLED, the migration is not so much about the need to move to Domino as it about moving away from Flash and framesets. With this site and most others its ranking on Google and other search engines is the paramount factor. To help improve this ranking it's important to design the site to be search engine friendly (SEF). Flash and framesets are not SEF.

But Domino sites, by default, aren't particularly easy for Google and the like to trawl. We can change this though and the tip I described yesterday is a step in the right direction.

The thing with Google is that it doesn't really like anything other than a good old-fashioned <a href="http://simple/">link</a>. No JavaScript onclicks for Google, thank you very much.

Take a link like the one below, which Domino produces at the view-level when you use @Command("Domino"; "ViewNextPage") in a hotspot, which is not SEF at all:

<a href="" onclick="return _doClick('80256F3200314563.c06de816f1bb457f80256f40004834f5/$Body/0.131A', this, null)"> Next » </a>

As far as Google is concerned this is a link to nothing. Not only does Google not like it but nor does any browser (read user!) with JavaScript turned off. Also, as Chris Toohey pointed out yesterday, a document-level @Command([NavigateNext]) in a hotspot creates a URL like this:

/db.nsf/ViewID/DocID?Navigate&To=Next

This one isn't really very SEF at all. This link works by using a redirect (HTTP Status code 302 returned). As far as I know, Google will not index a link that actually returns a different page. This is the basis behind the way Movable Type now prevents comment spammers on blogs from improving their PageRank, whereby URLs are masked by a separate call to a script that performs the redirect.

Now, I wouldn't stake my reputation on the validity of the above statements, but I do think that it's best to keep things simple and link to real pages, whilst keeping the links nice and simple. To do this you have to do things yourself. As I keep on saying - don't let Domino create your code; do as much of the HTML coding as you can on your own.

Furthermore, look again at the view navigation link that I included above. The _doClick() function is not SEF as it involves submitting the form, which Google spiders won't do.

All these nice and easy @Functions are fine on an intranet but next to useless when you want a search engine or disabled user to get about your website.

There is also talk of Google not liking Query_Strings and not indexing pages with &lots=of&parameters=included. How true this is is questionable and to a degree these parameters are something we just can't avoid in Domino sites.

What I'll talk about for a day or two is how to get round all this. Then I'll probably write an article to wrap it all together in one place. In doing all this I am going to have to over-come my irrational fear of WQO/WQS Agents. This site's NSF file doesn't have a single Agent in it! Time for that to change. Google doesn't index all the pages on this site and there's a good reason for it: some of the navigation uses JavaScript. I wrote this view navigation code to combat Domino's inability to recognise the beginning or end of a view. With some new code I've been working on I can now change all this, ready for the next release of the codestore template...

Comments

  1. Hi Jake...

    Oh Lord of the CodeStore.... You may smite me down after this reply, but have you ever done/thought of this!!!

    With regards to Domino and counting of documents in a View. Whenever i need to do this, i create a computed field called "Total" that extracts the "&total=" value from the Query String.

    If the query string does not contain this value, then i perform an "@DbColumn" or "@DbLookup" to return the list of the documents in the View. From this i use the "@Elements" to extract my view total.

    --- Total Field Value ---

    t1 := @Middle(Query_String; "&total="; "&");

    @If(t1 <> ""; @Return(t1); @Success);

    t2 := @DbColumn(""; ""; "View"; 1);

    @If(@IsError(t1); 0; @Elements(t1))

    --- Total Field Value ---

    Although this will fail for HUGE views, it works for most. Also, because the Total calculation is done once and then passed to the "Next" & "Prev" pages, it processes pretty quickly.

    --- Next Link ---

    View?OpenView&Start=21&Count=20&Total=100

    --- Next Link ---

    Using the Total field i can then calculate when to Show/Hide the "Previous" and "Next" links.

    --- Hide Previous Link ---

    Start = 0 | Start = ""

    --- Hide Previous Link ---

    --- Hide Next Link ---

    Start + Count >= Total

    --- Hide Next Link ---

    The Exact coding above may not be 100%, but the logic is sound!

    Anyway, just thought i'd throw my oar in!

    Later

    Patrick

    • avatar
    • Jake
    • Thu 4 Nov 2004 06:56

    Hi Patrick.

    As with most things Domino, there's many ways of doing it. Which is best? Who knows!

    I guess it depends on the kind of website you're working on and how many document you expect it to hold. In my case the site I am working on will probably never have 1000s and performance should be ok.

    • avatar
    • Blop
    • Thu 4 Nov 2004 08:39

    It's interesting that your observation about Google not liking 'JavaScript links' also ties in with accessibility.

    Until recently, like you, I had mainly been concerned with Intranets but now I'm working on public web sites that are concerned about accessibility. Such JavaScript links will not pass accessiblity tests.

    There are ways round it - see {Link}

    As with most things in life - it pays to keep things simple. The trouble with relying on the 'easy' option of Domino-supplied functionality is that you'll usually pay for it in the long run.

  2. Hi Jake, like the Kwik Kopy website - good looking yet simple and easy to navigate - the best kind of web design.

    One thing that made me chuckle, though, was the search facility. You can easily prove you built the site as searching for 'Jake Howlett' returns every page within the database! Good old Lotus, nice of them to give us an 'Exclude field from FT search' option!!!

    All the best!

  3. Hi Jake, I am having a problem with my website. Each weak I add it to google using {Link} and each week my site is thrown away after some days of being in google. And the indexer does not follow the links on page, but they are nice and not domino based. The site is a valid HTML 4.01. Could you take a look, what could be causing the problem?

  4. Hi Jake,

    I provide on every page a link on the bottom of the page:

    <div id="searchenginestarthere"><a href="fullurl/siteoverview">List of all pages</a></div>. With css I hide it: div#searchenginestarthere { display : none }.

    siteoverview is a PAGE (passthrou html) with an embedded view that lists the first 1000 documents. Nicely done with link & description so the spider has something to read. This way no page is further that 2 clicks away from the homepage (at least for the spider). If u like I can email the template.

    :-) stw

    • avatar
    • Jake
    • Fri 5 Nov 2004 03:44

    Girts. I'm not sure, but I would suggest adding:

    <meta http-equiv="content-language" content="lv">

    And likewise one for "en" on your translated page. This will help Google know what it's looking at.

    Stephan. Good idea. A "sitemap" is always a good way to get Google about your whole site.

  5. Thanks, I'll give it a try.

    • avatar
    • jjb
    • Wed 22 Mar 2006 01:12 AM

    Actually, google seems to now be indexing pages with the navigate&to=next urls' and that ain't good - we have a photographic database website, and somehow this means that when you click on some Google URLs, you get a different picture. If anyone has an idea how to redirect any incoming links from google that have navigate&to=next, please contact us through the website, or, if you are Jake, just email me.

    Thanks,

    Joel

    • avatar
    • Eric T
    • Fri 9 Feb 2007 10:57 AM

    I found a good example of Next and Previous functionality on Web search on your site on using simple computed text and @formula, using the query_string var to strip out the &Start var and replace it with the new URL. I see an example in this blog when I searched for this article. However, for some reason I get the Next to work the first time then it and Prev breaks in subsequent pages. The calculations are correct but the query_string seems not be be accessible. It's visible but the @leftback function seems to just blank it out corrupting the URL. I hope I am explaining myself well.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 4 Nov 2004

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content