nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

How do I set custom Title and Description for 404 template #1487

Closed anstrx closed 4 months ago

anstrx commented 4 months ago

Question

I tried {% do seomatic.meta.seoTitle('some error title') %} in my 404.twig file in the head section but the global seomatic title still shows up in the rendered 404 page. How do I override this?

Additional context

Using latest version of Craft 3.x

khalwat commented 4 months ago

By default, SEOmatic does not render any metadata for 400-class responses. This is because the metadata is largely for bots, which don't index 404 pages at all.

Probably you should just put the <title> in there yourself as you see fit.