Normally, the toilet flange is glued onto the plastic drain pipe. However, some of the flanges can also get glued inside of the drain pipe.