netlify / explorers

https://explorers.netlify.com/
MIT License
261 stars 40 forks source link

SEO question: how should we address duplicate URLs for stages? #158

Closed jlengstorf closed 3 years ago

jlengstorf commented 4 years ago

in our schema design, it's possible to add the same stage to multiple missions

so if we have a stage my-sweet-stage and two missions (sarah-is-bad-at-burgers and jason-wins), then we'd end up with two URLs that display identical content:

should we set up a canonical URL for each stage, e.g. /learn/my-sweet-stage? or /stage/my-sweet-stage? that way we could add <link rel="canonical" /> to avoid SEO penalties for duplicate content

cc @scottmathson

jlengstorf commented 4 years ago

follow-up: we shouldn't use /learn/[stage] — that'll introduce weirdness for determining what's a mission vs. a stage at the /learn/[stuff] path

I'd vote for /stage/[stage]

@lindsaylevine brought up a good question about tracking progress, and I think this might actually help us:

  1. by creating a canonical URL, we have a unique identifier that we can use for the stage that's human readable (e.g. /stage/my-stage)
  2. in every mission, we can track the mission URL (e.g. /learn/mission-name/my-stage) but also track the canonical URL
  3. in the database, we can store the canonical URL as the progress key with the currently completed percentage
  4. on future missions that include this stage, we'll be able to show that they've already watched it, even if the URL is different, thanks to the canonical URL
sdras commented 4 years ago

@scottmathson I think we need your help! Need to get a full audit from you shortly :)

scottmathson commented 3 years ago

So I'm not seeing /stage/ subdirectory even building out to sitemap? https://jamstack-explorers.netlify.app/sitemap.xml 🤔

If generating duplicate, yes, we'd definitely want to set a <link rel="canonical" />. Not sure I fully understand how/where this referenced /stage/ content builds or lives.

jlengstorf commented 3 years ago

@scottmathson let me try to tl;dr this, because there's a lot of context

so, assume there are three videos (stages):

  1. how to deploy a site to Netlify
  2. how to build a site with Next
  3. how to build a site with Gatsby

if we make missions out of these, we'd potentially reuse the "how to deploy a site to Netlify" video and have two playlists:

  1. Next on Netlify (/learn/next/)
    • how to build a site with Next (/learn/next/build/)
    • how to deploy a site to Netlify (/learn/next/deploy)
  2. Gatsby on Netlify (/learn/gatsby/)
    • how to build a site with Gatsby (/learn/gatsby/build)
    • how to deploy a site to Netlify (/learn/gatsby/deploy)

this creates duplicate content since the same video is in two places, but this is intentional since missions often cover common ground and we don't want to re-record near-identical videos

how should we approach this to ensure we don't get SEO penalties for the duplicate URLs for the "deploy" video?

scottmathson commented 3 years ago

ahhh - that makes it much more clear, thanks for writing that out!

  1. awesome strategy - repurpose and reuse the content in other, relevant places - love that!
  2. definitely canonical, pointing to the initially launched page

so from Next mission example how to deploy a site to Netlify (/learn/next/deploy), adding <link rel="canonical" href="https://explorers.netlify.com/learn/netlify/deploy" /> (or whatever that URL is).

is there an option, in how things are developed here and as you're repurposing this "stage" on the Next module, for example, to add something like canonicalUrl: https://explorers.netlify.com/learn/netlify/deploy to update the metadata/canonical attribute on-page for that specific /learn/next/deploy page?

^ this would be the ideal, in my opinion (without totally knowing how you things are architected here/how repurposed).


clearer? muddier? happy to have a call sometime tomorrow morning, if need be.

jlengstorf commented 3 years ago

we can set up a canonical URL, yeah. I opened #346 to track that

thank you!