Solid-state emitters are excellent candidates for developing integrated sources of single photons. Yet, phonons degrade the photon indistinguishability both through pure dephasing of the zerophonon line and through phonon-assisted emission. Here, we study theoretically and experimentally the indistinguishability of photons emitted by a semiconductor quantum dot in a microcavity as a function of temperature. We show that a large coupling to a high quality factor cavity can simultaneously reduces the effect of both phonon-induced sources of decoherence. It first limits the effect of pure dephasing on the zero phonon line with indistinguishabilities above 97% up to 18K. Moreover, it efficiently redirects the phonon sidebands into the zero-phonon line and brings the indistinguishability of the full emission spectrum from 87% (resp. 24%) without cavity effect to more than 99% (resp 76%) at 0 K (resp. 20 K). We provide guidelines for optimal cavity designs that further minimize the phonon-induced decoherence.Indistinguishable single photons are the building blocks of optical quantum computation protocols and quantum networks [1][2][3]. This has motivated great efforts to develop devices generating on-demand indistinguishable single photons, using solid-state emitters such as diamond color centres [4, 5], molecules [6] or semiconductor quantum dots (QDs) [7][8][9][10][11][12]. In QDs, understanding the extrinsic sources of decoherence such as spin and charge noise [13] has recently enabled impressive progresses in the performances of these sources [11,12]. Yet, acoustic phonons generally remain an intrinsic and limiting source of dephasing.Indeed acoustic phonons are responsible for two kinds of dephasing processes. First, acoustic phonons induce a rapid and partial decay of coherence [14][15][16]. This non-Markovian dephasing dynamics is the time-domain counterpart of the emitter spectrum consisting of a sharp zero-phonon line (ZPL) sitting on top of a broad phonon sideband (PSB) [17][18][19]. Second, acoustic phonons can assist virtual transitions towards higher energy levels, resulting in a Markovian pure dephasing of the ZPL [3]. Such effects impose two severe limitations to obtain indistinguishable photons: (i) to work at low temperatures, typically below 10 K for QDs and (ii) to use spectral postselection of the ZPL. Indeed, even at zero temperature, phonon emission processes result in the presence of a PSB on the low energy side, fundamentally limiting the indistinguishability. In practice, the indistinguishability has been measured to rapidly drop with temperature even with spectral selection [21], and without it remains further away from unity [22].In typical self-assembled QDs, the emission fraction into the ZPL, η ZPL , represents typically 90% of the emission at 4K, a fraction that rapidly drops with temperature. Moreover, the photons emitted in the PSB are essentially incoherent, due to their broadband nature with respect to the natural linewidth. In a Hong-Ou-Mandel (HOM) experiment, only the fraction η ...