Set Up Route to Template - then variable Entry is undefined
Variables like entry are only auto-injected for routes that match the Section's Site Settings routes:



If you're using custom routes, they won't match, and you'll need to set entry (or whatever) yourself manually. SEOmatic uses the same Craft mechanism for recognizing injected entrys (or whatever), so the same applies there. Vide: Rendering Metadata From Another Route