It is located at , surrounded on three sides by the sea; landward the country is unbroken desert for some fifty miles. Berbera is 170 miles southeast of Zeila, while the Ethiopian city of Harar is 200 miles to the west.
The town is known for its offshore islands, coral reef and mangroves. Its lack of a sufficient supply of good drinking water has historically hobbled its commercial value, pointed out as late as 1698, (in this instance in a Dutch East India Company report).
Zeila has been identified with what was called in Classical Antiquity the city of the Avalitae. According to Richard Pankhurst, the city first appears under its own name at least as early as 891, when the geographer al-Ya'qubi mentions Zeila in his Kitab al-Balden ("Book of the countries"). Zeila is described by successive geographers who include al-Mas'udi, who wrote his Murugal al-Dahab wa-Ma'adin al-Guwahir ("Meadows of Gold and Mines of Precious Stones") c. 935; and Ibn Hawqal who described it as the port of embarkation from Ethiopia for Hijaz and Yemen in his Kitab Surat al-'Ard ("Configuration of the Earth"), which he completed in 988.
Its importance as a trading port is further confirmed by al-Idrisi and ibn Said, who describe Zeila as a considerable town, a center of the slave trade. Pankhurst, amongst other writers, thought Marco Polo was referring to Zeila (then the capital of Adal) when he recounts how the Sultan of Aden seized a bishop of Ethiopia traveling through his realm, attempted to convert the man by force, then had him circumcised according to Islamic practice. This outrage provoked the Emperor into raising an army and capturing the Sultan's capital.
The traveller Ibn Battuta visited Zeila in 1329, but was not impressed at the city, writing that it was "the dirtiest, most disagreeable, and most stinking town in the world", which he blamed on the fish and the blood from the camels that they slaughtered in the streets. He claimed to have found the town so revolting that he spent the night aboard ship, despite the rough seas.
By this time, Zeila was subject to the Walashma dynasty, who also ruled over Ifat. Although later in the 14th century Zeila came under the sway of the rulers of Yemen, by the reign of Sultan Sa'ad ad-Din II the Walashma family had sufficient control of the town for that sultan to take refuge there in 1403 (other sources say 1415) from Emperor Dawit I. The Ethiopian Emperor besieged the sultan there for several days, depriving sultan Sa'ad ad-Din of water, until at last the Ethiopians entered the city and killed the unfortunate ruler. Following his death, the sultan came to be considered a saint, and his tomb was venerated for the next several centuries.
Travellers' reports in the 16th century show that Zeila had become an important marketplace, despite being ravaged by the Portuguese in 1517 and 1528. Later that century, destructive raids by nearby Somali nomads caused the ruler of the port, Garad Lado, to have a strong wall built around Zeila.
Although, with Tadjoura, Zeila was one of the principal ports for the city of Harar and the regions of Aussa and Shewa, the town declined in importance over the next centuries. Beginning in 1630, the port city became a dependency of the ruler of Mocha, who farmed out for a small sum the African port to one of the office-holders of Mocha, who in return collected a toll on its trade. Zeila was ruled on the spot by an Emir, whom Mordechai Abir describes "has some vague claim to authority over all of the sahil, but whose real authority did not extend very far beyond the walls of the town. With the help of a small troop of mercenary matchlockmen and a number of canon, the governor defended the town against the disunited Somali nomads who roamed in the area, and against pirates who operated in the Gulf of Aden. By the first half of the nineteenth century, Zeila was a mere shadow of its former self, "a large village surrounded by a low mud wall, with a population that varied according to the season from 1,000 to 3,000 people. Zeila retained what little importance as the port of Harar, and beyond it Shewa, but as a new route was opened between Tadjoura and Shewa, Zeila declined further.
From about 1821 to 1841, Muhammad Ali, Pasha of Egypt came to control Yemen and the sahil with Zeila included. Local merchants like Haj Ali Shermerki and Abu Bakr were made rulers of Zeila by the Egyptians in return for a small tribute, but in 1885 Zeila and its eastern neighbor Berbera were annexed into British Somaliland.
The construction of a railway from Djibouti to Addis Ababa in the late 19th century continued the decline of Zeila. At the beginning of the next century Zeila was described in the 1911 Encyclopædia Britannica as having a "good sheltered anchorage much frequented by Arab sailing craft." However, heavy draught steamers are obliged to anchor a mile and a half from the shore. Small coasting boats lie off the pier and there is no difficulty in loading or discharging cargo. The water supply of the town is drawn from the wells of Takosha, about three miles distant; every morning camels, in charge of old Somali women and bearing goatskins filled with water, come into the town in picturesque procession. ... [Zeila's] imports, which reach Zaila chiefly via Aden, are mainly cotton goods, rice, jowaree, dates and silk; the exports, 90% of which are from Abyssinia, are principally coffee, skins, ivory, cattle, ghee and mother-of-pearl.