A commercial for an Icelandic phone company from a few years ago depicted a couple waking up after a one-night stand. They both pick up their smart phones. They both log into a family-tree website, Islendingabok. And that’s where things get awkward.

There are only 320,000 people who live in Iceland, and most are descended from a small clan of Celtic and Viking settlers. Thus, many Icelanders are distant (or close) relatives. Sometimes too close.

The desire to avoid unwitting incestuous pairings at one point even spawned an app, created by a group of engineering students at the University of Iceland, that allows its users to bump their phones together to determine whether they share a common ancestor. (Tag line: “Bump in the app before you bump in bed.")

Concerns about wading into the shallow end of the gene pool are just a small part of the Icelandic obsession with genealogy. As Iva Skoch explained in Global Post, when two Icelanders meet, the first question is usually, "Hverra manna ert bu?" (Who are your people?) Bookstores are stocked with thick volumes on the histories of Icelandic families.

For nearly a millennium, careful genealogical records had been kept in the Islendingabok, or “Book of Icelanders.” In 1997, Icelandic neurologist Kári Stefánsson created a web-based version of Islendingabok in order to offer his countrymen 24/7 access to their family trees. Along with developer Fridrik Skulason, he scoured census data, church records, and family archives in order to encompass what he claims is 95 percent of Icelanders who have lived within the past three centuries. It has since become one of the most popular sites in the country.

Olga Khazan/The Atlantic

“If you take the old Icelandic sagas, they all begin with page after page of genealogy,” Stefánsson told me. “It assures that the common man won't be forgotten.”