Distance from your house
The generator should be far enough away from your house that it does not pose a fire risk or blow carbon monoxide indoors.
Distance to your house
The generator should be close enough that you do not have long electrical wires wired to it. Ohm's law states that the greater the length an electrical current has to travel in an electrical cord, the greater risk it will overheat and cause a fire.
According to Consumer Reports, the generator should be about 15 feet away from your house. Check your local ordinances as exact distances vary from county to county and state to state.