Much research has recently been devoted to developing approaches, techniques, and technologies which assist people with navigation within buildings. Routing is an essential technique often requested by users prior to real-time navigation, providing them with appropriate routes within buildings. A survey of the literature reveals indoor routing approaches primarily based on shortest distance or fastest travel time as the main criteria. However, such routing criteria that are common in outdoor navigation may not be as applicable to indoor navigation. Presenting users with appropriate indoor routes could be beneficial to many users in various situations. For example, people with physical, cognitive, or sensory impairments may need routes that take into account their special needs as well as preferences rather than ones that are shortest or fastest. In this paper, we present a new ontology and an algorithm (ONALIN) that provides routing for individuals with various needs and preferences. To this end, ONALIN takes the ADA (American Disability Act) standards, among other requirements, into consideration. An indoor routing algorithm based on this ontology is presented and analyzed in detail where it first finds feasible routes with respect to the special needs of the users and then from those will select the comfortable routes.