AbstractThe simultaneous extraction of intracellular DNA (iDNA) and extracellular DNA (eDNA) can help to separate the living in situ community (represented by iDNA) from background DNA that originated both from past communities and from allochthonous sources. As iDNA and eDNA extraction protocols require separating cells from the sample matrix, their DNA yields are generally lower than direct methods that lyse the cells within the sample matrix. We, therefore, tested different buffers with and without adding a detergent mix (DM) in the extraction protocol to improve the recovery of iDNA from surface and subsurface samples that covered a variety of terrestrial environments. The combination of a highly concentrated sodium phosphate buffer plus DM significantly improved iDNA recovery for almost all tested samples. Additionally, the combination of sodium phosphate and EDTA improved iDNA recovery in most of the samples and even allowed the successful extraction of iDNA from extremely low‐biomass iron‐bearing rock samples taken from the deep biosphere. Based on our results, we recommend using a protocol with sodium phosphate in combination with either a DM (NaP 300 mM + DM) or EDTA (NaP + EDTA 300 mM). Furthermore, for studies that rely on the eDNA pool, we recommend using buffers solely based on sodium phosphate because the addition of EDTA or a DM resulted in a decrease in eDNA for most of the tested samples. These improvements can help reduce community bias in environmental studies and contribute to better characterizations of both modern and past ecosystems.