I would expect the web developer who is providing the services to be the one with the contract (not that you as a client can't have your own), so I would start by reading that and then asking for exclusions to the things that you don't like. Do expect this to increase the cost of purchasing services, as buying exclusive rights to code is much more expensive than buying shared rights. Plus if you buy outright any work that the developer did, you also have purchased the rights to resell it and make a profit from it, something the developer can no longer do.
Keep in mind that not having exclusive ownership of every bit that went into developing your site doesn't mean that you can't use it nor that you will have to pay royalties in the future; the usage rights you get should give you everything you need to fully utilize all the code and graphics in the site developed for you as long as you use it for the site you contracted the work for. You won't be able to legally give it to your brother-in-law for his business site, but then you didn't have to pay extra for it so that you could.