The long-term fate of the Friarwood Birth Centre has been in doubt for over a year, with the trust struggling to recruit midwives.
While 5,700 women a year give birth at Pinderfields Hospital a year, less than 200 do at Pontefract.
The Mid Yorkshire Hospitals NHS Trust said the midwifery unit will close from Friday November 8 to September 30 2020.
However it said the decision did not preempt discussions about its long-term future.
Earlier this year Pontefract MP Yvette Cooper presented a 1,000-name petition to protect the maternity unit, saying mums should have a choice rather than having to go to Pinderfields, which is already overstretched.
Ms Cooper tweeted that the decision was "appalling".
She posted: "The Tories have completely failed for 10 years to recruit the midwives our NHS needs & it is local mums & families who are paying the price."
Chief Executive of The Mid Yorkshire Hospitals NHS Trust Martin Barkley said "Mid Yorkshire, in common with many other trusts, has a number of midwife vacancies, which we struggle to fully recruit to in the context of a national shortage of midwives.
“Despite having been delighted to recruit 15 midwives from the cohort of newly qualified midwives that join the NHS at this time every year, it has not been enough to ensure we have an adequate number of midwives across three midwife-led units and our obstetric service based at Pinderfields Hospital.
"It is therefore challenging to consistently provide the excellent standard of service we strive to provide for our mums-to-be; nor is it fair to our staff to continue to stretch our midwifery resource so thinly.
“5700 women give birth at Pinderfields Hospital each year and more than 300 at the Dewsbury midwifery-led unit, which typically has 50 per cent more births than at Friarwood in Pontefract.
"We have to deploy our midwives where they are most needed and therefore we have reluctantly taken the difficult decision to temporarily close the Friarwood Birth Centre on the grounds of safety.
“We recognise there has for some time been a lack of clarity around the status of the Friarwood Birth Centre because of discussions about its future.
"We hope this decision, whilst disappointing, gives our mums-to-be some certainty in the immediate term, and our midwives will be happy to discuss with women their choices around place of birth, for which we will still be offering the full range of options, from home birth through to the excellent midwifery-led facilities at Pinderfields and Dewsbury.
"And we will continue to run antenatal and postnatal clinics at Pontefract.
“This decision is purely driven by our shortage of midwives, and does not in any way pre-empt discussions that have been taking place about the future of the Friarwood Birth Centre.
“We keep our midwife vacancies under constant scrutiny and, should the situation change, particularly when we once again have the opportunity to recruit from the cohort of newly qualified midwives next autumn, we will review this decision."