Skip to content
Roboto Studio / evidence

youtube / video

Sanity SEO done right: Open Graph, JSON-LD, fallbacks

Jono AlfordOriginal source ↗

Original video

About this video

A quick walkthrough of how we handle SEO inside every Sanity project we build - the exact schema patterns, fallback logic, and Open Graph setup we use as a default baseline on Turbo Start Sanity.

Full transcript

Edited transcript from the original Roboto page

Hey bird, how you doing? So, first of all, I wanted to put this on YouTube so everybody else can actually see the answer to this question because I get asked this so many times on a daily basis, but I thought it might be helpful for you. Uh, so in short, and this is a very, very common thing that we get: has anybody done SEO work on Sanity before? Doesn't really go too much into what's actually built into the model, but I hear this time and time again. Um, and the reason why you have this happen so much is because Sanity is very, very unopinionated. And the reason why it's very, very unopinionated is because it can create models that can do anything, genuinely anything, when it comes to just writing a blog, or it can be more complex, as in running an entire e-commerce system, or it can be as simple as creating like a terminal that tells you the latest train times at a train station. It's really, really scalable.

Anyway, so what I'll talk about is a little bit of this. So this is an old Learn article that we wrote with Sanity, which is really helpful. It tells you about how you should opinionate your actual SEO, and it's all good and fine if you want to take the time out to go look through this. That's great. You've got a lot more time than I have, so that's fantastic. Now, I'm going to show you something totally different. This is actually the Turbo Start, and this is the way that we do it. It's the same thing that's in the Sanity Learn documentation. Um, but I know how low people's attention spans are today, so very, very quickly, I'll show you how this works. This is how we opinionate SEO and we do the exact same on every single one of our projects.

So when we build a page for a page builder or for a blog or any other document type, it has a title, okay? And you can do validation. You can do things like, oh, it has to be x number of characters. You can do that. That's really cool if you think it would help the client. But for the simplicity of this, we don't have like that little number underneath, um, because we're trying to be unopinionated. Um, and description, which is going to be effectively used as your meta description on the page. This can also double up. So if, for example, it's a blog, um, the title of the blog could also be the title that sits inside of here, and the description could be the little blurb that you get just before you click into the blog on a card. That's one thing to know. So this becomes our baseline.

The same with images. So you may see an image in here as well. Um, which I believe is an SEO. So ours is a SEO image override. Um, however, sometimes we actually include the image in here as well. It could be that it should be in here. Nope, okay. Um, that might get tweaked on the Turbo Start Sanity, but essentially I like to have an image inside of here as well as part of the pages as a fallback image. However, we have this secondary tab which is SEO. This is your SEO, your meta title. So your title tags at the top, um, and the meta description, which would be in the meta description section. Um, and these will override the title and the description. And you might ask, hold up, if we've got the title and description, then what's going to happen if we override them? Then there surely there's no reason to have these in the first place. Well, the reason we have these is because they're always a fallback. So it means that you have a consistent way of editing your pages, whether that's a page with page builder blocks or a blog which has like the blog title, blog description. So it may not appear on all pages.

Now we've got our SEO. So our metas are sorted. What about our open graph? Well, makes perfect sense. Let's do open graph title, open graph description. And you can go a step further and also do, I think there's a separate open graph image. Uh, you can separate it out down to as granular a level as here's what we want to have on Twitter, here's what we want to have on Facebook, and I think LinkedIn does it as well, just off the top of my head. Um, this is kind of like our de facto baseline. So I would highly, highly recommend doing it this way. Um, however, you can go a lot more granular. You can put JSON-LD in there. You can do all sorts of things. However, a note on JSON-LD, and I've said this to a lot of different people: I much, much prefer set and forget JSON-LD. So if you're already putting all this data like titles and descriptions and things like that in there, and authors. If you're on a blog page, let me show you a quick example of this.

