To cross post a blog to dev.to with a canonical URL, publish the original first, then post the full article with canonical_url set to your own permalink. Set it in the editor field, the canonical_url front matter key, the RSS import setting, or the API. Then verify the live page.
Your post is live on your own domain, built from a Markdown file in your repository. You want the same post on dev.to without that copy competing with the original in search results.
Key Takeaways
- Treat
canonical_urlas a request: the Google-selected canonical in Search Console may still be a different URL.- Generate
canonical_urlfrom the post’s own permalink in your build, so nobody types it by hand.- RSS imports and API calls handle the
publishedflag and review differently, so read the dev.to docs for each route before relying on either.- Verify twice: view the page source on dev.to, then run URL Inspection on your original.
What does a canonical URL do when you cross post to dev.to?
A canonical URL on dev.to is a link element in the page’s head that names your own post as the preferred version of the article. Google Search Central treats rel=canonical as a hint it weighs, not a guarantee.

Google groups duplicates into one cluster and shows one URL. The copies are not penalized.
Google’s documentation on how Search works describes the grouping: “To select the canonical, we first group together (also known as clustering) the pages that we found on the internet that have similar content, and then we select the one that’s most representative of the group.” Your dev.to copy and your original land in the same cluster.
Your canonical element is one input to that choice.
Google documents the element in this form. On the dev.to copy of a post, the href holds your original permalink, with example.com standing in for your domain:
<link rel="canonical" href="https://example.com/blog/my-post/" />
If you publish https://example.com/blog/my-post/ first and cross-post it with that value, the dev.to page asks Google to treat your domain as the preferred copy. Google may still show the dev.to URL if it weighs other signals differently. Nothing here guarantees a ranking for either page.
The grouping works on pages with similar content, so the dev.to copy should be the full article. A short teaser with a link back is a different page, so the canonical element has nothing to consolidate.
How do you set the canonical URL on dev.to: editor, RSS or API?
You can set the canonical URL on dev.to in four ways: the editor’s Canonical URL field, the canonical_url front matter key, the RSS import default, or the Forem API.
| Criterion | Editor field | Front matter | RSS import | Forem API |
|---|---|---|---|---|
| Where the canonical is set | Canonical URL field in post options | canonical_url key |
Canonical default checkbox | canonical_url parameter |
| Draft or published | You choose on save | published key |
Arrives as a draft | published flag |
| Review step | Preview, then publish | Preview, then publish | Publish the draft yourself | None unless you add one |
| Typed by hand per post | Yes | Yes | No | No, if built from the permalink |
The dev.to Editor Guide lists canonical_url as a front matter key alongside published. The editor’s Canonical URL field writes the same value.
Both are set per post. A static site build should fill the key from the post’s own permalink so nobody pastes it.
The RSS route lives under Settings > Extensions, in the section “Publishing to DEV Community from RSS”. Its checkbox reads “Mark the RSS source as canonical URL by default”. Imported posts arrive as drafts, a step you complete by publishing each one yourself.
The Forem API is the documented route that skips it. Creating an article accepts a canonical_url and a published flag, so a request with published set to true goes live without a draft. Updating an existing article uses the same fields.
BirchSeek is one automated option. Cross-posting is part of the Business plan.
Each route suits a different workflow:
- Editor field: one writer posting now and then.
- Front matter: Markdown workflows where the permalink is already in the file.
- RSS import: a steady feed when a person can review each draft.
- Forem API: scripted publishing, or teams that need to skip the draft step and add their own review.
How do you cross post a blog to dev.to without typing the canonical URL?
You can cross post a blog to dev.to without typing the canonical URL by building it in your publishing pipeline from the post’s own site URL and path.
-
Read the site URL from your framework. Astro’s configuration reference describes the
siteoption as “Your final, deployed URL. Astro uses this full URL to generate your sitemap and canonical URLs in your final build.” In Hugo, read the page’s.Permalink, which is built frombaseURL. In Next.js and SvelteKit, keep the site URL in one constant or environment variable that your canonical tags and your cross-post script both import. -
Join the base URL to the post path. Use the slug or file path your router already serves, so the result matches the live page. The generated front matter for dev.to looks like this:
---
title: "Your post title"
published: false
canonical_url: https://example.com/blog/my-post/
---
- Send the same value through the Forem API. Your script posts a JSON body to
https://dev.to/api/articles, authenticated with your dev.to API key. Withpublishedset tofalse, the copy is created as a draft you can review before it goes live.
{
"article": {
"title": "Your post title",
"body_markdown": "Full Markdown of the post",
"published": false,
"canonical_url": "https://example.com/blog/my-post/"
}
}
- Match the original’s URL exactly. Copy the scheme (
https) and the trailing slash from what your site serves. If/blog/my-postredirects to/blog/my-post/, the canonical should name the final address, not the redirecting one.
The editor’s Canonical URL field and the RSS import checkbox need no script. Paste the value in the first, or set the checkbox once for your feed.
BirchSeek’s GitHub connector delivers posts to your repository the same way: it commits Markdown or MDX as a commit or pull request, so the permalink is known before you cross-post.
When should you cross post, and what about old posts without a canonical?
Cross post after the original is live, indexable and has had time to be crawled, and fix older cross-posts by adding canonical_url to the dev.to article you already published.
For a new post
- Publish the original. Deploy your site so the post’s permalink serves the full article.
- Confirm it is live and indexable. Open the permalink in a private window: it should load directly with a 200 status, with no redirect and no
noindexrobots tag. Check that the URL appears in your sitemap. - Request crawling if you can. If you own the property in Google Search Console, paste the URL into the URL Inspection tool and request indexing. Google’s help page on recrawling says that “requesting a crawl does not guarantee that inclusion in search results will happen instantly or even at all.”
- Cross post. Publish the full article on dev.to with
canonical_urlset to the permalink your build generated.
Waiting between steps 3 and 4 gives Google the original as a known URL before the duplicate appears.
For posts already cross-posted without a canonical
- Sign in to dev.to, go to your dashboard and open the post you want to edit, as one dev.to community walkthrough describes it.
- In the editor, fill the Canonical URL field or add
canonical_url:to the front matter. Use the exact permalink your site serves, includinghttpsand the trailing slash if the page has one. - Save the change, then verify: view the dev.to page source for a
rel="canonical"link pointing home, and inspect the original in Search Console.
The canonical link appears in the page head as soon as the edit is saved. A change in what Google shows can take longer, because Google decides when to recrawl and which URL to display.
How do you check the canonical URL after you cross post a blog to dev.to?
You check a dev.to canonical URL in two steps: confirm the live dev.to page declares your original as canonical, then confirm which URL Google chose. The second step depends on when Google has crawled your pages.
- Open the published dev.to article. An import that is still a draft has no public page to inspect, so publish it first.
- View the page’s head. Use your browser’s View Page Source command, or open the element inspector and expand the
<head>element. - Search for
canonical. You want a line like<link rel="canonical" href="https://example.com/blog/my-post/">. Compare thehrefwith your original character by character:httpsversushttp, the host, and the trailing slash must match. If thehrefpoints at dev.to itself, the canonical field was empty when the post was saved. - Open Search Console for the property that holds your original. Paste the original post’s URL, not the dev.to URL, into the inspection bar at the top. Google’s help page says the URL Inspection tool “provides information about Google’s indexed version of a specific page”, and it reports on URLs in properties you’ve verified.
- Read the two canonical fields. The help page lists User-declared canonical and Google-selected canonical in the indexing details.
When both fields show your original URL, Google went with your declaration. When they differ, Google overrode the hint.
A different Google-selected URL does not mean the tag on dev.to is broken.
If Google selected the dev.to copy, check the mismatches from step 3, then look at your sitemap and internal links. Re-inspect after Google has recrawled both pages.
What breaks the canonical URL when you cross post a blog to dev.to?
A dev.to canonical URL breaks when the value you set differs from the URL your original serves, or when the import doesn’t arrive the way you expect.
Wrong canonical URL
Symptom: view source on the dev.to page shows a rel=canonical link to dev.to, a staging host or a relative path. Cause: the field was empty or mistyped.
Fix: paste the full address from your live post. Google Search Central advises absolute paths rather than relative paths in the rel="canonical" link element.
Canonical that redirects
Symptom: your canonical URL answers with a 301 or 302. Cause: an old permalink, or a www and apex mismatch.
Fix: run curl -sIL https://example.com/my-post and set canonical_url to the last URL in the chain, the one that returns 200.
http vs https mismatch
Symptom: the canonical starts with http:// while your site serves https://. Cause: a hardcoded scheme in a template or an old note.
Fix: build the value from your framework’s site URL setting, so the scheme comes from one place.
Trailing slash mismatch
Symptom: Search Console reports a different canonical than the one you set. Cause: your site serves the slash form and the canonical omits it, or the reverse.
Fix: copy the URL exactly as the live page serves it.
Served by original: https://example.com/my-post/
canonical_url set: https://example.com/my-post
Fix: canonical_url: https://example.com/my-post/
RSS feed with summaries only
Symptom: the imported dev.to post holds a teaser and a “read more” link. Cause: your feed items carry an excerpt instead of the body.
Fix: change your generator so each item holds the full post, open the feed URL to confirm the whole text is there, then import again.
Imports arriving as drafts
Symptom: nothing appears on your dev.to profile after an import. Cause: the post is waiting as a draft.
Fix: open your dev.to dashboard, find the draft, check that the canonical URL is your original, then publish it yourself.
What if the dev.to copy still outranks your original?
Google can show the dev.to copy instead of your original because rel=canonical is a hint that Google weighs against other signals.
Google Search Central’s page on URL canonicalization says Google chooses the canonical page based on signals such as the “presence of the URL in a sitemap” and any rel=canonical labeling. If dev.to was crawled first, or your original has few links pointing to it, those signals can outweigh your hint.
You can check and change these items:
- Sitemap. Confirm the original’s URL is in your sitemap and that the sitemap is submitted in Search Console.
- Indexing order. Request indexing of the original in the URL Inspection tool, and publish the dev.to copy only after the original shows as indexed.
- Internal links. Link to the original from your homepage, your blog index and related posts, using the exact permalink.
- Canonical match. Make sure
canonical_urlequals the URL your site serves, includinghttps, the host name and the trailing slash. - URL Inspection result. Inspect the original and compare “User-declared canonical” with “Google-selected canonical”.
If Google still selects the dev.to URL after these checks, that is a legitimate outcome. Some authors accept it because dev.to brings its own readers. These changes improve the signals Google sees, and none of them guarantees which URL ranks.
Frequently asked questions
How do I cross post a blog to dev.to with a canonical URL?
Publish the post on your own site first. Then create the dev.to article with the full text and set canonical_url to your post’s permalink, in the editor field, the front matter key, the RSS import setting or the API. Open the live dev.to page and confirm the rel=canonical link points to your site.
Does a canonical URL stop duplicate content problems, and how do I see which URL Google chose?
A canonical URL is a hint, so Google can still pick a different page. It decides from several signals, and the URL Inspection tool in Search Console reports the Google-selected canonical for any URL you test. Run it on both your post and the dev.to copy.
Can I paste just an excerpt and link to my original?
Paste the full article and set the canonical URL. A canonical indicates the original source of your content, so search engines know where it was first published, while an excerpt with a link leaves that page without one.
How do I fix a post I already cross posted without a canonical?
Open the existing article from your dev.to dashboard and add your original permalink as the canonical URL, in the editor field or the canonical_url front matter key. Save it, then reload the live page and check the head for the rel=canonical link.
Next steps for cross posting to dev.to
Today: Confirm the original post is live and indexable on your own domain. Pick one method: the editor field, canonical_url front matter, RSS import or the API.
This week:
- Add
canonical_urlto your publishing pipeline, generated from each post’s permalink. - Add the canonical URL to older dev.to cross-posts that lack one.
- Run both checks: view the dev.to page source for the
rel=canonicallink, then inspect the original with Search Console’s URL Inspection tool.
Ongoing: Spot-check each new cross-post, and look at the Google-selected canonical now and then to see whether it still matches your original.
BirchSeek’s dev.to connector sends approved articles to dev.to as drafts with the canonical URL pointing home. Nothing guarantees rankings. Start setup and review the first dev.to draft before anything goes live.
Sources
What is URL canonicalization | Google Search Central · In-depth guide to how Google Search works · Editor Guide · Publishing to DEV Community from RSS · Forem API V1 · How to Add a Canonical URL to Your dev.to Post · URL Inspection tool - Search Console Help · What is URL canonicalization | Google Search Central. Every other source is linked where the article cites it.