Non-axisymmetric endwall profiling offers features to simultaneously mitigate aerodynamic losses and hot gas ingestion in axial turbines. The current 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 parametrization 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. Engine representative conditions typical of a 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 paper shows the advanced shape flexibility of the implemented parametrization for contoured platforms featuring technological effects such as blade fillet and rim seal channel. The work provides design guidelines to set up engine-realistic constraints for endwall optimization of turbine stages.