Not all types of prostatitis are preventable.
You can prevent infections caused by STDs by practicing safer-sex behaviors.
References
Nickel JC. Inflammatory conditions of the male genitourinary tract: prostatitis and related conditions, orchitis, and epididymitis. In: Wein AJ, ed. Campbell-Walsh Urology. 9th ed. Philadelphia, Pa: Saunders Elsevier; 2007:chap 9.
Barry MJ, McNaughton-Collins M. Benign prostate disease and prostatitis. In: Goldman L, Ausiello D, eds. Cecil Medicine. 23rd ed. Philadelphia, Pa: Saunders Elsevier; 2007:chap 130.
Images
Review Date: 09/30/2009
Reviewed By: David C. Dugdale, III, MD, Professor of Medicine, Division of
General Medicine, Department of Medicine, University of Washington
School of Medicine; and Scott Miller, MD, Urologist in private
practice in Atlanta, GA. Also reviewed by David Zieve, MD, MHA,
Medical Director, A.D.A.M., Inc.
A.D.A.M., Inc. is accredited by URAC, also known as the American Accreditation HealthCare Commission (www.urac.org)

Which Foods Fight Prostate Cancer?
7 Ways an Enlarged Prostate Can Affect Urination
Natural Ways to Improve Prostate Health
What Is Prostatitis: Symptoms, Causes and Treatments