In these magnificent buildings established by the state or charitable people, camel caravans needs were provided free of charge. If they were in a city, they would take the name of the inn.

During the spreading periods of Islam, the buildings that were established for military purposes and to protect the border security were used for commercial purposes in the following periods and these buildings were called as caravanserai. The caravanserais that emerged on the expanding Islamic lands after the Turks became Muslims took the most developed form during the Seljuk period. Nearly a hundred caravanserais were built on various trade routes in Anatolia.

These buildings, which looked like a fortress from a distance and had an organization that would meet all the needs of the caravans when they were entered, were built by the Seljuk sultans and high government officials for each range, ie 30-40 km. The Seljuk sultans who knew the importance of economic and commercial life such as Second Kılıç Arslan, the First Gıyaseddin Keyhüsrev, the First İzzeddin Keykavus and the First Alaeddin Keykubad on the Anatolian lands, which served as a bridge between Muslim eastern and Christian western countries, had important trade and entry ports with Antalya and Sinop. They established large caravanserais on trade routes connecting their centers. They provided all kinds of assistance to the merchants they placed in these centers.

They also showed great convenience to foreign merchants coming to Anatolia. They set up some kind of state insurance, compensating the damages of merchants who were damaged on the roads, robbed and sinking goods at sea. Starting from Antalya and Alanya (Alaiyye) and passing through major centers such as Isparta, Konya, Aksaray, Kayseri, Sivas, Erzincan and Erzurum, it is on the east-west road to Iran and Turkestan. Konya-Aksehir direction on the road to Istanbul and Western Anatolia valleys; Konya, Ankara, Cankiri, Kastamonu, Duragan, Sinop and Sivas, Tokat, Amasya, Merzifon, Samsun line to reach Sinop south-north and Elbistan, Malatya, Diyarbakir on the roads leading to Iraq built many caravanserais.

The road routes established in Anatolia during the Seljuk period changed during the Ottomans. As a result, some places lost their status as commercial centers.

With the discovery of the Cape of Good Hope, the center of gravity of the trade route that reached India also shifted to the Atlantic Ocean. As the trade lost importance in Anatolia, the caravan roads in the Seljuk period became deserted. For example, the road that connects Istanbul, the capital city of the Ottoman Empire, to Syria and Iraq, follows the Konya-Adana direction, the roads from Antalya to Sivas or from Elbistan to Kayseri and Sivas, and the secondary road connecting these cities. He fell. The caravanserais on these roads have inevitably lost their former importance. However, upon the emergence of new road routes, the Ottomans continued the construction of the caravanserai. They established caravanserais to meet the needs of pilgrims going to perform pilgrimage on the road connecting Istanbul to Mecca and Medina via Syria.

For caravans carrying rich merchandise, caravanserais were established in the caravanserais around the border to provide safe mansions to protect them from hostile marauders, nomadic and bandit raids. dormitories and catering establishments, food warehouses, storage of merchandise, stables for the animals of the passengers, haystacks for the prayers of the passengers, libraries, baths for the washing of guests, hospital and pharmacy for the treatment of the passengers, hospital and pharmacy for the repair of the shoes and for the poor. there were shoemakers, horseshoes to shoal animals, divan (bureau) and officers who would manage these organizations and facilities and make income and expense accounts.

All these magnificent caravanserais, built by the Seljuk sultans and statesmen, were all foundations. They also had rich income sources in proportion to their financial size and organization.

In this way, merchants and all kinds of caravanserai landing and accommodation, rich, poor; No matter who was a Muslim non-Muslim, he could see all his needs there for free.

In the caravanserais, the sick passengers were treated until they found health, the animals were treated by the veteran and the treatment expenses were covered by the foundation. If the poor patients died, the expenses of the shroud were paid from the incomes of the foundation.

The caravanserais, which are large and magnificent buildings, were closed in the evening and the lamps were burned by the duty workers. After the door was closed, no one would be taken out, but the outside would be taken in. At dawn, the drums are played; O Muhammad! Your property, your life, your clothes and your horse, okay? everyone asks; Okay. May Allah have mercy on the beneficiary. they would pray to the foundation of the caravanserai. After everyone has made the necessary road preparations, the doors are opened; Do not go unawares, do not make everyone friends, walk, Allah isan (easy) to bring. After praying and giving advice, the caravans would see them off.

The caravanserais, which were used for commercial purposes in the time of peace, were also used as fortified places where the people of the town took shelter in order to protect them from enemy attack or during the campaign. In particular, caravanserais close to the border length, the border would serve as a castle. Sultan Khan, near Aksaray, was strong enough to withstand a Mongolian commander who had surrounded 20,000 soldiers for two months and could not be taken.

As a result of the importance given to hospitality and philanthropy by the Islamic religion, even the thought that the caravanserais that arose was not present in medieval Europe. As in the previous periods of Islamic history, these beautiful and useful works were used in the service of the people for a long time in the Ottomans.