Doctors test for STDs by combining a sexual-history risk assessment with targeted laboratory methods: nucleic acid amplification tests (NAATs) for chlamydia, gonorrhea, and trichomoniasis; blood serology for HIV, syphilis, and herpes; cultures or NAATs for genital ulcers and discharge; and self-collected swabs or urine, chosen by exposure site and window period. No single test screens for every infection, and the test a clinician orders depends on what was exposed, when, and to what.
The specimen-to-result pipeline
Every STD test begins with a specimen decision, and that decision is anatomic rather than symptomatic. A clinician swabs the site where the pathogen would colonize: the urethra, cervix, rectum, or pharynx. For chlamydia and gonorrhea, a first-catch urine sample captures urethral and cervical drainage, which is why urine NAATs work well for urogenital infection but miss rectal or throat infection entirely. This is the single most common reason a "negative STD test" is falsely reassuring.
NAATs amplify a pathogen-specific DNA or RNA sequence. Polymerase chain reaction and transcription-mediated amplification copy that sequence millions of times, so the test detects as few as a handful of organisms. That sensitivity explains why NAATs replaced culture for chlamydia and gonorrhea: culture required live organisms and careful transport, and it lost sensitivity after antibiotic exposure. Syphilis and HIV cannot be reliably detected this way in routine blood tests, because the diagnostic target is the immune response, not the organism itself.
Serology measures antibodies. For HIV, a fourth-generation antigen/antibody test detects both p24 antigen and HIV antibodies, narrowing the window between infection and a positive result. Syphilis serology uses a nontreponemal test such as RPR or VDRL as a screening and activity marker, confirmed by a treponemal test such as FTA-ABS or a treponemal immunoassay. Herpes is usually diagnosed by PCR of a swab from an active lesion, because blood antibody tests cannot tell a new infection from an old one and are not recommended for routine screening in most asymptomatic people.
Window periods and what each test can and cannot see
Timing determines whether a test can detect an infection at all. After exposure, there is a lag during which the pathogen is present but below the assay's detection limit or before antibodies appear. Testing too early produces a negative result that reflects the calendar, not the person.
| Infection | Primary test | Typical window before reliable detection |
|---|---|---|
| Chlamydia | NAAT (urine, swab) | About 1–2 weeks post-exposure |
| Gonorrhea | NAAT (urine, swab) | About 1–2 weeks post-exposure |
| Trichomoniasis | NAAT or wet mount | Days to about 2 weeks |
| HIV | 4th-generation antigen/antibody | Most detectable by 4–6 weeks; nearly all by 3 months |
| Syphilis | Nontreponemal + treponemal serology | Often 2–6 weeks after infection |
| Genital herpes | Lesion PCR | Requires an active lesion; positive within days of onset |
The ranges above are approximate and vary by assay and exposure. A clinician reconciles these thresholds by asking when the exposure occurred and repeating testing at the appropriate interval rather than treating one early negative as final.
Edge cases that change the algorithm
Sampling site is the most underappreciated variable. A person who reports receptive anal or oral sex needs rectal and pharyngeal swabs, because urine testing does not cover those sites. Clinicians who test only urine will miss a substantial share of extragenital gonorrhea and chlamydia.
Asymptomatic infection is the norm for chlamydia and gonorrhea, particularly in the rectum and pharynx. A person can carry and transmit these infections without any discharge or pain, so symptoms are a poor trigger for testing. This is why screening is driven by age, pregnancy status, and reported risk rather than by complaints.
Pregnancy adds a specific screening obligation. CDC guidance calls for chlamydia and gonorrhea screening in pregnant people at increased risk, HIV screening during pregnancy, and syphilis screening early in pregnancy with repeat testing in high-prevalence settings or when risk continues. Treating these infections prevents vertical transmission, which is the clinical reason the timing matters.
A counterintuitive detail: a positive syphilis treponemal test can remain positive for life even after successful treatment. Clinicians therefore follow the nontreponemal titer (RPR or VDRL) to judge whether treatment worked, not the treponemal result. A patient who sees a permanent "positive syphilis" flag on a chart may have been adequately treated years earlier.
Herpes serology is another trap. A positive IgG test indicates exposure at some point, not an active infection, and it cannot localize where the virus would reactivate. For most asymptomatic adults, professional societies advise against routine herpes serologic screening because the result creates anxiety without changing management.
Where testing goes wrong
False negatives are the dominant error, and they cluster around three causes: testing before the window period closes, sampling the wrong anatomic site, and taking the test after recent antibiotics. False positives are rarer but real, especially with low-prevalence screening and with nontreponemal syphilis tests that can react to pregnancy, autoimmune disease, and other infections.
The two-step syphilis algorithm exists to manage exactly this problem. A reactive nontreponemal screen is confirmed with a treponemal test; discordant results require a third test or clinical judgment. A single reactive RPR is not a diagnosis.
Self-collected swabs and at-home collection kits have widened access, but they inherit the same limits. A mail-in urine kit that tests only for chlamydia and gonorrhea cannot detect syphilis, HIV, trichomoniasis, or extragenital infection. Users should treat a negative home result as covering only what the kit actually measured.
A negative result before the window period closes does not rule out infection. Urine-only testing misses rectal and pharyngeal chlamydia and gonorrhea. A reactive syphilis screen is not a diagnosis until confirmed. Herpes IgG positivity does not prove an active or genital infection. Recent antibiotics can suppress a culture and produce a false negative. At-home kits test a narrow panel; read which infections are included.
What to do before and after testing
The practical actions depend on exposure timing and anatomy. A clinician choosing tests asks three questions: what sites were exposed, when, and what the person's prior testing history is. Patients can prepare by knowing those answers.
For a known or suspected exposure, the standard approach is to test at the appropriate window and retest if the first result is negative and concern persists. A common sequence is an initial panel, then a repeat HIV test at about 3 months after the exposure to close the window, with syphilis retesting at 6 weeks and 3 months when exposure timing is known. These intervals follow general CDC testing guidance and should be set by the clinician.
Screening intervals differ from diagnostic testing. Sexually active people under 25, and older people at increased risk, are generally screened annually for chlamydia and gonorrhea; people with new or multiple partners may be screened more often. HIV screening is recommended at least once for adults and more frequently for those at ongoing risk.
Treatment decisions follow confirmation, and clinicians treat partners of people with chlamydia, gonorrhea, syphilis, or trichomoniasis to prevent reinfection. A treated person should avoid sex until the course is complete and symptoms resolve, following the clinician's instruction. Retesting after treatment is recommended for chlamydia and gonorrhea at about 3 months because reinfection is common.
Limits of the evidence and the test
No test is perfect, and a negative result is a statement about a specimen at a moment in time. Sensitivity varies by assay, specimen type, and site; a pharyngeal NAAT may perform differently from a cervical swab even for the same organism. Specificity is generally high for NAATs but not absolute, and low-prevalence populations raise the relative share of false positives.
Cost and access shape what gets tested. In the United States, many public health clinics offer low-cost or free STD testing, while commercial panels can cost from about USD 30 for a single infection to several hundred dollars for a broad panel, depending on the laboratory and whether insurance covers it. Price varies enough that patients should confirm coverage before assuming a test is covered.
The deepest limitation is diagnostic humility. A clinician cannot test for an exposure they were not told about, and a patient cannot interpret a result without knowing which infections and which sites were covered. The most useful conversation before testing is not about symptoms but about specific acts, specific timing, and specific sites. That conversation, more than any single assay, determines whether the test answers the question the person actually has.