Next.js Discord

Discord Forum

Keeping SEO meta tags in `_app` or `_document` file

Unanswered
Britannia Petite posted this in #help-forum
Open in Discord
Britannia PetiteOP
Does it make any difference or improve by keep SEO meta tags in one file or other:

1. Keeping in _app or,
2. in _document

8 Replies

American Chinchilla
Theyre both different
_document is to update the html or body tags globally
This will affect all pages
You can add meta data there but its better to add them to your server side page or in layout
Where they can be dynamic or each have their own meta
@American Chinchilla _document is to update the html or body tags globally
Britannia PetiteOP
If I keep some static meta tags in _document file, does it cache those meta tags across all pages.
To improve performance/speed.
At the end of the day, both meta data get crawled by bots and read