Um, I'm wondering if we have authors on here. I hope we do. If we don't, I'm going to tell you how to do it. Uh, we do. Great. So if we've got all of these authors that are inside of here, why don't we just pull those authors into JSON-LD by default, which is set and forget? So you don't have to think about it. You just enter the data inside of Sanity and a like-for-like pair comes up with JSON-LD. And it's not so complicated these days with AI, so you can even do this relatively quickly. Um, but yeah, this is what I'm talking about when I talk about a de facto default SEO experience. What you should use as a baseline for every single Sanity website that is going to be a website. This obviously differs if it's going to be a different function. But if you're looking to start this straight away, or in your case, I would just literally go to the Sanity Exchange, go find Turbo Start Sanity. You can also find this on GitHub. Um, go view the repo and tell the developer to just go look inside of here.

Um, and pay special attention to two files. One of them is Query. So Query shows you how we handle our Groq queries. And Groq is the query language from Sanity. And then the second thing you want to pay attention to inside of here (um, let me see if I can find it for you. Let me just press up top, any second now) is the SEO. I think it's SEO fields which you can see you can reuse this. This is what we use on ours where it's the SEO title, SEO description. Makes perfect sense. SEO image, SEO no index, and SEO hide from lists. And the reason we have these two left is because obviously you want to have a no index. Sometimes maybe it's a pay-per-click content page that you very specifically want to tunnel down a specific person that's coming to your website. And the second one is SEO hide from lists because, for example, you have a blog post. It may be that you don't want that blog post to show up on certain lists. It may be that you have a no index and you also don't want it to show up on certain lists, or vice versa. That's the reason why we do this because if you have SEO hide from lists inside of your Groq, you can say give me all the blogs except for the ones that are getting hidden from lists, and it's really nice and easy to work with.

Uh, there's some very basic validation here. If the SEO problem continues, just give us a shout. We're more than happy to try and help and give you pointers in the right direction. Thanks a lot. Have a great day. Take care. Bye-bye.

Read timestamped source captions

0:04Hey bud, how you doing? So, first of

0:04Hey bud, how you doing? So, first of all, I wanted to put this on YouTube so

0:06all, I wanted to put this on YouTube so

0:06all, I wanted to put this on YouTube so everybody else can actually see the

0:07everybody else can actually see the

0:07everybody else can actually see the answer to this question cuz I get asked

0:08answer to this question cuz I get asked

0:08answer to this question cuz I get asked this so many times on a daily basis, but

0:11this so many times on a daily basis, but

0:11this so many times on a daily basis, but I thought it might be helpful for you.

0:12I thought it might be helpful for you.

0:12I thought it might be helpful for you. So, in short, and this is a very very

0:15So, in short, and this is a very very

0:15So, in short, and this is a very very common thing that we get.

0:16common thing that we get.

0:16common thing that we get. Has anybody done SEO work on Sanity

0:18Has anybody done SEO work on Sanity

0:18Has anybody done SEO work on Sanity before?

0:19before?

0:19before? Doesn't really go too much into what's

0:21Doesn't really go too much into what's

0:21Doesn't really go too much into what's actually built into the model, but I

0:22actually built into the model, but I

0:22actually built into the model, but I hear this time and time again. And the

0:24hear this time and time again. And the

0:24hear this time and time again. And the reason why you have this happen so much

0:26reason why you have this happen so much

0:26reason why you have this happen so much is because Sanity is very very

0:29is because Sanity is very very

0:29is because Sanity is very very unopinionated.

0:30unopinionated.

0:30unopinionated. And the reason why it's very very

0:31And the reason why it's very very

0:31And the reason why it's very very unopinionated is because it can create

0:33unopinionated is because it can create

0:33unopinionated is because it can create models that can do anything, genuinely

0:36models that can do anything, genuinely

0:36models that can do anything, genuinely anything.

0:37anything.

0:37anything. When it comes to just writing a blog, or

0:39When it comes to just writing a blog, or

0:39When it comes to just writing a blog, or it can be more complex as to running an

0:40it can be more complex as to running an

0:40it can be more complex as to running an entire like e-commerce system, or it can

0:43entire like e-commerce system, or it can

0:43entire like e-commerce system, or it can be as simple as creating like a terminal

0:44be as simple as creating like a terminal

0:45be as simple as creating like a terminal that tells you the latest train times

