Locations can create all kinds of problems for genealogists. For this reason it is necessary to be as precise as possible. Some locations are logical.
For example, Knoxville, Illinois, is in Knox County, Illinois.
But this is not always the case.
Des Moines, Iowa, is in Polk County, not in Des Moines County, Iowa.
Keokuk, Iowa, is not located in Keokuk County, Iowa.
And remember there are townships as well which may or may not add to the confusion. Hancock County, Illinois, has a Webster Cemetery and a village of Webster. Webster cemetery is not located near the village of Webster.
Provide as much detail as possible when listing locations in your genealogical database. Personally I always use the word “county” in a location. It reduces confusion.