We present an analysis of the environmental dependence of bars and bulges in disc galaxies, using a volume-limited catalogue of 15 810 galaxies at z < 0.06 from the Sloan Digital Sky Survey with visual morphologies from the Galaxy Zoo 2 project. We find that the likelihood of having a bar, or bulge, in disc galaxies increases when the galaxies have redder (optical) colours and larger stellar masses, and observe a transition in the bar and bulge likelihoods at M*= 2 × 1010 M⊙, such that massive disc galaxies are more likely to host bars and bulges. In addition, while some barred and most bulge-dominated galaxies are on the ‘red sequence’ of the colour–magnitude diagram, we see a wider variety of colours for galaxies that host bars. We use galaxy clustering methods to demonstrate statistically significant environmental correlations of barred, and bulge-dominated, galaxies, from projected separations of 150 kpc h−1 to 3 Mpc h−1. These environmental correlations appear to be independent of each other: i.e. bulge-dominated disc galaxies exhibit a significant bar–environment correlation, and barred disc galaxies show a bulge–environment correlation. As a result of sparse sampling tests – our sample is nearly 20 times larger than those used previously – we argue that previous studies that did not detect a bar–environment correlation were likely inhibited by small number statistics. We demonstrate that approximately half of the bar–environment correlation can be explained by the fact that more massive dark matter haloes host redder disc galaxies, which are then more likely to have bars; this fraction is estimated to be 50 ± 10 per cent from a mock catalogue analysis and 60 ± 5 per cent from the data. Likewise, we show that the environmental dependence of stellar mass can only explain a smaller fraction (25 ± 10 per cent) of the bar–environment correlation. Therefore, a significant fraction of our observed environmental dependence of barred galaxies is not due to colour or stellar mass dependences, and hence must be due to another galaxy property, such as gas content, or to environmental influences. Finally, by analysing the projected clustering of barred and unbarred disc galaxies with halo occupation models, we argue that barred galaxies are in slightly higher mass haloes than unbarred ones, and some of them (approximately 25 per cent) are satellite galaxies in groups. We discuss the implications of our results on the effects of minor mergers and interactions on bar formation in disc galaxies.