How to approach DFA construction with substring constraints?
Use the state of the automaton to "remember" enough information about the string that you've seen so far to allow you to determine whether the string you've read is in the language. This is true essentially independently of the language you're trying to recognize.