Write the adjective and adverb as one word in a computer context:
National Geographic Online
National Geographic Magazine Online
don't believe all online sites
visit us online at nationalgeographic.com
Write as two words if used as a preposition and object to mean "in operation":
two of the telescopes are now on line
See also COMPUTER TERMS.