Short answer
After anal sex, STI testing should match the role, body site, timing, symptoms, and HIV risk. Receptive anal sex can require rectal swabs for chlamydia and gonorrhea because urine testing does not check the rectum. Insertive anal sex may require urine or urethral testing, plus blood tests when HIV, syphilis, or hepatitis are relevant. If possible HIV exposure happened within 72 hours, ask urgently about HIV PEP. If anal sex is ongoing, ask whether PrEP, DoxyPEP, vaccines, and recurring STI screening belong in your prevention plan.
Start with what happened
| Situation | Testing question | Why it matters |
|---|---|---|
| Receptive anal sex | Ask about rectal chlamydia and gonorrhea NAATs, plus HIV, syphilis, and hepatitis questions as relevant. | Urine or genital-only testing can miss rectal infection. |
| Insertive anal sex | Ask about urine or urethral chlamydia and gonorrhea testing, plus HIV, syphilis, and hepatitis questions as relevant. | A rectal swab of you does not answer whether your urethra was exposed. |
| Condom broke or no condom was used | Ask whether HIV PEP is time-sensitive and which baseline STI tests are useful now. | CDC says PEP must be evaluated rapidly when care is sought within 72 hours after potential HIV exposure. |
| Rectal pain, discharge, bleeding, ulcers, or tenesmus | Ask about proctitis evaluation, rectal swabs, lesion testing, syphilis blood tests, and HIV testing. | Symptoms are diagnostic, not routine screening. |
| Anal sex is recurring | Ask about a regular testing schedule, PrEP, DoxyPEP, vaccines, condoms, and partner-notification plans. | A one-time test does not manage ongoing exposure. |
Rectal swabs are site-specific
CDC says STI tests may use blood, urine, or swabs from the vagina, throat, or rectum, and people who have had oral or anal sex should talk with a healthcare provider about throat and rectal testing options. A rectal swab is commonly used to test for rectal chlamydia and gonorrhea. It does not replace urine, vaginal, throat, lesion, or blood testing when other body sites or infections are part of the question.
HIV timing after anal sex
CDC describes anal sex as the highest-risk sexual activity for HIV transmission, with receptive anal sex riskier than insertive anal sex. HIV risk depends on many facts, including partner HIV status, viral load, condom use, PrEP use, ejaculation, bleeding, sores, and whether either partner has another STI. If there may have been HIV exposure in the past 72 hours, ask for urgent PEP evaluation. If anal sex is likely to recur, ask whether PrEP is appropriate and what HIV testing schedule goes with it.
Rectal symptoms should not wait for a routine screen
CDC proctitis guidance says people with acute proctitis symptoms should be evaluated for herpes simplex, gonorrhea, chlamydia, and syphilis; testing at other exposed sites may also be needed. Symptoms can include rectal pain, discharge, bleeding, ulcers, pain with bowel movements, or pain during anal sex. Severe symptoms with rectal chlamydia can raise concern for LGV, which is a clinician-managed diagnosis and treatment question.
Blood tests and vaccines
Blood tests may be part of the plan for HIV, syphilis, hepatitis B, or hepatitis C depending on exposure history and risk. CDC MSM guidance recommends hepatitis A and B vaccination for people for whom previous infection or vaccination cannot be documented, and screening for hepatitis B markers in MSM. Hepatitis C screening can also matter, especially in settings CDC describes as higher risk.
Prevention tools to ask about
- Condoms and lubricant for anal sex.
- HIV PEP if possible HIV exposure happened within 72 hours.
- HIV PrEP if anal sex exposure may recur.
- DoxyPEP for selected people under current CDC guidance.
- Hepatitis A, hepatitis B, and HPV vaccination when appropriate.
- Recurring STI screening if you or partners have multiple partners, anonymous partners, or ongoing exposure.
Questions to ask a clinic
- Based on receptive or insertive anal sex, which body sites should be tested?
- Do I need a rectal swab for chlamydia and gonorrhea?
- Do I also need urine, throat, vaginal, lesion, or blood testing?
- Is HIV PEP time-sensitive in this situation?
- Should I discuss HIV PrEP, DoxyPEP, hepatitis vaccination, HPV vaccination, or recurring screening?
- If I have rectal pain, discharge, bleeding, ulcers, or pain during anal sex, do I need an exam or same-day treatment decision?
- If results are negative but symptoms continue, what is the follow-up plan?
Related Lab Intel guides
For throat and rectal swabs, read the extragenital STI testing guide. For urgent exposure timing, see the condom break and exposure guide. For sexual assault or nonconsensual exposure, see the STI testing after sexual assault guide. For HIV timing, see the HIV testing window period guide and the PrEP vs PEP testing timelines guide. For rectal pain or discharge, see the STI testing for pelvic or testicular pain guide and the STI testing for discharge guide. For oral-anal exposure questions, see the STI testing after oral sex guide. For toys used rectally or shared between body sites, see the STI testing after sharing sex toys guide.