Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a few closed-source applications on my own (no big company behind me) and am wondering exactly how to protect them. At the top of all the source code files I have this pretty basic copyright notice:

 * Copyright (C) 2010-2011 {name} <{email}>
 * This file is part of {project}.
 * {project} can not be copied and/or distributed without the express
 * permission of {name}

However I'm really starting to think that's not enough. Without the money to get a lawyer, I'm interested in any closed-source license that essentially says "You can use it, and that's it". Finding one has been extremely difficult as I can only find open source license comparisons or "Find a lawyer" answers.

Is there any closed-source license that I can use that says something similar to this?

share|improve this question
Everyone okay with a new closed-source tag? Seems like it could be useful – TheLQ Apr 14 '11 at 14:54
Why include the license in source code files if by being a closed-source project means you are not distributing the source code files? How do you expect others to view this license? – Bernard Apr 14 '11 at 15:06
Looks like a duplicate of this one on SO:… – Steve Haigh Apr 14 '11 at 15:14
@Bernard Including the license in the source is a legal maneuver. In the event the source gets somehow leaked, any viewer is still aware that they should not have access to the source -- i.e. they cannot use plausible deniability as a defense. – Puddingfox Apr 14 '11 at 15:14
Do you actually need a license? Do you want protection other than copyright law gives you? Bear in mind that, if you want a license that restricts more than copyright law, you will have to get some sort of assent to the license. – David Thornley Apr 14 '11 at 15:17
up vote 54 down vote accepted

Something like this is adequate, depending on where you live:

/* Copyright (C) YoYoDyne Systems, Inc - All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * Written by Elmer Fudd <>, September 1943

(2016 update: The phrase "All Rights Reserved" used to be required in some nations but is now not legally needed most places. In some countries it may help preserve some of the "moral rights.")

This means you cant:

  • Copy the file
  • Print the file out, scan it and copy the image
  • Print the file out, take pictures of it and distribute the film
  • etc ...

However, take care to note that in some countries, there is no such thing as copyright. This is also completely in addition to a strong license that you ship with your product, which should go into greater detail.

These sort of 'license headers' are designed simply to alert someone who happens upon a file that they should not distribute it.

We use something very much like that in stuff that we have that needs to stay behind closed doors. For instance, it alerts someone to not post functions on Stack Overflow.

Someone who p0wns your dev server to get your code probably isn't going to pay attention to it, however. Note, again, what you're describing is NOT a license, it's a per file assertion of copyright and specifically stating that the code is proprietary.

share|improve this answer
I was under the impression that everyone who works at YoYoDyne is named John. Is this Fudd guy a contractor or something? – Adam Crossland Apr 14 '11 at 15:38
"It's not my goddamned planet, understand, Monkey boy?" – S.Lott Apr 14 '11 at 15:46
There are few countries that don't have a copyright law based on the Berne Convention, and those countries don't tend to have thriving computer installations, and you can't get that much money out of them anyway. There are more countries where copyright is ignored to a large extent, and people there won't care about licenses either. – David Thornley Apr 14 '11 at 16:09
and if it is not a company but an indie developer, what I put here "Copyright (C) YoYoDyne Systems, Inc - All Rights Reserved"? What is that "Inc"? – Aquarius Power Dec 16 '14 at 22:41
@AquariusPower: "Incorporated", like Monsters, Inc. – Matt Feb 24 '15 at 1:56

As per the related question on SO, this Creative Commons license looks relevant to you:

[Note I originally mentioned the SO question as a comment above, but I'm adding as an answer to give it a bit more visibility, as it pretty much does answer your question]

share|improve this answer
I've heard from other people and Creative Commons own FAQ that it shouldn't be used for software. Which sucks because its actually a really nice license – TheLQ Apr 14 '11 at 20:46
How annoying, I was not aware of that. – Steve Haigh Apr 15 '11 at 8:04
The reason for not using CC licenses for software is that (1) they aren't generally compatible with the GPL, which makes using CC-licensed free software a little tricky and (2) they don't require sharing of source code on distribution, which is especially problematic for "share-alike" licenses . In this case, however, neither problem would be an actual issue, as neither of those is desired. – Jules May 16 at 20:32

protected by gnat Aug 1 '15 at 15:49

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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