BACKGROUND: Determination of a patient’s sexual orientation is important to guide appropriate health care. We assessed how frequently sexual orientation is included in the health records of men attending general practice and factors associated with its recording. METHODS: Routine consultation data were extracted from seven Australian general practices in a 2-year period (2011-12) as part of a sexual health testing intervention for gay and bisexual men. We calculated the proportion of male patients with sexual orientation recorded and used logistic regression to determine patient, provider, clinic and community factors associated with recording. RESULTS: There were 12475 men who attended the clinics in the study period and sexual orientation was recorded for 42%, of whom 67% were identified as homosexual, 3% bisexual and 30% heterosexual. Recording ranged from 3% to 81% between clinics. Patient factors independently associated with recording of sexual orientation were: being HIV-positive [adjusted odds ratio (AOR) = 1.2, 95% CI: 1.1-1.4], previous sexually transmissible infection/HIV testing at the clinic (AOR = 1.8, 95% CI: 1.6-2.0), and >/=6 previous clinic visits (AOR =1 .1, 95% CI: 1.0-1.1). Provider, clinic and community factors independently associated with sexual orientation recording were: regularly attending a female GP (AOR = 1.3, 95% CI: 1.1-1.4), >/=4 previous consults with a particular GP (AOR = 1.4, 95% CI: 1.2-1.7), attending a clinic with a high caseload of gay/bisexual patients (AOR = 8.8, 95% CI: 1.6-48.1), and the patient residing in a community with >/=10% same-sex partner households (AOR = 1.2, 95% CI: 1.0-1.3). CONCLUSIONS: Sexual orientation was incomplete for more than half of male patients. Initiatives targeting both the patients and providers need to be considered to improve recording.