0:47that tells you the latest train times

0:47that tells you the latest train times train station. It's it's really really

0:50train station. It's it's really really

0:50train station. It's it's really really scalable. Anyway, so what I'll talk

0:53scalable. Anyway, so what I'll talk

0:53scalable. Anyway, so what I'll talk about is a little bit of this. So, this

0:54about is a little bit of this. So, this

0:54about is a little bit of this. So, this is a old learn article that we wrote

0:57is a old learn article that we wrote

0:57is a old learn article that we wrote with Sanity, which is really helpful. It

0:59with Sanity, which is really helpful. It

0:59with Sanity, which is really helpful. It tells you about how you should

1:01tells you about how you should

1:01tells you about how you should opinionate

1:02opinionate

1:02opinionate your actual SEO.

1:04your actual SEO.

1:04your actual SEO. And it's all good and fine. If you want

1:06And it's all good and fine. If you want

1:06And it's all good and fine. If you want to take the time out to go look through

1:07to take the time out to go look through

1:07to take the time out to go look through this, that's great. You've got a lot

1:09this, that's great. You've got a lot

1:09this, that's great. You've got a lot more time than I have, so that's

1:11more time than I have, so that's

1:11more time than I have, so that's fantastic. Now, I'm going to show you

1:12fantastic. Now, I'm going to show you

1:12fantastic. Now, I'm going to show you something totally different. This is

1:13something totally different. This is

1:13something totally different. This is actually the Turbo Star, and this is the

1:15actually the Turbo Star, and this is the

1:15actually the Turbo Star, and this is the way that we do it. It's the same thing

1:16way that we do it. It's the same thing

1:16way that we do it. It's the same thing that's in the Sanity learn

1:17that's in the Sanity learn

1:17that's in the Sanity learn documentation,

1:19documentation,

1:19documentation, but I know how low people's attention

1:21but I know how low people's attention

1:21but I know how low people's attention spans are today. So, very very quickly,

1:23spans are today. So, very very quickly,

1:23spans are today. So, very very quickly, I'll show you how this works. This is

1:25I'll show you how this works. This is

1:25I'll show you how this works. This is how we opinionate SEO, and we do the

1:27how we opinionate SEO, and we do the

1:27how we opinionate SEO, and we do the exact same on every single one of our

1:28exact same on every single one of our

1:28exact same on every single one of our projects. So, when we build a page for a

1:31projects. So, when we build a page for a

1:31projects. So, when we build a page for a page builder, or for a blog, or any

1:33page builder, or for a blog, or any

1:33page builder, or for a blog, or any other document type, it has a title.

1:37other document type, it has a title.

1:37other document type, it has a title. Okay, and you can do validation, you can

1:39Okay, and you can do validation, you can

1:39Okay, and you can do validation, you can do things like oh, it has to be X number

1:40do things like oh, it has to be X number

1:41do things like oh, it has to be X number of characters. You can do that. That's

1:42of characters. You can do that. That's

1:42of characters. You can do that. That's really cool if you think it would help

1:44really cool if you think it would help

1:44really cool if you think it would help the client, but for the simplicity of

1:46the client, but for the simplicity of

1:46the client, but for the simplicity of this, we don't have like that little

1:47this, we don't have like that little

1:47this, we don't have like that little number underneath because we're trying

1:49number underneath because we're trying

1:49number underneath because we're trying to be unopinionated. And description,

1:52to be unopinionated. And description,

1:52to be unopinionated. And description, which is going to be effectively used as

1:54which is going to be effectively used as

1:54which is going to be effectively used as your meta description on the page.

1:56your meta description on the page.

1:56your meta description on the page. This can also double up. So, if for

1:58This can also double up. So, if for

1:58This can also double up. So, if for example, it's a blog, um the title of

2:01example, it's a blog, um the title of

2:01example, it's a blog, um the title of the blog could also be the title that

2:03the blog could also be the title that

2:03the blog could also be the title that sits inside of here. And the description

2:05sits inside of here. And the description

2:05sits inside of here. And the description could be the little blurb that you get

