TMZ/Getty Composite
Exclusive

Cassie Randolph Judge Forces Colton to Stay Away

'Bachelor' star and former NFL player Colton Underwood better avoid his ex-girlfriend, Cassie Randolph, at least until he can plead his case in front of a judge ... TMZ has learned.

According to new court docs, a judge signed off on Cassie's request for a temporary restraining order against Colton, requiring him to keep at least 100 yards from her, her home, her work and avoid any contact or threatening behavior.

In October, he'll have a chance to appear at a hearing where he can argue his side of things ... but in the meantime, he has to steer clear of Cassie.

One last thing ... Cassie attached photos of the alleged tracking device she claims Colton stuck to her car in order to keep up with her whereabouts. It's a small, black contraption ... and she says it was taped to the bottom of the back bumper of her car.

As we first told you ... Cassie claims that -- in addition to allegedly trying to track her -- Colton was also bombarding her and others with harassing texts.

He hasn't come out to address the allegations publicly, but he's reportedly taken aback by Cassie's story ... because he hasn't been around her in a while since they split.

Click here for info about our online advertising practices.