There are many conditions that get confused with herpes so anyone in any doubt should consult their doctor or local specialist clinic.
Your doctor or clinic will examine the infected area and take a swab or blood test which will determine exactly what is causing the condition.
Be aware that your doctor may ask about your sex life, how many partners you have had, your use of condoms, etc.
They will also need to physically examine the infected areas which will include:-
Examination of the penis and scrotum, cervix and vagina. Your rectum and any discharges. Swabs will be taken of any infected areas.
You should visit your Doctor (or clinic) as soon as possible, while the signs and symptoms are still present.
Blood tests are generally used when no obvious symptoms are present and these are used to detect the presence of herpes antibodies. But there is a possibility that the virus will not show up in a blood test, and a positive result is not always indicative that a person has genital herpes.
After first exposure to herpes a person may take several weeks for the antibodies to develop and a blood test looking for these antibodies would not therefore detect them.