It happened on Riddings Rise on Friday night, police believe it was a targeted attack.
Police say shots were fired at a house in Huddersfield on Friday night.
Officers were called to a property on Riddings Rise at around 11.27pm.
They found two windows with damage suggesting they'd been fired at, no-one was injured.
Chief Inspector Ben Ryder, of Kirklees District Police, said:
“Thankfully no one was hurt in this attack but the consequences could have been much worse.
“Our enquiries are at an early stage but we believe this was a targeted attack.
“We would appeal for anyone who has any information to contact police, or to contact Crimestoppers anonymously on 0800 555 111.
“There will be an increase in high-visibility patrols in the area to offer reassurance to the community.”
Anyone with information should contact police on www.westyorkshire.police.uk/contact-us or by calling 101, quoting crime reference 13190394927.