Is there a license that means free usage of source code or its parts, free use of the product for personal or any commercial purposes, but the license obliges the user to place an advertisement of origin in products if they use parts of the licensed code?

I mean exactly advertising. For example a requirement to place a clickable ad banner, hyperlink with some specific keywords etc.

  • 3
    What exactly do you mean by advertisement here? Some promotional ad like “click here to buy the full version of AwesomeProduct”? Or a legal notice that the product is based on your code, like “This software uses AwesomeCode (c) 2017 Sergey. AwesomeCode is free software. You can use, copy, and modify it under the terms of the Foo license”.
    – amon
    Jun 3 '17 at 14:25

It seems no free software licenses exist that enforce advertisements. Such a requirement would seem to clash with the spirit of free software, namely the freedom of using the software for any purpose, including competing with the original author. We would also get the weird result that given such a license, every contributor could add their own ads. And users wouldn't have the freedom to clean up this ad-infested software. That does not seem desirable.

A number of licenses do have a mechanism to protect parts that must not be modified. However, these can generally only be used to protect disclaimers or legal notices:

  • The MIT license family requires the copyright + license notice to be kept in all source files. But this requirement extends only to the source code, not to any user interface.
  • The Apache License 2 allows you to write a NOTICE file which must be included in all modified versions, must be part of the documentation, and must be displayed in any user interface that would display such notices. While the NOTICE file is intended “for informational purposes only” and would typically be only used for legally relevant information, there is no hard restriction on its contents so you could include an advertisement. But you can't require this ad to be displayed prominently.
  • The GPLv3 has a mechanism to add extra terms to the license, but restricts what kind of terms may be added. Section 7 has the full list. For example, additional terms can be added for “preservation of specified reasonable legal notices”. Additional terms that do not fit one of the categories in the list are invalid, and users may remove them.
  • The GNU Free Documentation License (FDL 1.3) has a concept of “Invariant Sections” that may not be modified. However, this can't be done to lock down arbitrary parts but only a “section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject”. This is useful for legal notices, or for statements of opinions. Of course, the FDL is unsuitable for software and is only intended for text documents.
  • The CC-BY-ND licenses are non-free and not suitable for software, but they do prevent ads from being removed – by disallowing all modifications (other than format-shifting).

So while I think that the Apache License 2 could be abused to include adverts, unsurprisingly no major free software/open source license could require ads to be displayed prominently. Instead, you would have to go to a lawyer and get a Shareware license drafted in order to reach your goals. However, it seems exceedingly unlikely that source code encumbered by a custom license would be of any use to other people.


Firstly, IANAL/IANYL. That said, there once was a licence very like this, the original, aka four-clause, BSD licence. It contained the requirement that

All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors.

which some people referred to as "the obnoxious BSD advertising clause". The FSF's position about that clause and freedom is that

The flaw is not fatal; that is, it does not render the software nonfree. But it does cause practical problems, including incompatibility with the GNU GPL.

Your requirement is somewhat stronger: you don't merely intend to control the content of the end user's adverts, you mandate that they advertise.

It seems to me that software under such a licence would almost certainly not be able to be combined with GPL'ed code, and might well be regarded as non-free by honourable people like the Debian Project.


but the license oblidges the user to place an advertisement of origin in products if they use parts of the licensed code.

Yes, several popular licenses have this restriction.


The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.


If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear.


The work must carry prominent notices stating that you modified it, and giving a relevant date.

(And other parts.)

It's worth noting that most companies will find it easy to comply with these requirements without making them too obvious; for instance, Chrome puts them all hidden away at chrome://credits .

  • 1
    None of those constitute "advertisement". They only require the copyright notice appear in the source or in the NOTICE file, for the benefit of people working with the source (and probably modifying it). There's no requirement to place any kind of notice in front of the user. "hiding them in the credits" is perfectly acceptable for this purpose. Jun 4 '17 at 18:43
  • 1
    That depends on what you mean by advertisement. Now that the OP has clarified to mean "place a clickable AD banner, hyperlink with some specific keywords etc.", I agree with you. Jun 4 '17 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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