Dar al-Makhzen
Castles and forts
The Royal Palace or Dar al-Makhzen (Arabic: دار المخزن, lit. 'House of the Makhzen') is the primary and official residence of the king of Morocco in Rabat. It is situated in the commune of Touarga, a district enclosed by historic walls that separate it from the rest of the city. Inside this area, the palace is fronted by a mechouar (public square or parade ground) surrounded by gardens, the Ahl Fas Mosque, and various residences and official buildings.
From Wikipedia, under CC BY-SA 4.0
In the Rabat guide
It is huge, you cannot really visit it (but it is a nice walk), the armed guards might allow you walk from one entrance to another especially if you look like a tourist. Bring your passport.
From Rabat, adapted from Wikivoyage under CC BY-SA 4.0