The best way to claim ownership is to have the terms clearly stated within the contract.
However, it is imperative that you word your contract properly so that you retain ownership and the contractor has a desire to sign it. As many others have suggested, the most practical way is to state within the contract that everything created belongs to the company as soon as it is created. If you decide to go this route, do not include unneeded terms or jargon that can “bog” down the meat and bones of the contract. An IP provision with immediate assignment is usually enough to cover this topic.
You can also require that the contract be signed before the final payment is made. Money is a great motivator in business as it is with everything else in life. Therefore, have your contract state that the code belongs to you upon final payment and both parties agree to this stipulation when signing. I would also require that the code be sent to be at every interval so that you always have possession of it.
It is also important that you choose a reputable contractor. If they steal the information from a past client or use information that is widely available, it will be hard to claim the rights to that. A good way to prevent the contractor from selling your code multiple times is to change all passwords and prevent access by anyone except you.
I don’t want to make it seem like it is doom and gloom when dealing with all contractors, but it is best to approach each business transaction with a level of scrutiny. Think of it this way, it is better to have the stipulations in place and not need them than need them and not have them. Make sense?
Creating a concrete contract is by no means an easy task. This especially holds true if you have never created a contract before and rely on the Internet for your information. Therefore, these waters are best traversed by an experienced and professional attorney. You can find plenty of free documents from a quick google search, but these are standard documents and they rarely capture all of the stipulations that you will need to include.
At, we can connect you with an attorney who would be more than willing to assist you in creating your contract. These lawyers are not those fresh out of law school who are trying to gain experience in the industry. No, these are lawyers who have “been there and done that” and they know how to get the job done in a cost-effective manner.