2:07could be the little blurb that you get

2:07could be the little blurb that you get just before you click into the blog on a

2:09just before you click into the blog on a

2:09just before you click into the blog on a card.

2:10card.

2:10card. That's one thing to note. So, this

2:12That's one thing to note. So, this

2:12That's one thing to note. So, this becomes our baseline. The same with

2:14becomes our baseline. The same with

2:14becomes our baseline. The same with images. So, you may see an image in here

2:15images. So, you may see an image in here

2:15images. So, you may see an image in here as well, um which I believe is in SEO.

2:18as well, um which I believe is in SEO.

2:18as well, um which I believe is in SEO. So, ours is a SEO image override. Um

2:21So, ours is a SEO image override. Um

2:21So, ours is a SEO image override. Um however, sometimes we actually include

2:22however, sometimes we actually include

2:22however, sometimes we actually include the image in here as well. Uh it could

2:24the image in here as well. Uh it could

2:24the image in here as well. Uh it could be that it should be in here. No. Okay.

2:27be that it should be in here. No. Okay.

2:27be that it should be in here. No. Okay. Um that might get tweaked on the

2:29Um that might get tweaked on the

2:29Um that might get tweaked on the TurboStart sanity. But essentially, I

2:30TurboStart sanity. But essentially, I

2:30TurboStart sanity. But essentially, I like to have an image inside of here as

2:32like to have an image inside of here as

2:32like to have an image inside of here as well as part of the pages as a fallback

2:35well as part of the pages as a fallback

2:35well as part of the pages as a fallback image.

2:36image.

2:36image. However, we have this secondary tab,

2:38However, we have this secondary tab,

2:38However, we have this secondary tab, which is SEO. This is your SEO, your

2:40which is SEO. This is your SEO, your

2:40which is SEO. This is your SEO, your meta title, so your title tags at the

2:42meta title, so your title tags at the

2:42meta title, so your title tags at the top, um and the meta description, which

2:44top, um and the meta description, which

2:44top, um and the meta description, which would be in the meta description

2:45would be in the meta description

2:46would be in the meta description section. Um and these will override the

2:49section. Um and these will override the

2:49section. Um and these will override the title and the description. And you might

2:51title and the description. And you might

2:51title and the description. And you might ask, "Hold up, if we've got the title

2:53ask, "Hold up, if we've got the title

2:53ask, "Hold up, if we've got the title and description, then what's going to

2:54and description, then what's going to

2:54and description, then what's going to happen if we override them? Then there's

2:56happen if we override them? Then there's

2:56happen if we override them? Then there's surely there's no reason to have these

2:57surely there's no reason to have these

2:57surely there's no reason to have these in the first place." Well, the reason we

2:59in the first place." Well, the reason we

2:59in the first place." Well, the reason we have these is because they're always a

3:01have these is because they're always a

3:01have these is because they're always a fallback. So, it means that you have a

3:03fallback. So, it means that you have a

3:03fallback. So, it means that you have a consistent way of editing your pages,

3:05consistent way of editing your pages,

3:05consistent way of editing your pages, whether that's a page with page builder

3:06whether that's a page with page builder

3:07whether that's a page with page builder blocks or a blog, which has like the

3:09blocks or a blog, which has like the

3:09blocks or a blog, which has like the blog title, blog description. So, it may

3:11blog title, blog description. So, it may

3:11blog title, blog description. So, it may not appear on all pages.

3:13not appear on all pages.

3:13not appear on all pages. Now, we've got our SEO, so our metas.

3:16Now, we've got our SEO, so our metas.

3:16Now, we've got our SEO, so our metas. What about our open graph? Well, makes

3:17What about our open graph? Well, makes

3:17What about our open graph? Well, makes perfect sense. Let's do open graph

3:19perfect sense. Let's do open graph

3:19perfect sense. Let's do open graph title, open graph description. And you

3:21title, open graph description. And you

3:21title, open graph description. And you can go a step further and also do I

3:24can go a step further and also do I

3:24can go a step further and also do I think there's a separated image. Uh you

3:26think there's a separated image. Uh you

