Hey developers, own your canonical!
I know you are spoilt for choice when it comes to publishing a technical article. There are numerous options today! Even before we are done with an article, we know where to publish it -- and most of the time it's NOT our own blog or website. After all, it's tedious to maintain a personal website, not to mention the effort needed to grow the audience.
But, if we don't publish our content on Medium or a similar platform how are we going to get the audience to read our posts? The very purpose of writing an article is to put it in front of a large audience. As a result, we just go ahead and post our articles on every developer-related platform out there, except our own blog. But there is a problem with this approach -- these platforms are free to do whatever they want with your content.
For example, Medium recently decided to introduce Paywall. As a part of this program, they'll put your content behind a paywall and in exchange, you will earn some money. Can you opt-out? Yes, you can but your article will no longer be a part of Medium's recommendation system that surfaces interesting articles to read. It'll be shared only with your followers. Moreover, when you are ready to publish your article "Putting your article behind the paywall" is the default choice.
Top Medium publications like Hackernoon, FreeCodeCamp, etc have already moved away to their own self-hosted solutions. Want to read more horror stories? Just type "Medium Paywall" into Twitter search. Trust me, it's nasty!
What happens when you publish something on a platform like Medium?
There is something called Canonical tag. When you publish something on Medium, the canonical tag refers to the URL of that Medium article.
If you publish something on Devto (a programming community), here is how the canonical looks like:
All of these platforms use a canonical tag that points to their own domain. Google treats the canonical URL as the source of truth and indexes it. So, every time you give your content to these platforms you make these websites richer. If one day they decide to delete your content or put it behind a paywall (or simply go out of business), there is nothing much you can do about it. You can of course hurriedly download your content (if they permit you) and put them on your own domain, but it's too late. Your content has been on their domain for years and the SEO benefits they have are huge! Your domain, on the other hand, is new and has no authority. So, you are left with no other option.
Looks scary right? So, how to avoid being a victim of this? The answer is owning your canonical.
Own Your Canonical
The solution is simple! It's your content, so make sure the canonical URL of your post points to your own domain.
Buy a domain for your blog. A
.com domain will cost you around $10 a year, but it's totally worth it.
Now you need to host your blog somewhere. You have a few options here:
- GitHub pages
- Own VM on DigitalOcean, AWS, etc
You can host your blog on any of the above platforms. All of them have custom domain support. However, you'll miss out on the following benefits:
No markdown editor with auto-saving draft support. GitHub Pages supports Markdown, but you will have to commit your posts from time to time.
No community around them. So, you will need to manually promote your articles on different platforms.
You will need to use something like Hugo/Gatsby or something similar to create your static pages which require some amount of work.
No way for others to interact with your posts. For example, I can't leave a comment on your post unless you install something like Disqus.
Some effort is needed to support syntax highlighting, gist embedding, etc.
All in all, you can go for the self-hosting option, but you'll miss out on other important aspects.
But there IS a smarter way of doing things. If you want the best of both the worlds (i.e independence + audience), you can just use Hashnode to host your blog. We let you publish your blog posts on your own domain with automated backups stored on your private GitHub repo. We also have an active community of around 500K monthly active developers where we automatically push your blog posts for visibility. Also, your canonical URL points to your own domain. You can also download a backup of your posts anytime in JSON format from the dashboard.
Hashnode also offers a bunch of other interesting features like Markdown editor, auto-saving of drafts, syntax highlighting, commenting system, HTTPS, CDN, AMP support, newsletter embedding and more. See our product page for more details. You can also check out the following guide to get more insights.
Now, let's get back to business. Once you use Hashnode or any other self-hosting option to host your blog, you are pretty much good to go.
Now, every post that you publish must include a canonical tag. It looks like the following:
<link rel="canonical" href="https://yourdomain.com/post/some-url-here" />
If you use Hashnode, all your posts will automatically have a canonical tag that points to your custom domain. If you use something like GitHub Pages, and publish posts manually, you need to make sure all your post pages have this tag. This will tell Google to treat this URL as the original article.
Write articles and build your domain authority. As you publish your articles, you will slowly start building your domain authority and Google will start indexing your web pages.
So far so good -- but what about the audience? We don't leverage the audience of other dev communities, right? Well, the good news is that all major dev communities support republishing of posts! All you have to do is, set the canonical URL to your original blog post while republishing your post on these platforms. This will tell Google that the republished posts are in fact duplicates of your own original blog post. This way you can retain full control over your content while still benefitting from the audience of other communities!
Here is a detailed blog post on how to republish correctly. This is written from the perspective of Hashnode powered blogs, but the concept applies to all kinds of websites.
I am a big fan of Data Ownership and Staying Independent when it comes to publishing our work. But the truth is that when you give away your content for free, you lose your independence. That's why we started Devblog initiative on Hashnode. Our goal is simple - we want to make blogging hassle-free and simple -- We hate paywalls and ads as much as you do. So, our business model revolves around charging developers directly for premium features while offering most of the important features for free!
Even if you don't want to use Hashnode, I urge all of you to at least explore self-hosting options and build your own domain authority rather than being victims of platforms like Medium.
Join the revolution, by sharing this #OwnYourCanonical article with other developers!
3.4K+ developers have started their personal blogs on Hashnode in the last one month.
Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more
Thanks for writing this article, Sandeep Panda. I am sure many developers who republish their articles on Medium, Devto, Hackernoon, and Freecodecamp (also on Hashnode), aren't aware of Canonical tag.
I love what you guys are doing with Devblog. 💙I see huge potential in that.
Are we allowed to use Devblog for things that aren't necessarily about devs? (i.e., for a blog on a product website I'm building)?
I love Devblog. Hashnode is doing an awesome job here. I found this article on Tweeter and I reshared it with one of my friends who's into blogging and republishing. 😀
Correction! You can add canonical URL in Devto by adding
canonical_url in the front matter.