This invention provides compositions and methods to treat, prevent, and diagnose viral infections. The methods provided herein involve administering polypeptides of the invention to a subject in need thereof. The viral infections can be caused by a coronavirus such as SARS-CoV-1, SARS-CoV-2 or a variant thereof. It is contemplated that the polypeptide can be further linked to a compound, wherein the compound extends the serum half-life of the polypeptide.