Before I registered a limited company, I had bought a few domains containing the name of the company. Can I rent out the domains to my company? Is this legal? I don't want to sell the domains as in case of dissolving the company I would probably have to buy them back if I didn't want to lose them. But then I don't want to pay for the domains with my own money if I could be getting the costs back in tax.
I'm not sure you need to go to all of the trouble of renting it out (though I'd imagine that it's possible). Why can't you just give it to the company and (in a simple contract somewhere) state that you get it back if the company goes under? Looking at this from the other side, I'd be hesitant to be renting a domain name. It's like renting an apartment, and it is possible the landlord may come along and say, "Sorry, but you've got to move out by the end of the month." That's not something I'd be willing to do as a partner in a business. What happens when the owner of the domain leaves the business and wants to take it back?
I can't speak about UK law; but in the general case there is nothing to prevent renting/leasing out the rights to use a specific domain name. In fact it's a thriving industry, where domain "brokers" prefer to rent out domains rather than sell them, because that brings them more money.
However, if you later bring in outside investment or new partners, then these generally perform due diligence investigations. And if these show that core intellectual property -- for example trademarks or domain names -- are not the property of the company, then the investors might see that as a severe breach of trust and proper conduct.
So yes, you can do this. But if you later on are getting more serious about the business, then be prepared to move the domain ownership into the company.
This seems like a premature micro-optimization to me. I don't know if these domains are extraordinarily valuable, but at first glance if you're not ready to loose something so small as a domain registration, then maybe you consider whether to start a business at all?