Let A be a commutative domain of characteristic 0 which is finitely generated over Z as a Z-algebra. Denote by A * the unit group of A and by K the algebraic closure of the quotient field K of A. We shall prove effective finiteness results for the elements of the setwhere F (X, Y ) is a non-constant polynomial with coefficients in A which is not divisible over K by any polynomial of the form X m Y n − α or X m − αY n , with m, n ∈ Z ≥0 , max(m, n) > 0, α ∈ K * . This result is a common generalization of effective results of Evertse and Győry (2013) on S-unit equations over finitely generated domains, of Bombieri and Gubler (2006) on the equation F (x, y) = 0 over S-units of number fields, and it is an effective version of Lang's general but ineffective theorem (1960) on this equation over finitely generated domains. The conditions that A is finitely generated and F is not divisible by any polynomial of the above type are essentially necessary.