DEV Community

Ant(on) Weiss
Ant(on) Weiss

Posted on

5 1 1 2 1

Adding a canonical url to dev.to posts (in basic markdown editor)

TLDR:
add a markdown header: canonical_url: https://your.url.here

Took me some time to find this. The preamble is I'm using the basic markdown editor on dev.to. Or at least I was doing it until now. Somehow wasn't even aware of Rich+Markdown option arriving. Trying it for the first time right now - writing this little blurb.
Anyway - I needed to update some of my older posts with the canonical links that were missing.
Almost all the guides out there showed how to do it in the new editor - through the cog menu at the bottom of the editor.
The cog menu
But I needed to add it to older posts which were edited with basic.
I guessed it would come down to adding a header, but it took me a few googlings to find out which one.
So yes - just add this header:
canonical_url: https://your.url.here
And you're good.

Happy blogging!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (5)

Collapse
 
sarahokolo profile image
sahra 💫

That's really helpful. Thanks😊

Collapse
 
michaeltharrington profile image
Michael Tharrington

Hey hey! This is great advice. Thankya so much for writing this guide up! 🙌

Heads up that we have a new tag called #howtodevto that we're using to collect all advice for using DEV under... would you consider adding this tag to your post?

#howtodevto

Guidance, tips, and tricks for using dev.to

I realize you already have 4 tags, so if you'd prefer to keep things as is, then no worries at all!

Collapse
 
antweiss profile image
Ant(on) Weiss

Thanks a bunch for the tip, added the hashtag!

Collapse
 
michaeltharrington profile image
Michael Tharrington • Edited

Sweet! Likewise, thank you for sharing this tip!

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

This is awesome, I had the wrong syntax for some older articles.

Thanks for the quick guide!

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay