The shot stopper was one of the key arrivals at the club in the January 2023 transfer window.
He has played ten games in the Premier League and cup competitions since then.
“Everyone is aware of the interest for Dan in the summer, but he has always wanted to stay here,” sporting director Matt Hobbs said.
"There was going to be an inevitability behind this deal even before the interest came, but we just felt it was the right thing for us to do - to show him we have the same faith in him than another club would.
“It’s a new deal for him, and with it, he and his family know that they’re settled for the future and he knows he’s appreciated by the football club because he plays an important role for us, both on and off the pitch.
“He is one of those characters you can rely on and has a huge amount of league experience. Obviously, he’s not as experienced in the Premier League, but he’s able to step in and produce when he’s called upon. That mentality he offers is really important
“From what Gary wants from our players and driving the culture in the dressing room, Dan is a big part of that. It’s not just the staff but all the lads feel really supported by him.
“When someone has come in and done well for us, trains well, fits in really well, is a leader off the pitch, is great for the culture and for standards inside the dressing room, and – crucially – is homegrown, then it’s a decision we were always going to make.”