Many rhizobia and host plants are highly specific and legumes can either attract rhizobia to root hairs directly by excretory compounds or by induction of nod gene activity in the bacteria.
Flavanoid compounds released by leguminous plants attract the bacteria and they colonize the soil in the vicinity of the root hair in response to the flavonoids. This is why rhizobium bacterium attaches to the roots of leguminous plants.
Although by far majority of plants able to form nitrogen-fixing root nodules are in the legume family, there are a few exceptions. Some non-leguminous plants are also able to form nitrogen-fixing nodules;
1. Parasponia, are also able to interact with rhizobia and form nitrogen-fixing nodules.
2. Actinorhizal plants such as alder and bayberry can also form nitrogen-fixing nodules, a symbiotic association with Frankia bacteria.