Rayo Cantabria was founded in 1926 as Gimnástica de Miranda, later being renamed Sociedad Deportiva Rayo Cantabria. Having competed independently in the Cantabrian Regional Championship, in 1946 they were promoted to the third tier of Spanish football, the old Tercera División, for the first time; the following campaign, they faced the biggest local club Racing de Santander (or Real Santander as they were known at the time), Rayo being relegated and Racing promoted. In the 1950–51 Tercera División season, Rayo came up against the Racing youth team, Juventud RS with both entering the relegating playoffs; Juventud went down and folded soon after, and from that time Rayo became the Racing farm team.
They went on to spent 20 consecutive years at the third level, coming close to promotion on a few occasions, also performing the important task in developing young local players, some of whom (including Paco Gento, Marquitos, Ico Aguilar, Pedro Zaballa, Vicente Miera and Nando Yosu) went on to great success. They temporarily disassociated from Racing in the 1968–69 and 1969–70 seasons when both were in the same division. After league restructuring in the mid 1970s, Rayo played just one further season at the third level (now Segunda División B) – that was in 1987–88, and they were relegated. Further elite players produced via a spell in the team included Tuto Sañudo, Juan Carlos, Manolo Preciado, Pedro Munitis and José María Ceballos.
In 1993 the original Rayo was dissolved in a national move to formally absorb affiliated teams into the professional clubs' structure, and Racing de Santander B took its place. A new Rayo Cantabria, who started playing as an independent club in the regional leagues from 1993, was also affiliated to Racing for four seasons, from 2003–04 to 2006–07. Racing B have since played nine seasons in Segunda B, lasting no more than two years in any single spell at that level; they would usually meet Dep. Rayo when relegated back to the fourth tier, and finished below their 'sibling' club on three occasions.
In 2018, previous manager Ángel Meñaca was recognised by the city of Santander for his lifetime efforts and contributions towards the running of both the original Rayo up to 1993 and the 'new' Rayo from then on.
In summer 2019, Racing de Santander successfully applied to have their B-team renamed as Rayo Cantabria going forward; the other Rayo club had been removed from the league a year earlier due to unpaid debts.