Hello. Welcome to ask the doctor.
Herpes progenitalis is a viral infection caused by Human herpesvirus 2. It is transmitted by body to body contact , sexual contact or through fomites.
So either it is anal sex or not , transmission can occur from one person to another through skin to skin contact.
I hope I am able to solve your query.
These Q&A’s are for educational purposes and should not be relied upon as a substitute for medical advice you may receive from your physician. If you have a medical emergency, please call 911. These answers do not constitute or initiate a patient/doctor relationship.