We introduce the referenced vertex ordering problem (REVORDER) as a combinatorial decision problem generalizing several vertex ordering problems that already appeared in the scientific literature under different guises. In other words, REVORDER is a generic problem with several possible extensions corresponding to various real-life applications. Previous works show that REVORDER has a polynomial complexity, whereas its optimization version, denoted in our work as MIN REVORDER, is NP-hard. We give a survey of methods and algorithms that can be applied to the solution of MIN REVORDER, and we develop a new enumeration scheme for its solution. Our theoretical analysis of this scheme yields several pruning techniques aimed at the reduction of the number of enumeration nodes. We then discuss how upper and lower bounds can be computed during the enumeration to design a branch-and-bound algorithm. Finally, we validate the branch-and-bound by conducting a large set of computational experiments on instances coming from various real-life applications. Our results highlight that the newly introduced pruning techniques allow for major reductions of computational cost, with a constant solution quality. In result, our branch-and-bound outperforms other existing solution methods: among 180 instances with 60 vertices, it solves 179 instances to optimality whereas the best existing method is only able to solve 109 of them. Moreover, our tests show that our algorithm can solve medium-scale instances including up to 500 vertices, which opens the perspective of handling new real-life problems. Our implementation of the branch-and-bound algorithm, together with all instances we have used, is publicly available on GitLab.