Urbanization is a worldwide process, occurring rapidly with adverse consequences on the environment and people. More exactly, urbanization aggravates natural risks and creates additional artificial risks; this is a key issue for urban planning, which can reduce the exposure and negative outcomes if its provisions are properly enforced. This article is based on observations from Bejaia, Algeria. Each year, the city suffers from disasters including floods, forest fires and landslides. This situation has led to the question whether urban planning observes the regulations from other domains. In order to answer it, different risks threatening the city were modeled and mapped. The results consist of computing the number of buildings situated within non-aedificandi zones by the type of risk. The results show that 15,832 buildings violate the law. Moreover, natural hazards (78.31%) are a more important threat than the artificial ones (21.69%). The most important natural risks are due to forest fires (44.82%), and the explosion of the industrial zones (15.24%) is the dominant artificial risk. The findings show that planning can help reducing the risk exposure within the urban areas, if the planning provisions are properly enforced. Moreover, the article makes a significant contribution to demonstrating the possible consequences of sacrificing long-term safety for short-term political interests.