Absolutely! You can take Valtrex while breastfeeding, but of course, it's always important to keep your healthcare provider in the loop. Valtrex gets metabolized in your body to acyclovir, which passes into breast milk in very low amounts 1 (less than 1% of the typical dose given to infants), so it's not expected to cause any adverse effects in a breastfed baby.
Research has shown that Valtrex usage in breastfeeding mothers with concurrent herpes simplex type 2 and HIV infections reduced the presence of the HIV virus in breastmilk at six and 14 weeks postpartum, although the effect didn't seem to last beyond that point. On the other hand, a different study found that in HIV-positive mothers, Valtrex didn't reduce the shedding of cytomegalovirus (CMV) in breastmilk or prevent infants from getting CMV.
Taking Valtrex while breastfeeding doesn’t require any special precautions. But keep in mind that everyone's situation is different, so you should always follow the advice of your healthcare provider when starting any new medication.