Nests of social insects are an attractive resource in terms of nutrition and shelter and therefore targeted by a variety of pathogens and parasites that harness the resources of a host colony in their own reproductive interests. Colonies of the ants Formica fusca and F. lemani serve as hosts for mound-building Formica species, the queens of which use host colonies during colony founding. Here, we investigate whether workers of the host species can mitigate the costs imposed on them by invading parasite queens by recognizing and selectively removing eggs laid by these queens. We used behavioural assays, allowing host workers to choose between con-colonial eggs and eggs laid by the parasite species F. truncorum. We show that workers of both host species discriminate between the two types of eggs in favour of con-colonial eggs. Moreover, workers of F. fusca rejected more con-colonial eggs than F. lemani. This higher rate of error in F. fusca may reflect a greater selectivity or a greater difficulty in discriminating between the two egg types. Nevertheless, both host species removed parasite eggs at a similar rate, when these were artificially introduced into the colonies, although some eggs remained after 10 d. In addition, upon receiving parasite eggs, host workers started to lay unfertilized male-destined eggs within 6 d, thus employing an alternative pathway to gain direct fitness when the resident queen is no longer present and the colony is parasitized.