After forming a source/drain contact including a source/drain contact liner and a source/drain contact conductor surrounded by the source/drain contact liner to contact one of source/drain regions formed on opposite sides of a functional gate structure, vertical portions of the source/drain contact liner are recessed partially or completely to provide a cavity between the functional gate structure and the source/drain contact conductor. An etch resistant layer is deposited over the functional gate structure, each source/drain contact and each cavity to pinch off each cavity, thus forming an airgap between the functional gate structure and each source/drain contact.