We will study evolution algebras A that are free modules of dimension two over domains. We start by making some general considerations about algebras over domains: They are sandwiched between a certain essential D-submodule and its scalar extension over the field of fractions of the domain. We introduce the notion of quasiperfect algebras and we characterize the perfect and quasiperfect evolution algebras in terms of the determinant of its structure matrix. We classify the two-dimensional perfect evolution algebras over domains parametrizing the isomorphism classes by a convenient moduli set.