Non-axisymmetric endwall profiling offers features to simultaneously mitigate aerodynamic losses and hot gas ingestion in axial turbines. This paper presents an optimization methodology to generate a contoured surface integrated with real geometrical effects such as blade fillets and a rim seal channel with the aim of achieving higher efficiencies while reducing hot gas ingestion. The contoured rotor platform is constructed using a B-spline surface clamped in the axial direction. In the azimuthal direction, the surface is unclamped to allow geometrical continuity across the periodic boundaries. The endwall parameterization is used to optimize a rotor hub platform of a high-pressure turbine stage. A differential evolution optimizer is used to rank individuals in terms of efficiency. The single-objective optimization is set to maximize the aerodynamic efficiency and it is defined such that it accounts for the flow non-uniformity through a mixed-out averaging procedure. Engine representative conditions typical of a two-stage high-pressure turbine are used as boundary conditions. Geometrical and aerodynamic constraints are set to guarantee a fair comparison among individuals and to meet engine requirements. Two surface parameterizations, which use a different number of design variables but share the same construction strategy, are presented to show the trade-off between the number of degrees-of-freedom and the aerodynamic improvement. Different purge flow conditions are considered to assess the robustness of the optimization results at off-design conditions for relevant geometries. The aim of this paper is to show the advanced shape flexibility of the implemented parameterization for contoured platforms featuring technological effects such as blade fillet and rim seal channel. The work provides design guidelines to setup engine-realistic constraints for endwall contour optimization of turbine stages.