Immigrant viability is a major determinant of the realized rate of gene flow across populations. For social organisms, the social context in which immigrants disperse across contrasting environments may have important implications for their viability post dispersal. Here, we use social spiders, which vary in individual personality as well as the group personality compositions across sites, to test if the strength of selection against immigrants (i.e., mortality rates) differs depending on whether spiders are transplanted i) as individuals and remain alone, ii) join preexisting colonies at their new non-native environment, or iii) move with their native group. We also tested for an effect of individual personality on survival. We found that social context, and not individual personality, affects individual survival in foreign environments with contrasting resource levels. Individuals that were transplanted with their native groups suffer higher mortality rates compared to individuals transplanted as singletons, regardless of whether or not they are assimilated into native colonies. Moving as individuals could thus provide an avenue for ongoing gene flow among populations from different resource environments. We found no depressed performance of control colonies that were transplanted across sites with resource levels similar to colonies' site of origin. These results are at odds with the intuition that dispersing as a group should generally enhance the viability of immigrants, at least in social species. We propose that these results could be explained by a mismatch in the ideal group compositions (personality compositions) favored in different environments, despite a lack of selection on individual personality traits. These results provide a first glimpse into the relative roles of individual personality and social context in mediating gene flow among populations from divergent environments.