It certainly isnt illegal - after all you have the right to insure your property, and if you have a mortgage, you will probably find they insist.
What you need to be careful about is cancellation terms - you dont want to be stung for most (or even all) of the premium for just a couple of weeks of cover.
Dave
P.S. I feel obliged to point out, I am speaking from experience and my own personal views above - I am not an advisor, nor an expert.