OBJECTIVE: Timely HIV testing among recently HIV-infected gay men may enable earlier access to clinical care and changes in behaviour that will reduce onward transmission. We investigated the testing practices of men recently diagnosed with HIV to identify factors associated with recent testing. METHODS: In an online survey of men in Australia recently diagnosed with HIV, participants were asked about their HIV testing history, perceived impediments to testing prior to diagnosis, motivation for testing at the time of diagnosis and a range of demographic and behavioural characteristics. Descriptive statistics were used to compare those men who reported recent HIV testing with those men who had not tested for HIV in the 12 months before their diagnosis. RESULTS: Of 187 men who provided information about their testing history and social connectedness, 6.4% were previously untested for HIV, whereas 65.8% had last tested within the 12 months prior to their diagnosis. Factors associated with having tested more recently were being more socially engaged with other gay men (OR 1.34; 95% CI 1.10 to 1.63; p=0.003) and having greater optimism about HIV health (OR 1.13; 95% CI 1.00 to 1.27; p=0.047). In multivariate analysis, only level of social engagement with other gay men remained independently associated (adjusted OR 1.30; 95% CI 1.07 to 1.59; p=0.003). CONCLUSIONS: Gay community plays a key role in the response to HIV in Australia. Building a sense of community through programmes that support social engagement between gay men may support earlier and more frequent testing.