You don't have to avoid food or anything else before an STD screening. But there's one exception: If you need to give a urine sample, you'll want to avoid peeing for 2 hours leading up to the “deposit.” “During these urine tests, we're looking for DNA of the STD organism,” Ghanem says.