Just shift it at redline.

Some vehicles have a rev-limiter (cut off) that is higher than the redline (by a few hundred rpms). But it's not worth the risk of damage to your engine.