3:26think there's a separated image. Uh you can separate it out down to as granular

3:29can separate it out down to as granular

3:29can separate it out down to as granular level as here's what we want to have on

3:31level as here's what we want to have on

3:31level as here's what we want to have on Twitter, here's what we want to have on

3:32Twitter, here's what we want to have on

3:32Twitter, here's what we want to have on Facebook. And I think LinkedIn does it

3:34Facebook. And I think LinkedIn does it

3:34Facebook. And I think LinkedIn does it as well just off the top of my head. Um

3:36as well just off the top of my head. Um

3:36as well just off the top of my head. Um this is kind of like our de facto

3:38this is kind of like our de facto

3:38this is kind of like our de facto baseline. So, I would highly, highly

3:40baseline. So, I would highly, highly

3:40baseline. So, I would highly, highly recommend doing it this way. Um however,

3:42recommend doing it this way. Um however,

3:42recommend doing it this way. Um however, you can go a lot more granular. You can

3:44you can go a lot more granular. You can

3:44you can go a lot more granular. You can put JSON-LD in there. You can do all

3:46put JSON-LD in there. You can do all

3:46put JSON-LD in there. You can do all sorts of things. However, a note on

3:48sorts of things. However, a note on

3:48sorts of things. However, a note on JSON-LD, and I've said this to to of

3:50JSON-LD, and I've said this to to of

3:50JSON-LD, and I've said this to to of different people, I much, much prefer

3:52different people, I much, much prefer

3:52different people, I much, much prefer set and forget JSON-LD. So, if you're

3:55set and forget JSON-LD. So, if you're

3:55set and forget JSON-LD. So, if you're already putting all this data like

3:56already putting all this data like

3:56already putting all this data like titles and descriptions and things like

3:58titles and descriptions and things like

3:58titles and descriptions and things like that in there, and authors if you're on

4:00that in there, and authors if you're on

4:00that in there, and authors if you're on a blog page, then if you're on a blog

4:02a blog page, then if you're on a blog

4:02a blog page, then if you're on a blog page, let me show you a quick example of

4:03page, let me show you a quick example of

4:03page, let me show you a quick example of this. Um I'm wondering if we have

4:05this. Um I'm wondering if we have

4:05this. Um I'm wondering if we have authors on here. I hope we do. If we

4:06authors on here. I hope we do. If we

4:06authors on here. I hope we do. If we don't, I'm going to tell you how to do

4:07don't, I'm going to tell you how to do

4:07don't, I'm going to tell you how to do it.

4:08it.

4:08it. Uh we do. Great. So, if we've got all of

4:11Uh we do. Great. So, if we've got all of

4:11Uh we do. Great. So, if we've got all of these authors that are inside of here,

4:13these authors that are inside of here,

4:13these authors that are inside of here, why don't we just pull those authors

4:15why don't we just pull those authors

4:15why don't we just pull those authors into JSON-LD by default, which is set

4:17into JSON-LD by default, which is set

4:17into JSON-LD by default, which is set and forget? So, you don't have to think

4:18and forget? So, you don't have to think

4:18and forget? So, you don't have to think about You just enter the data inside of

4:20about You just enter the data inside of

4:20about You just enter the data inside of Sanity, and a like-for-like parity comes

4:22Sanity, and a like-for-like parity comes

4:22Sanity, and a like-for-like parity comes up with JSON-LD. And it's not so

4:25up with JSON-LD. And it's not so

4:25up with JSON-LD. And it's not so complicated these days with AI, so you

4:26complicated these days with AI, so you

4:26complicated these days with AI, so you can even do this relatively quickly. Um

4:29can even do this relatively quickly. Um

4:29can even do this relatively quickly. Um but yeah, this is what I'm talking about

4:30but yeah, this is what I'm talking about

4:30but yeah, this is what I'm talking about when I talk about a de facto default SEO

4:34when I talk about a de facto default SEO

4:34when I talk about a de facto default SEO experience, what you should use as a

4:35experience, what you should use as a

4:35experience, what you should use as a baseline for every single Sanity website

4:38baseline for every single Sanity website

