A topical composition for treating genital herpes includes dimethyl sulfoxide (DMSO), a diluent, and a quaternary ammonium compound. The topical composition may further contain a cannabinoid component, such as CBD, and/or a terpene and/or an essential oil. The topical composition may be in the form of a two-component composition in which a first topical composition includes dimethyl sulfoxide (DMSO), a diluent, and a quaternary ammonium compound and the second topical composition includes dimethyl sulfoxide (DMSO), a diluent, and a cannabinoid component.