Intelligent transportation systems (ITSs) have become increasingly popular because they support effective coordination in connected vehicles. ITSs present an integrated approach for exchanging relevant information in order to improve the safety, efficiency, and reliability of road transportation systems. A variant of mobile ad-hoc networks (MANETs) called vehicular ad-hoc networks (VANETs) are an integral component of ITSs. VANETs consist of interconnected vehicles with sensing abilities that exchange information related to traffic, positioning, weather, and emergency services. In general, vehicle-to-everything (V2X) refers to communications between any entity and a vehicle, where the entity may be a vehicle, a cloud-based network, a pedestrian, or equipment installed along a road. One of the crucial challenges in V2X is the reliable and timely circulation of information among vehicular nodes to allow drivers to make decisions that increase road safety. In this context, efficient V2X routing protocols play a key role in supporting reliability and safety, and enhancing the overall quality of service (QoS) in VANETs. However, VANETs have distinct characteristics, such as high vehicular node mobility, unsteady connectivity, rapid changes in network topology, and unbounded network size, that can significantly affect routing in the network. Various routing protocols for V2X communication exist in the open technical literature. In this survey, we categorize the routing mechanisms as non-learning-and learning-based approaches, and discuss existing V2X routing protocols and their contributions to and impacts on VANET performance. Here, the learning-based approach implies the use of machine learning algorithms. This survey also summarizes open challenges in designing effective V2X routing protocols and future research directions to consider when developing smart routing mechanisms for next-generation intelligent VANET technologies.INDEX TERMS VANET, V2X, routing protocol, non-learning-based routing, learning-based routing.