Modern cylinder-head designs for gasoline engines are guiding the exhaust gas to the turbocharger system via an integrated exhaust manifold (IEM) which has several advantages like weight and cost reduction. On the other hand, the exhaust ports are running through a package labyrinth and are heavily bent within smallest space. Increased pressure drop, reduced mass flow rate and deteriorated port flow efficiency could be the consequences leading to higher emissions, increased fuel consumption and higher knock sensitivity. The optimization of the individual ports by Computational Fluid Dynamics (CFD) is a proper means to minimize or even delete these drawbacks. Meanwhile, there are several powerful optimization methods for three-dimensional flows on the market. In this paper, a combined optimization strategy using CFD topology optimization followed by a shape optimization will be presented using the example of an I3 engine with two separate IEMs serving a parallel sequential twin boosting system. After the optimization runs, the mass flow rates through the exhaust ports have been improved and increased by up to 18 %. At the end, an initial design of these flow-optimized ports will be generated. So, the designer starts with an optimized design solution. Furthermore, the optimized flow field can be analyzed and may help to understand the local flow phenomena physics. This new workflow is highly efficient, reduces development time, improves result quality and may reduce the number of expensive and time-consuming test-rig measurements. Optimized fluid topology is essential for modern engines with low emissions and high power output.