Black Lives Matter. Please consider donating to Black Girls Code today.

Create different Title, Meta Description for each page

Hello, to optimize my site for Google SEO as well as for a better user experience. I need to be able to customized the title and meta description tag for each page (different relative URL). Currently, I can change the app.title and app.index_string attributes, but those will only change on a full page load, not on a page change. Is there any way to get these values to change when users go to different pages on a single Dash app?


Hey @dck255! Have you tried calling app.index_string as part of a callback that fires upon a change in a dcc.Location component?

I have been doing that, when the pathname attribute changes. However, if a user starts out on the homepage and then navigates to another page, the title/index_string will not change. It will only work on a full refresh/page load