The flame retardancy properties of cotton have been enhanced by exploiting an optimized multistep sol-gel process, consisting of a pre-hydrolysis step, followed by consecutive depositions of hybrid phosphorus-doped silica layers, using DPTS as precursor of the oxidic phases. Upon optimization, it has been demonstrated that just one phosphorus-doped silica layer is able to strongly reduce the heat release rate (-52 %), and the total smoke release (-56 %) and its rate (-62 %) with respect to the untreated fabric. In addition, the deposition of three layers allows achieving a higher flammability resistance if compared to a single layer, as indicated by the final residue after the flammability tests. As far as flammability resistance is concerned, the new coatings have shown a good durability when subjected up to five washing cycles according to ISO 6330 standard.