A site owner on Reddit asked if there is a way to remove his site from Google Search in a specific country, specifically Indonesia. John Mueller of Google said there really is not way of doing that, he said “you can’t reduce your rankings in one country in Google.”
John added that “you could set geotargeting to a different country, but that’s not certain to reduce the rankings in Indonesia,” plus John said “if it did, it would affect all other countries.”
One idea John said you can try, is if you have video content on your pages. You can try the “country-limiting is video structured data, which would affect how a page is shown in video search & the video universal results (assuming you have a video on the page).”
John then warned against blocking all users from one country:
Blocking all users in a specific country is doable provided you don’t block the country where Google is crawling your site from (I’m pretty certain we don’t crawl from Indonesia). It always feels like a bad move though – you might be blocking some unwanted users, but you’re also blocking people who might be relevant to your site. IMO if you’re worried about hackers from one country, you should fix the security issues, not try to block that country. It’s trivial for anyone that’s dedicated to circumvent a country-block.
This is not such an uncommon question, although normally the country at question is not Indonesia but other locations.
Forum discussion at Reddit.