The Torah doesn’t tell us where Korach’s rebellion took place. The last location given is “the desert” (Bamidbar 15:32), where the wood gatherer violated the Sabbath. However, this location is ambiguous, as we don’t know which desert it’s referring to. There’s much discussion about why being in the desert is even mentioned, a discussion that impacts which desert it was. Rashi tells us it was the second Sabbath that was violated, meaning it took place in the Sinai Desert. If it wasn’t taught in chronological order, it can’t help us figure out where Korach’s rebellion took place, and we must go back to the previous location cited—where the scouts were sent from.
Ramban, who prefers maintaining chronological order, says not entering the Promised Land right away led to the Sabbath being violated, which is why being in the desert was mentioned. This leaves every stop from Kadesh Barneya, where the decree to stay in the desert was made, in the second year after the Exodus, until the next stop mentioned, the Desert of Tzin/Kadesh (20:1), which (according to most) was in the 40th year, as a possible location for Korach’s rebellion. Despite this, not every location suggested fits within these parameters.
Ramban (16:1) places the rebellion at Kadesh Barneya, after it was decreed that the nation would wander in the desert for 40 years and the current generation would die in the desert. Even though the incidents that led Korach to rebel occurred while they were still at Sinai, he could only convince others to join him after this decree was issued, and, realizing this, waited before trying.
Targum Yonasan, Baal HaTurim and Rokayach (33:22) say Korach’s rebellion occurred at Kehailasa, based on Korach “gathering (K-H-L) the entire congregation” (16:19) for the showdown between Aharon and the 250 leaders. This location is only four stops after Kadesh Barneya/Risma, but if they stayed at Kadesh Barneya for 19 years before traveling (which is the most common opinion), Korach’s rebellion would have occurred in the second half of the 40-year period between the Exodus and reaching the Promised Land. [Alexander Hool, in a footnote on page 13 of “The Desert Encampments,” points out that this allows the Talmud’s implication (Bava Basra 119a)—that some children of those who were part of Korach’s rebellion were younger than 20 when they entered the Promised Land—to be taken literally, as opposed to Rashbam and Tosfos, who say it refers to their grandchildren; if Korach’s rebellion occurred in the second year after the Exodus, these children had to be in their late 30’s by the time they reached the Promised Land.]
Ibn Ezra (16:1) says Korach’s rebellion occurred at Sinai, soon after the Levi’im replaced the first born and Aharon and his sons were given precedence over the rest of the Tribe of Levi. Putting aside Ibn Ezra’s blatant disregard for chronological integrity (which occurs throughout his commentary), Dasan and Aviram’s response to Moshe—that he had taken them out of Egypt to die in the desert, rather than bringing them to the Promised Land (16:13-14)—precludes it from having occurred before the decree that they would die in the desert. Unless the rebellion started at Sinai and continued after the decree, they must have rebelled after they left Sinai. Nevertheless, Korach having his own Mishkan (16:24) and Dasan and Aviram being Moshe’s nemeses since before they left Egypt indicate that there had been an issue long before this confrontation took place. It’s only the showdown that couldn’t have been at Sinai; the rebellion itself could have started there.
Rashi (Devarim 1:1) says the rebellion occurred in Chatzeiros, the stop before Kadesh Barneya, which presents the same difficulty as Ibn Ezra’s suggestion (since the decree to die in the desert hadn’t been issued yet). Chizkuni suggests that because the Paran Desert was so large, Moshe mentioned a city the nation was familiar with that was near where the scouts were sent from (where the rebellion actually took place). This suggestion is difficult too, since Moshe mentions Kadesh Barneya in the very next verse, so he could have mentioned it when referencing the rebellion. [Bear in mind that Chizkuni does not agree with Sefornu’s assertion that Kadesh Barneya was in the Promised Land while the scouts were sent from a spot in the Paran Desert near Kadesh Barneya; according to Chizkuni there were two places with the name “Kadesh Barneya,” one inside the Land, which was part of its southern boundary, and one outside the Land, from where the scouts were sent.] Another possibility (based on Or Hachayim on Bamidbar 14:25, see Nachalas Yaakov on 13:2) is that after the sin of the scouts the nation resumed its wandering and returned to Chatzeiros, which was when Korach rebelled. Besides assuming that the 19 years spent at Kadesh didn’t happen until after they wandered for 19 years, I would have expected Rashi to tell us explicitly that the rebellion occurred when they returned to Chatzeiros, rather than leaving us with the impression that it occurred on their first (and only) stay there.
Chatzeiros was where Miriam was punished for speaking about Moshe, and the nation waited seven days for her to heal before traveling further (Bamidbar 12:15). Those seven days were apparently the only days the nation spent at Chatzeiros; they left as soon as Miriam become ritually pure, and she likely confronted Moshe as soon as they arrived from Kivros Hata’ava, where the 70 elders being appointed led to Miriam’s learning about her brother’s separation from his wife (see Rashi on 12:1). Besides, the Talmud (Ta’anis 29a) tells us that the scouts returned on Tisha b’Av, and since the nation first left Sinai on the 20th of Iyar (10:11-12), traveled for three days (10:33), spent a minimum of a month at Kivros Hata’ava (11:20), and the spies were away for 40 days (13:25), the maximum number of days they could have been at Chatzeiros is seven. Therefore, if Korach’s rebellion happened at Chatzeiros, it must have been during the seven days of Miriam’s punishment.
Since the nation would have left Chatzeiros right away, but waited for Miriam, what did they do during these seven days of “downtime?” I would suggest that (at least according to Rashi) after Moshe’s own sister spoke against him, Korach used this time to plant the seeds of his rebellion, speaking to others who might have had a gripe against Moshe and Aharon (such as other Levi’im and the firstborn), trying to get them to join him. But it wasn’t until after the sin of the scouts, when the decree to die in the desert was issued, that Korach actually confronted Moshe, knowing he would now have widespread support. Therefore, even if the actual rebellion occurred at the location where the scouts were sent from, when Moshe rebuked the nation (in Devarim), he referenced Chatzeiros, where the seeds of the rebellion were planted.
Combining the four suggested locations yields this possible scenario: Korach was unhappy with his situation because of things that happened at Sinai (not being a chieftain, not being the Kohain Gadol, and going through a ritual purification he perceived to be demeaning), but knew he couldn’t do anything about it, at least not yet. At Chatzeiros, he started laying the groundwork for a rebellion, speaking with other Levi’im, the 250 firstborn leaders and Dasan and Aviram about how Moshe had done them wrong. After the sin of the scouts, he started openly recruiting the rest of the nation to join his “movement,” positioning it as a fight for the people against a leadership that had undervalued the laity. He may have confronted Moshe before they left Kadesh Barneya, but the actual showdown didn’t occur until four stops later, at Kehailasa.
Rabbi Dov Kramer did not include “the Plains of Yericho, by the Wadi of Shitim” as a possible location for Korach’s rebellion, even though it’s mentioned in the Midrash “Sefer Zerubavel,” as that refers to where those who rebelled will approach Moshe after the future redemption, not where the ground swallowed them up.