Using a semiempirical approach, we show that modified gravity affects the internal properties of terrestrial planets, such as their physical characteristics of a core, mantle, and core–mantle boundary. We also apply these findings for modeling a two-layer exoplanet in Palatini f (R) gravity.