The common confusion is simple: write cannot as one word in nearly all negative uses of can. The two-word form can not is rarely correct and only fits when not belongs to a different phrase (for example, not only) or when you're separating not from can for a specific contrast or construction.
Use cannot (one word) as the standard negative of can. Use can not (two words) only when not is part of a different phrase or meaning.
Usually no. In edited English, cannot is the expected negative of can. Use can not only when not belongs to another element in the sentence (for example, "not only") or when the sentence structure puts not with a different verb or infinitive.
Examples of the correct exception:
Cannot is the single-word contraction of can + not that marks inability, impossibility, or prohibition. It's the predictable, grammatical negative form.
Can not, as two words, breaks that unit. It's only natural when the writer intends not to attach to can itself but to another element that follows or when contrasting choices.
Writers separate can and not for a few predictable reasons:
Seeing the forms in context helps lock the correct choice into place.
Six quick pairs you can paste into your drafts and keep as a reference.
Fixing the mistake usually takes two quick checks: decide what not attaches to, then choose cannot or a rewording.
There's no hyphen in cannot. Treat it as one closed word. Similar spacing errors occur with words like into/ in to, altogether/ all together, and so on; check common dictionary forms when unsure.
Use cannot for the simple negative. Use can not only when not combines with another word (not only) or when the grammar places not with a different verb. Avoid splitting cannot without a clear structural reason.
Picture cannot as a single unit that blocks action: it's one word because it blocks the verb. If you can mentally "zap" the action, write cannot. If not pairs with another word (not only) or you mean "choose not to," treat not separately.
These split-or-closed problems appear elsewhere. After fixing cannot, scan for:
Rarely. Use it when not belongs to another element (for example, "not only") or when the structure requires it. Otherwise use cannot.
Can't is the contracted spoken/written form of cannot and works well in informal writing. Use cannot for formal writing.
Read the whole sentence. If not negates the ability itself, use cannot. If not belongs with a following phrase or verb, keep not separate or rephrase.
Write "can not only" because not pairs with only. "Cannot only" would imply impossibility in a different way and is rarely what you mean.
Sometimes, but not always. Spellcheck flags uncommon phrases, but sentence-level checks or a quick manual read are the most reliable methods.
A single-word choice can change meaning. Read the sentence aloud or use an editor tool (the widget above) to confirm that not attaches to the right word and that cannot vs can not communicates your intended meaning.