Is Valtrex (valacyclovir) only for genital herpes?

No. It's also used for shingles, oral herpes (cold sores), and herpes that occurs in other areas, such as the anus or skin.