Mexico City is located about 200 miles (322 km) from the ocean at the nearest beach known as Playa de Tecolutla. Mexico City is landlocked and sits almost right between the Pacific Coast and the Gulf of Mexico.