British India: Umballa (now called Ambala), Lahore, Simla (now Shimla), the Himalayas, Benares (now Varanasi), Lucknow
We mentioned in our "In a Nutshell" section that not only was Rudyard Kipling born and raised in India (until he turned six and had to move to England against his will), but he also moved back to India as a journalist at age seventeen. So he knew British India really well—knew it and loved it. Kipling writes about India with the same passion that fellow adventure writer J.R.R. Tolkien writes about his (admittedly fictional) Middle-Earth: he uses that same epic attention to the landscapes and different peoples of the land to tell the story of his main characters's quests.
We're drawing this parallel between Kipling and Tolkien because, frankly, while Kipling's portrayal of India is based on his lived experiences there, he also includes a lot of almost mythic elements when he evokes the great age and exoticism of the country for his English readers. Kipling's India is both realistic, in the sense that he describes actual religious and ethnic tensions in the region during Britain's imperial domination of the country, and fairytale-like, in the sense that Kipling turns India into a unified, colorful, positive backdrop for Kim's journey in this novel.
We get into some of the ways in which Kipling avoids realism in his depictions of India in our "Character Analysis" of the Old Man Who Fought in '57 and elsewhere in this learning guide, but for now, we will focus on the epic scope of his portrayal of the country.
There is a lot of complexity to the way that Kipling portrays the landscape of colonial India: he is of English descent, and he accepts without question the rightness of British rule in India. At the same time, he criticizes English people who remain ignorant about India, and he truly appears to admire India's vitality and complexity, as a place where "there were new people and new sites at every stride—castes [Kim] knew and castes that were altogether out of his experience" (4.26).
To give us a sense of how enormous British India truly is, the plot of Kim covers an enormous amount of territory, from the Himalayas in the North down to Benares (now Varanasi) and Lucknow in the South. We definitely recommend that you read this novel with a handy map of British India on hand—otherwise, the setting of the novel can quickly become overwhelming.
Not Just Where But When
While Kim may cover a big section of British Indian terrain, it's also set in a really narrow stretch of time. Not only does Kim meet an old man who fought against the Indian rebels in the great Revolt of 1857 (so it can't be too far away from that historical event), but the story also has to take place in the aftermath of the Second Afghan War of 1881-2.
The Second Afghan War gave Britain control over Afghanistan's foreign affairs, even if Afghanistan wasn't an official colony of the British Empire the way that India was. So the whole conflict in the novel with the Russian agents and the Five Kings in the North only makes sense if these kings are signing illegal agreements with the Russians against the foreign policies of the British Empire.
Finally, we get one more clue about when Kim is taking place: Kim mentions that he was born at the time of the "great earthquake in Srinagar which is in Kashmir" (2.167). This famous earthquake happened on May 30, 1885. So if Kim is around thirteen or fourteen when the book starts and seventeen when it ends, the events of Kim must take place between roughly 1898 and 1902—making it exactly contemporary with the book's publication in 1901.