Do not follow rules and you risk making grammatical mistakes. But sometimes, you follow what seems to be the rule, only to realize that it was more of an exception and not so much of the rule you thought you were following. That is the problem with the English language, isn’t it? More exceptions than rules like the haters love to say.
Point in case being, we write ‘would not’ and ‘could not’ and even ‘will not’ but when it comes to ‘can’ there suddenly seems to be break in the pattern or a break in the rule if you will.
‘Cannot’ unlike the others seems to be written as one word, unless the ‘not’ forms part of another construction such as ‘War can not only jeopardise relations between nations but also make them poorer.’
Both sources, Oxford and Webster, suggest that although both ways of writing are correct, ‘cannot’ is more the common way.
So here’s what you can do. Use ‘cannot’ unless the ‘not’ forms part of another construction like in the example above.