...before Sauron returned to it. Once he fled Dol Guldur and set himself
up in Barad-dur, I suspect Gandalf might have steered clear of it rather than
take the risk of exposing himself too soon to Sauron. That's something he
does mention from time to time, even in reference to the Witch King, that they
time of their personal confrontation has not come, if indeed ever it
would. Through the auspices of others, such as Aragorn, he seemed able to
gather enough information about goings-on in Mordor for his needs; not that
Aragorn was any more expendable than he, but that Aragorn was more likely to be
able to move able unmarked, unnoticed because he wasn't another Maia and didn't
have that little red flag about him to catch the Eye's interest.
Concerning the Shire: As Curious says, it does seem odd that Sauron never
noticed it, but I wonder, perhaps, if that may be part of the reason the
hobbits did not move into in until after the middle of the Third Age. It
had been empty before that time, Sauron and his agents may have taken a look at
it then, decided it was a place that didn't need their attention because there
was nothing of worth in it, then somehow missed the movement of the hobbits
into that area -- possibly by the auspices of a Greater Power, possibly simply
because the hobbits themselves seemed to have a gift for avoiding notice by the
Big People, who tended to dismiss them if they even noted their
existence.
<><><><><><><><>
We need the faith to go a path untrod,
The power to be alone and vote with God.
--Edwin Markham