Since
due to is an adjective, it needs a noun or pronoun to modify. To assure this functioning, the safest place for
due to is after a form of the verb to be because there it is always serves as an adjective: "The cancellation was due to bad weather" (
due to modifies the noun cancellation).
The most dangerous placement of
due to is at the head of a sentence. In "Due to rain" or in "Due to the lateness of the hour" or "Due to a cold I was unable to attend",
due to is treated as an adverbial phrase. this is a misuse. A test to determine whether
due to is being used correctly is to replace it with "caused by" or "attributed to", which is what
due to means. If the replacements make sense,
due to is correctly used, as it is in "The explosion was due to [caused by or attributed to] carelessness."