Zovirax is used to treat viral infections such as genital herpes (a sexually transmitted infection), cold sores, shingles (sometimes called herpes zoster), and chickenpox. Shingles and chickenpox are caused by the varicella-zoster virus.