How to prevent random 302 canonical-ish redirect on custom template

How to prevent random 302 canonical-ish redirect on custom template