Idea. To make my shareware program free in less-developed countries. Or release a free edition for these countries.

Purpose. More users, bug reports, extensions, active forum, etc. Anyway, 90% sales are in ~30 richest countries. Why not make it free in China, India, Russia...

Question. What are possible problems? I can't find info on this topic. It seems that almost nobody does it (I know only Windows 7 Home Basic).

Algorithm. How would you implement it? I know it's possible to detect country using IP. It's OK if would fail to detect in 20% cases. When country is detected, the user would get license key for free. Country detection and license key generation can be implemented in web server.

EDIT: Country detection can be performed when user wants (clicks button 'Register for free'). Then program connects to my website, which detects country and generates a license key from user's hardware ID. Then the free key can be used on that PC like a purchased key, and no internet connection required. On other PC/hardware the user can simply repeat the procedure, as long as he/she is in one of these countries.

EDIT: Country detection is easy and fast, i tested it with this php script+database. It worked with all IPs of my website visitors of this month. However some of them may actually live in other countries (see jwenting answer).

  • 1
    Windows 7 Home Basic is not free. It is sold to OEMs as part of a computer package; the cost is passed along to the consumer. Jul 19, 2013 at 4:53
  • 1
    Nice idea, nice question.
    – Marcel
    Jul 19, 2013 at 6:12
  • what happens when a user has no internet connection? It's free or not then? Also, when is this check performed? At installation-time? every start-up? When checking/performing updates? Jul 19, 2013 at 8:32
  • Maybe you could, instead of using the IP to give away free licenses or not (and that may have a lot of problems or be easy to deceive your checks), use the power of the computer? If your program is running in a high-end computer, then charge a license fee. If it's running in some Pentium III or older, then it's free. Jul 19, 2013 at 8:34
  • 2
    @Heng-CheongLeong so for having a free license I should put my CC number? Very few people will do that, seems a scam. Jul 19, 2013 at 9:54

4 Answers 4


There's no reliable technical way to control distribution so as to ensure different priced versions don't leach into other areas.
No, it's NOT possible to detect the country based on IP address. Address ranges may be handed out to specific national agencies, but it's quite possible to have an address assigned to another country, or indeed none at all.
For example, I live in country A and my ISP is a subsidiary of an ISP in country B, gets their IP ranges from their parent company which buys them in country C where they're cheaper. Or I work for a multinational that has a global IP range registered in their home country, which is different from the country I work for them (I may even travel between countries).
And what if your user puts it on his laptop and goes abroad, to a country where he'd have to pay another price, will his software stop working?

So the only way is legal, license policy and enforcement by disallowing the sale of regional versions in other regions. That's the way Microsoft does it (as well as others like Levi's, I can't order a pair of 501s from Amazon US for example because Levi's does not allow selling their products across regional borders, a company like Amazon would lose their dealership if they do so anyway).
If you're going to sell hardware/software bundles, you can of course put in something like the region coding used in DVD and BluRay players. And draw the ire of your customers in areas where you're charging extra...

  • If the intention is to give away bonus licenses for free, and the giveaway is advertised carefully, there is no need for hundred-percent reliability in the country-detection algorithm. Jul 19, 2013 at 9:50
  • @Heng-CheongLeong not for false positives, but false negatives you want to avoid at all cost and those are unavoidable using IP address as the determining factor. Amazon uses credit card billing address combined with shipping address as the determining factor, which is far more reliable (and even there there is potential for trouble, as there are people living in the US with a foreign credit card and foreigners with US credit cards, among other glitches).
    – jwenting
    Jul 19, 2013 at 9:56
  • 1
    If the cost of the software is high and the check is only done once, there are ways to use a proxy or VPN to appear to be someplace else. Many people use this to get access to certain TV shows on line. Jul 19, 2013 at 10:59
  • More info about proxy/VPN: smart-ip.net/how-can-i-hide-my-ip . In my case, the software costs $50. I don't worry much about cheating, they probably would not purchase anyway. But if many people hide their IP for other reasons, it can be a problem.
    – gindi
    Jul 19, 2013 at 11:22
  • I suspect those who intentionally game your system to get free software are those who will probably pirate (and not buy) your software in the first place. Jul 22, 2013 at 10:00

What you could try is to hardcode the language/text of your program into the compiled packages, one for each country/language you will support.

Then set prices per language and give those for free that you like. For China and Russia this will probably work, as they have very specific character sets, for India this will probably a bit more complicated, but may also work out.

This way you tie the country to the language, which is probably not what you wanted, however.

  • 3
    how'd you distinguish between Spain (Spanish, would have to pay) and say Ecuador (Spanish, 3rd world country so supposedly free)?
    – jwenting
    Jul 19, 2013 at 9:57
  • 1
    I like this idea a lot!!
    – TruthOf42
    Jul 19, 2013 at 12:10
  • 1
    Associating language to wealth does not always work. Most South African users would need English.
    – mike30
    Jul 19, 2013 at 16:22

One possibility is to not have any enforcement at all, with no nagging for registration (any reminders are unintrusive). Legally, the license states that only people in certain places can use the software for free, but you don't do anything to block people from using it for free elsewhere.

I believe this model has worked for some companies in the past, but these days there's such a big assumption that software should be available for free anyway. So it's possible, but it could mean you never have anyone pay at all.

A lot probably depends on who your target customers are, and what the software does.

  • 4
    To add to this you could do a "Free for non-commercial use" type of situation (if there are commercial users). Many companies will pay the premium just to cover their own butts legally.
    – Ampt
    Jul 19, 2013 at 17:15

You might consider a different approach. Rather than embedding country checking into the software itself (which opens the door to potential support issues), do it on your web site when you distribute your application. When visitors visit from one set of countries, you make the download free. From another, you require a purchase. Its not 100% guaranteed to be accurate, but between Geo IP and browser geolocation support, you should get 90%+.

Keep in mind this whole approach assumes that the specific user in a developing country is less able to spend money on software than a specific user in a richer country, and that may not be the case. There are lots of billionaires in Russia and China, for example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.