  Freeze-out or freeze-in during a period of early matter domination can yield
the correct dark matter abundance for small values of the velocity-averaged
annihilation cross section, $\langle \sigma_{\rm ann} v \rangle_{\rm f} < 3
\times 10^{-26}$ cm$^3$ s$^{-1}$. However, in a generic non-standard thermal
history, such a period is typically preceded by other phases. Here, we study
production of dark matter in a simple post-inflationary history where a
radiation-dominated phase after reheating is followed by an epoch of early
matter domination. Focusing on the freeze-in regime, we show that dark matter
production prior to early matter domination can dominate the relic abundance in
large parts of the parameter space, including weak scale dark matter masses,
and the allowed regions are highly dependent on the entire post-inflationary
history. Moreover, for a very broad range of $\langle \sigma_{\rm ann} v
\rangle_{\rm f}$ spanning over several decades, dark matter particles can start
in chemical equilibrium early on and decouple during early matter domination,
thereby rendering the relic abundance essentially independent of $\langle
\sigma_{\rm ann} v \rangle_{\rm f}$. We briefly discuss connections to
different observables as a possible means to test the elusive freeze-in
scenario in this case.
