  We reexamine sterile neutrino dark matter in gauged $U(1)_{B-L}$ model.
Improvements have been made by tracing and careful evaluation of the evolution
of the number densities of sterile neutrinos $N$ and extra neutral gauge bosons
$Z'$. As a result, the cosmologically-interesting gauge coupling of
$U(1)_{B-L}$ for freeze-in sterile neutrinos turns out to be smaller than the
values reported in the literature. This avoids the overproduction of $Z'$ so
that it is consistent with the big bang nucleosynthesis and the cosmic
microwave background constraints on the effective number of neutrino species.
Similarly, the free-streaming length constraints exclude a large parameter
space derived in previous studies. In addition to known freeze-in pair
production of $N$ from the standard model fermion pairs, we find the case that
$N$ is dominantly produced from a pair of $Z'$ at the temperature characterized
by the $B-L$ breaking scalar mass. Thus, the naive truncation of the
$U(1)_{B-L}$ scalar contribution made in the literature is not valid.
