Freeze-out or freeze-in during a period of early matter domination can yield the correct dark matter abundance for σannv f < 3 × 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 nonthermal 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 σannv 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 σannv f . We briefly discuss connections to different observables as a possible means to test the elusive freeze-in scenario in this case.