There are many variables.
In short words, you have to know how to licence your work and this should happen when you write the contract with the client.
Of course, there are many aspects of the problem you should consider:
- Does the work contain parts over which your client has full copyright (logo, text, colors, design, source code, trademarks)?
- What can you reuse in the future? Should this parts of your work be licensed under specific terms?
- What exactly the client is willing to pay for? Should you give up all the rights for the work or the price the client pays covers only a limited licence which allows you to resell or reuse part of the work (idea, design, source code)?
No matter what the situation is, you should always consider this legal concern. Moreover, make sure your work doesn't defaults as the property of the client just because you were payed and asked to do the job (it happens in most of the cases).
Look, i found on internet a very good article which gives you a very good idea about how copyrighting works and the way you shuld handle this matter. Here is how it starts:
The moment a work is created in a tangible form, it immediately becomes the property of the author who created it. As soon as you draw that illustration, snap that photo, or write that article, it belongs to you. As owner of that work, you can license its use to another (and even restrict how it’s used), or transfer ownership entirely.
The exception to the above is “work for hire.” That’s when someone else hires you to take the photo or write the article; or when an employee creates a work within the scope of his or her employment. As a freelance designer or programmer, it’s important that your contract makes that distinction; otherwise, the work you perform could be deemed as “work for hire” in a court of law.
You can read more details here
My case?
I do web design as a freelancer.
- The logo, color scheme, images, texts are copyrighted to the client. I don't have and don't exert any rights over what is property of the client.
- The source code will always be under my copyright (I keep all the rights). The client can use the website (source code) as it is, bring changes or replace it with someones else work (with no limitations). What I never allow my clients do is to resell or reuse as part of some other products the source code over which I have (and exert) property rights (except plugins or other peaces I have the right to sell/re-sell as they are).
- As mentioned above, I many times use the work of others as part of my product (plugins, images). I always make sure I have the right to use them as part of the product that I'm selling and I do not exert any property right over this parts (the client can do whatever he/she wants).
- The copyright over the visual aspect (theme/template) is a complicated matter. Usually I try to be original and to avoid building websites visually similar. But, in the end, all of them have a navbar, header, sections, footer, some sliders and so on.
Controlling what happens with the source code after it was delivered to the client is very hard. For this reason, when I ask for a price I consider all the implications (including what can happen after I no longer have control over my work).