Is it “wrong” to dismiss an application for a job because of the location of the applicant?

The scenario in question:

Advert for HR role in a major city. Many applications received.
For first sifting, applications who live outside the city are to be sent regrets.
These applicants include some who have worked in the city for years, and commute, and who could commute to the new job.

So- where does the company stand?
Liam Dolan