Three experiments examined whether the design of virtual learning environments influences undergraduates’ enrollment intentions and anticipated success in introductory computer science courses. Changing the design of a virtual classroom – from one that conveys current computer science stereotypes to one that does not – significantly increased women’s interest and anticipated success in computer science. Effects occurred even when the learning material, gender of the professor and gender ratio of the classmates were identical, isolating the physical environment as a key determinant of women’s choices and expectations. Men’s interest and anticipated success were not similarly affected by the environmental changes. Statistical analyses indicated that gender disparities in interest and anticipated success in the stereotypically designed classroom were mediated by women’s lower sense of belonging in that environment. Changing the design of virtual learning environments may be a vehicle that universities can use to signal belonging to a wider net of students, and thus increase students’ likelihood of enrolling and succeeding in those classes.