Copyright and license notices
Copyrightable files
For copyright purpose, any file more than ten lines long is nontrivial, so it should have copyright and license notices.
If some of your files cannot carry such notices (e.g. binary files), then you can add a README file in the same directory containing the copyright and license notices. Check http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html for further information.
Legal notices
Free software licenses rely on copyright law. The pro is that they are enforceable. The con is that you get the administrative burden. Fortunately, this merely means having in all your files:
- a copyright notice:
Copyright (C) _year1_, _year2_, _year3_ _copyright-holder_
- a license notice
About the year list: the FSF recommends listing every relevant year individually, but it is acceptable to use ranges (assuming every year in the range, inclusive, is covered, of course).
About the copyright-holder: the FSF recommends listing individual (real-world) names, or other entities with legal status, but it is acceptable to use identifiers like "Project Foo contributors" even when Project Foo has no legal existence. Using such fake identifiers makes the copyright less defendable in court. (Reference: https://lists.gnu.org/archive/html/savannah-hackers-public/2010-04/msg00005.html and related messages.)
Richard Stallman's Legal Matters section in the GNU maintainers guide is worth reading (although some parts are specific to GNU packages): http://www.gnu.org/prep/maintain/html_node/Legal-Matters.html
GNU AGPL, GNU GPL, GNU LGPL
In order to release your project properly and unambiguously under the GNU AGPL, GNU GPL, or GNU LGPL, please place copyright notices and license notices at the beginning of every copyrightable file, usually any file more than 10 lines long.
In addition, if you haven't already, please include a copy of the plain text version of the GPL, available from http://www.gnu.org/licenses/gpl.txt, into a file named COPYING. (If your license is the GNU AGPL, use the respective text from http://www.gnu.org/licenses/agpl.txt.)
The current version of the LGPL (version 3.0) is written as a set of additional permissions on top of the GPL version 3.0; so if your license is the LGPL, add both a copy of the GPL in a file named COPYING and a copy of the LGPL in a file named COPYING.LESSER.
For information on what license notices should look like, and for more information on the procedures, see http://www.gnu.org/licenses/gpl-howto.html. Please use the exact form of the license notices recommended in that article.
The GPL FAQ explains why these procedures must be followed. To learn why a copy of the GPL must be included with every copy of the code, for example, see http://www.gnu.org/licenses/gpl-faq.html#WhyMustIInclude.
GFDL
In order to release your project properly and unambiguously under the GFDL, please place copyright notices and permission-to-copy statements after the title page of each work.
In addition, if you haven't already, please add a copy of the FDL (available from http://www.gnu.org/licenses/fdl.html in various formats) as a section of your works.
http://www.gnu.org/licenses/fdl-howto.html also covers additional points, including a smaller notice that you can use in auxiliary files.
Other licenses
If the license is small (such as the Modified BSD, X11 or Expat), instead of a license notice, include it entirely at the top of all your files.
Public domain
If the files in question are public domain, instead of copyright and license notices, include a note saying it's public domain, listing the authors and anything else that is relevant.
For more information, see https://www.gnu.org/prep/maintain/html_node/Non_002dFSF_002dCopyrighted-Package.html and https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html