Let G = (V, E) be a graph. A set S ⊆ V is a dominating set of G if every vertex in V is either in S or is adjacent to a vertex in S. The domination number of G is the minimum cardinality among the dominating sets of G. The main object of this article is to study and characterize the dominating sets of the zero-divisor graphs and ideal-based zero-divisor graph of a commutative ring R.