Antiviral medications used to treat herpes, like valacyclovir or acyclovir, are not known to directly affect fertility. These drugs target the virus by suppressing its replication in the body but do not typically impact reproductive functions such as sperm production or ovulation. However, if you have concerns about how antiviral medication may influence your fertility specifically, it's best to consult with a healthcare provider who can provide personalized advice based on your individual health circumstances and needs.