Server-side title generation is not working as expected on the browser
Author: cusspvzCreated May 18, 2017Updated May 19, 2026
On the server side, the title rendering isn't having the same behavior as the Component/browser side has.
On the server side, we only got the raw title property with Helmet.rewind().title.toComponent().
With exact the same code, if we have set titleTemplate attribute, it works flawless on the browser but not on the server. This causes a SEO issue, where robots won't see the title your page will have.
Versions affected:
Tried with latest release available - 5.0.3
Reproduction:
export default () => (
<Helmet titleTemplate='%s | yolo'>
<title>heyy</title>
</Helmet>
)Expected rendered title on the browser: heyy | yolo
Rendered title on the browser: heyy | yolo
Expected rendered title on node: heyy | yolo
Rendered title on node: heyy
Thanks.
Source: nfl/react-helmet