Rayer spent two seasons at the Blues as a player before he returned to Goldington Road in May 2005.
The former Wales international has gone on to establish Bedford as one of the leading part-time sides in the country.
And is delighted to have agreed the new contract with chairman Geoff Irvine.
Rayer said: "There has never been any doubt about my commitment to this club and I am delighted to extend my stay for another two years.
"During my time at the club I feel that we have made real progress both on and off the field. The main factor however in this decision is the support I have received from the chairman who has placed a lot a faith in me and we have a great working relationship.
"We do have our 'healthy' discussions from time to time but that is a good thing and long may that continue. It keeps us on our toes!
"This season is another exciting challenge to look forward to and I think that the early signs are that we have established an impressive squad who can hopefully improve upon last season's effort.
"I also want to take a moment to say a big thank you to all of the other coaches at Bedford Blues who contribute so much to the team. It certainly isn't and never will be solo effort at this club and I couldn't do this without the support and commitment of such a good bunch."
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.