4:38baseline for every single Sanity website that is going to be a website. This

4:40that is going to be a website. This

4:40that is going to be a website. This obviously differs if it's going to be a

4:41obviously differs if it's going to be a

4:41obviously differs if it's going to be a different function, but if you're

4:42different function, but if you're

4:42different function, but if you're looking to start this straight away, or

4:44looking to start this straight away, or

4:44looking to start this straight away, or in your case, I would just literally go

4:47in your case, I would just literally go

4:47in your case, I would just literally go to the Sanity Exchange, go find Turbo

4:49to the Sanity Exchange, go find Turbo

4:49to the Sanity Exchange, go find Turbo Start Sanity. also find this on GitHub.

4:51Start Sanity. also find this on GitHub.

4:51Start Sanity. also find this on GitHub. Um go view the repo,

4:53Um go view the repo,

4:53Um go view the repo, and tell the developer to just go look

4:55and tell the developer to just go look

4:55and tell the developer to just go look inside of here, um and pay a special

4:57inside of here, um and pay a special

4:57inside of here, um and pay a special attention to two files. One of them is

4:59attention to two files. One of them is

4:59attention to two files. One of them is query. So, query shows you how we handle

5:02query. So, query shows you how we handle

5:02query. So, query shows you how we handle our Groq queries, and Groq is the query

5:04our Groq queries, and Groq is the query

5:04our Groq queries, and Groq is the query language from Sanity.

5:05language from Sanity.

5:05language from Sanity. And then the second thing you want to

5:06And then the second thing you want to

5:06And then the second thing you want to pay attention to inside of here,

5:08pay attention to inside of here,

5:08pay attention to inside of here, um is Let me see if I can find it for

5:11um is Let me see if I can find it for

5:11um is Let me see if I can find it for you. Let me just press up top.

5:13you. Let me just press up top.

5:13you. Let me just press up top. Any second now is the SEO I think it's

5:16Any second now is the SEO I think it's

5:16Any second now is the SEO I think it's SEO fields, which you can see you can

5:18SEO fields, which you can see you can

5:18SEO fields, which you can see you can reuse this. This is what we use on ours,

5:20reuse this. This is what we use on ours,

5:20reuse this. This is what we use on ours, where it's the SEO title, SEO

5:21where it's the SEO title, SEO

5:21where it's the SEO title, SEO description. Makes perfect sense. SEO

5:24description. Makes perfect sense. SEO

5:24description. Makes perfect sense. SEO image, SEO no index, and SEO hide from

5:27image, SEO no index, and SEO hide from

5:27image, SEO no index, and SEO hide from lists. And the reason we have these two

5:29lists. And the reason we have these two

5:29lists. And the reason we have these two left is because obviously you want to

5:30left is because obviously you want to

5:30left is because obviously you want to have a no index sometimes. Maybe it's a

5:32have a no index sometimes. Maybe it's a

5:32have a no index sometimes. Maybe it's a paper click content page that you very

5:34paper click content page that you very

5:34paper click content page that you very specifically want to like tunnel down

5:37specifically want to like tunnel down

5:37specifically want to like tunnel down um a specific person that's coming to

5:39um a specific person that's coming to

5:39um a specific person that's coming to your website. And the second one is SEO

5:41your website. And the second one is SEO

5:41your website. And the second one is SEO hide from lists, because for example,

5:43hide from lists, because for example,

5:43hide from lists, because for example, you have a blog post, it may be that you

5:46you have a blog post, it may be that you

5:46you have a blog post, it may be that you don't want that blog post to show up on

5:48don't want that blog post to show up on

5:48don't want that blog post to show up on certain lists. It may be that you have a

5:50certain lists. It may be that you have a

5:50certain lists. It may be that you have a no index and you also don't want it to

5:51no index and you also don't want it to

5:51no index and you also don't want it to show up on certain lists or vice versa.

5:53show up on certain lists or vice versa.

5:54show up on certain lists or vice versa. That's the reason we do this because if

5:55That's the reason we do this because if

5:55That's the reason we do this because if you have SEO hide from lists inside of

