Improved understanding of the biology of traits of livestock species necessitates the use and combination of information that is stored in a variety of different sources such as databases and literature. The ability to effectively combine information from different sources, however, depends on a high level of standardization within and between various resources, at least with respect to the used terminology. Ontologies represent a set of concepts that facilitate standardization of terminology within specific domains of interest. The biological mechanisms underlying quantitative traits of farm animal species related to reproduction and host pathogen interactions are complex and not well understood. This knowledge could be improved through the availability of domain specific ontologies that provide enhanced possibilities for data annotation, data retrieval, data integration, data exchange, data analysis, and ontology-based searches. Here we describe a framework for domain specific ontologies and the development of two first-generation ontologies: the Reproductive Trait and Phenotype Ontology (REPO) and the Host Pathogen Interactions Ontology (HPIO). In these first-generation ontologies, we focused on 'female fertility in cattle' and 'interactions between pigs and Salmonella'. Through this, we contribute to the global initiative towards the development of an Animal Trait Ontology (ATO) for livestock species. To demonstrate its usefulness, we show how REPO can be used to select candidate genes for fertility. Availability: The Reproductive Trait and Phenotype Ontology (REPO) is at NCBO BioPortal: http://bioportal.bioontology.org/ontologies/1552. The Host Pathogen Interaction Ontology (HPIO) is at NCBO BioPortal: http://bioportal.bioontology.org/ontologies/1569.