The answer is yes, but it depends on the type of STD. For some STDs like chlamydia and gonorrhea, a urine test is very accurate. These infections are caused by bacteria, which means that they can easily be detected in urine samples. However, if you're worried about other types of STDs like herpes or syphilis, then a blood test may be required instead.