From Bulbapedia, the community-driven Pokémon encyclopedia.
Each location in the Generation VII games has its own identification number used internally by the game. They are enumerated here, in order. Locations with alternate names have their alternate names listed as an index number after the main location. Locations lacking an alternate name have the following index number blank.
Locations with index numbers up to 00193 appeared in Pokémon Sun and Moon; those with index numbers between 00194 and 00232, as well as the individual index number 30017, are exclusive to Pokémon Ultra Sun and Ultra Moon. Index numbers between 00233 and 30000, 30018 and 40000, 40089 and 60000, and above 60004 are filled with null data. If a Pokémon references an index number for met location that does not exist in that game, it will be displayed in that game as Faraway place.
Pokémon Ultra Sun and Ultra Moon have all location headers programmed in that Pokémon Sun and Moon do; however, the Pokémon Sun and Moon location headers "Secluded Shore" and "Ultra Space" appear as "Ula'ula Beach" and "Ultra Deep Sea" in Pokémon Ultra Sun and Ultra Moon.