Knotted proteins, because of their ability to fold reversibly in the same topologically entangled conformation, are the object of an increasing number of experimental and theoretical studies. The aim of the present investigation is to assess, on the basis of presently available structural data, the extent to which knotted proteins are isolated instances in sequence or structure space, and to use comparative schemes to understand whether specific protein segments can be associated to the occurrence of a knot in the native state. A significant sequence homology is found among a sizeable group of knotted and unknotted proteins. In this family, knotted members occupy a primary sub-branch of the phylogenetic tree and differ from unknotted ones only by additional loop segments. These knot-promoting loops, whose virtual bridging eliminates the knot, are found in various types of knotted proteins. Valuable insight into how knots form, or are encoded, in proteins could be obtained by targeting these regions in future computational studies or excision experiments.