5:58you have SEO hide from lists inside of

5:58you have SEO hide from lists inside of your grok, you can say, "Give me all the

6:00your grok, you can say, "Give me all the

6:00your grok, you can say, "Give me all the blogs except for the ones that are

6:01blogs except for the ones that are

6:01blogs except for the ones that are getting hidden from lists." And it's

6:03getting hidden from lists." And it's

6:03getting hidden from lists." And it's really nice and easy to work with. Uh

6:05really nice and easy to work with. Uh

6:05really nice and easy to work with. Uh there's some very basic validation here,

6:07there's some very basic validation here,

6:07there's some very basic validation here, but I hope this helps with you trying to

6:09but I hope this helps with you trying to

6:09but I hope this helps with you trying to solve this SEO problem. If it continues,

6:11solve this SEO problem. If it continues,

6:11solve this SEO problem. If it continues, just give us a shout. We're more than

6:12just give us a shout. We're more than

6:12just give us a shout. We're more than happy to try and help and give you

6:14happy to try and help and give you

6:14happy to try and help and give you pointers in the right direction. Thanks

6:17pointers in the right direction. Thanks

6:17pointers in the right direction. Thanks a lot. Have a great day. Take care.

6:19a lot. Have a great day. Take care.

6:19a lot. Have a great day. Take care. Bye-bye.

Questions answered

Editorial answers from the original Roboto page.

Does Sanity have built-in SEO support?

Sanity is very unopinionated by design, which means it doesn't come with a fixed SEO setup out of the box. That's actually a feature, not a bug: it lets you build SEO to suit any project, whether that's a simple blog or a full e-commerce system. We have a Learn article that walks through how to opinionate your SEO, and our Turbo Start Sanity starter is a great practical reference for how we do it on every project.

Read the original ↗
What is the baseline SEO setup you recommend for every Sanity project?

Our de facto baseline includes a title and description field on every document type, which act as fallbacks, and then a dedicated SEO tab with a meta title and meta description that override those fallbacks when set. We also add open graph title, open graph description, and an open graph image. This gives you a consistent editing experience across page builder pages, blogs, and any other document type.

Read the original ↗
Why have a separate SEO title and description if there's already a title and description?

The top-level title and description are always a fallback, so every page has something sensible in place even if no one fills in the SEO tab. The SEO-specific fields let editors fine-tune exactly what appears in search results and social previews without changing the page's actual content fields. It's a clean separation that keeps things flexible without leaving anything blank.

Read the original ↗
How do you handle open graph and social sharing metadata?

We add open graph title and open graph description as a baseline, plus a separate open graph image field. You can go even more granular and split this out per platform (Twitter, Facebook, LinkedIn each support their own tags), but the open graph baseline is what we'd recommend as a starting point for most projects.

Read the original ↗
What is your approach to JSON-LD structured data in Sanity?

We strongly prefer set-and-forget JSON-LD, meaning we automatically generate it from data that's already in Sanity rather than asking editors to fill in extra fields. For example, if a blog post already has authors assigned to it, we just pull those authors into the JSON-LD automatically. With AI it's pretty quick to wire this up, and it means the structured data stays accurate without anyone having to think about it.

Read the original ↗
What are the 'no index' and 'hide from lists' SEO fields for?

The no index field is useful for things like pay-per-click landing pages where you want to drive specific traffic but keep the page out of search results. Hide from lists is a separate toggle because sometimes you want a post excluded from sitewide blog listings even if it is indexed, or vice versa. Having both as explicit fields means you can filter them cleanly in your Groq queries: for example, fetch all blogs except those hidden from lists.

Read the original ↗
Where can I find your SEO setup to use it as a reference?

You can find the Turbo Start Sanity starter on the Sanity Exchange or on GitHub. The two files worth paying close attention to are the Query file, which shows how we handle our Groq queries, and the SEO fields file, which covers the SEO title, description, image, no index, and hide from lists fields. You can point your developer straight at the repo and they should be able to get up and running quickly.

Read the original ↗

Scope and context

  • Video authors are credited by the original Roboto page; individual transcript speakers remain unassigned.