[noun] + は + どこ + ですか
どこ + に/で/へ/から/まで + [verb] + か
どこ + の + [noun]
どこか どこにも + [negative] どこでも
どこ asks "where". It is a place word: it sits where the answer would sit, and the sentence ends in か. With です it needs nothing else.
It is one of a set of four:
The answer puts a place where どこ was: といれトイレはあそこです.
Before a verb, どこ takes the particle the answer would take: に or へfor a destination, で for the place something is done, に with あります and います, から for "from".
The particle follows the verb, not the English. "Where did you buy it?" is どこでかいました買いましたか, because buying is something done in a place. ×どこに買いましたか is wrong.
In a question, どこ does not take は. The thing you are asking about takes は and comes first; どこ comes after it. ×どこはトイレですか is wrong.
どこ can take が, when the place itself is the subject.
These go beyond asking where something is.
どこの before a noun asks where something comes from or which place it belongs to: which country, which company, which school.
Between friends です and か drop, and the voice rises.