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.