Developer Guide 10 min read · Aug 22, 2026

How to Cross-Post from Hashnode to Dev.to and Medium in 2026

You publish great technical articles on Hashnode — but your audience is spread across Dev.to, Medium, and other platforms. Here's exactly how to cross-post your Hashnode articles automatically without hurting your SEO.

Why Cross-Post from Hashnode?

Hashnode is a fantastic platform for developer blogs — custom domains, great SEO, built-in community. But the developer audience is fragmented. Dev.to has a massive daily active community. Medium reaches professionals outside the pure dev space. By cross-posting, you can 3-5x your article's reach without writing additional content.

The challenge is that each platform has different formatting requirements, tag limits, and content expectations. A Hashnode article's JSON-based rich text doesn't directly translate to Dev.to's Markdown or Medium's rich text editor. Let's solve that.

Platform Differences at a Glance

Feature Hashnode Dev.to Medium
Content Format JSON (rich text) Markdown Rich text / HTML
Max Tags 5 4 5
API Type GraphQL REST REST (limited)
Canonical URL ✓ Supported ✓ Supported ✓ Supported
Custom Domain ✓ Yes ✗ No ✗ No

Method 1: Using PubliFlow (No-Code, Recommended)

The fastest way to cross-post from Hashnode is with a tool that handles the content conversion, platform APIs, and canonical URLs automatically. PubliFlow was built specifically for this workflow.

1

Connect Your Hashnode Account

Sign up for PubliFlow and add your Hashnode blog by entering your Hashnode username or custom domain URL. PubliFlow uses the Hashnode GraphQL API to sync your articles automatically.

2

Enable Target Platforms

Connect your Dev.to and Medium accounts. For Dev.to, provide your API key from Settings → Extensions. For Medium, use the integration token from your security settings.

3

Configure Auto Cross-Posting

Enable automatic cross-posting for new Hashnode articles. PubliFlow will detect new posts, convert the JSON content to the appropriate format for each platform, set canonical URLs, and publish — all within minutes of your Hashnode post going live.

4

Review and Customize

Optionally, customize the title, tags, and intro text for each platform before publishing. PubliFlow's AI can also adapt your content's tone and length for each platform's audience.

💡 Pro tip: PubliFlow automatically sets your Hashnode URL as the canonical URL on all cross-posts. This ensures Google attributes the original content to your Hashnode blog, preserving your SEO.

Method 2: Using Hashnode + Dev.to APIs (Manual)

If you prefer a hands-on approach, you can build your own cross-posting pipeline. Here's the technical flow:

Step 1: Fetch Article from Hashnode API

Hashnode's GraphQL API lets you query your published articles. Use the following query to get the article content:

# Hashnode GraphQL API
# Endpoint: https://gql.hashnode.com/

query GetArticle($host: String!, $slug: String!) {
  publication(host: $host) {
    post(slug: $slug) {
      id
      title
      subtitle
      slug
      content {
        markdown
        html
      }
      tags {
        name
        slug
      }
      coverImage {
        url
      }
      url
    }
  }
}

You'll need your Hashnode PAT (Personal Access Token) in the Authorization header. Generate one from your Hashnode account settings.

Step 2: Convert Content Format

The good news: Hashnode's API can return content directly as Markdown via the content.markdown field. This is the format Dev.to expects. For Medium, you'll need HTML, which is available via content.html.

However, there are a few conversion gotchas:

  • Images: Hashnode CDN images work on both platforms, but verify URLs don't expire
  • Code blocks: Hashnode's markdown uses fenced code blocks with language annotations. Dev.to supports these natively. Medium needs HTML conversion.
  • Embeds: Hashnode embeds (tweets, YouTube) may not render on other platforms. Strip or replace with plain links.
  • Tag limits: Dev.to allows only 4 tags. If your Hashnode post has 5, drop the least relevant one.

Step 3: Publish to Dev.to

Use the Dev.to API to create the article:

# Dev.to API - Create Article
# Endpoint: https://dev.to/api/articles
# Method: POST
# Header: api-key: YOUR_DEV_TO_API_KEY

{
  "article": {
    "title": "Your Article Title",
    "body_markdown": "---\ntitle: Your Article Title\npublished: true\ncanonical_url: https://your-hashnode-blog.com/your-article-slug\ntags: [javascript, typescript, webdev, api]\n---\n\nYour article content in Markdown...",
    "published": true,
    "canonical_url": "https://your-hashnode-blog.com/your-article-slug"
  }
}

⚠️ Critical: Always set the canonical_url to your original Hashnode post URL. This prevents duplicate content penalties from Google and ensures your Hashnode blog gets the SEO credit.

Step 4: Publish to Medium

Medium's API requires HTML content and uses a different authentication model:

# Medium API - Create Article
# Endpoint: https://api.medium.com/v1/users/{userId}/posts
# Method: POST
# Header: Authorization: Bearer YOUR_MEDIUM_TOKEN

{
  "title": "Your Article Title",
  "contentFormat": "html",
  "content": "<p>Your article content in HTML...</p>",
  "tags": ["javascript", "typescript", "webdev"],
  "canonicalUrl": "https://your-hashnode-blog.com/your-article-slug",
  "publishStatus": "public"
}

Medium will display a label at the top saying "Originally published at your-hashnode-blog.com" — which is exactly what you want for SEO.

Method 3: Automating with GitHub Actions

You can automate the API approach using a GitHub Action that triggers on a webhook. Here's the high-level architecture:

# .github/workflows/hashnode-crosspost.yml

name: Cross-Post from Hashnode
on:
  repository_dispatch:
    types: [new-hashnode-post]

jobs:
  crosspost:
    runs-on: ubuntu-latest
    steps:
      - name: Fetch Hashnode Article
        run: |
          # GraphQL query to Hashnode API
          curl -X POST https://gql.hashnode.com \
            -H "Authorization: ${{ secrets.HASHNODE_PAT }}" \
            -d '{"query": "...", "variables": {...}}'

      - name: Convert & Publish to Dev.to
        run: |
          curl -X POST https://dev.to/api/articles \
            -H "api-key: ${{ secrets.DEVTO_KEY }}" \
            -d @article_payload.json

      - name: Publish to Medium
        run: |
          curl -X POST https://api.medium.com/v1/users/${{ secrets.MEDIUM_USER_ID }}/posts \
            -H "Authorization: Bearer ${{ secrets.MEDIUM_TOKEN }}" \
            -d @medium_payload.json

To trigger this workflow when you publish on Hashnode, you can use a Hashnode webhook (if available on your plan) or set up a polling script that checks for new articles every few minutes using a cron schedule.

SEO Best Practices for Cross-Posting

Cross-posting done wrong can hurt your search rankings. Follow these rules to avoid duplicate content penalties:

1. Always Set Canonical URLs

The most important rule. Your original Hashnode post should be the canonical URL on all cross-posted versions. Both Dev.to and Medium support this natively — use it every time.

2. Add a Cross-Posting Notice

Add a brief note at the top or bottom of cross-posted articles: "Originally published on my blog at [your-hashnode-url]." This helps readers find your primary platform and signals original authorship to search engines.

3. Stagger Your Publishing

Don't publish everywhere simultaneously. Post on Hashnode first, wait 10-30 minutes, then cross-post. This gives Google time to index your original version before encountering the copies.

4. Customize Platform-Specific Elements

While the core content should be the same, customize the intro paragraph, tags, and call-to-action for each platform. Dev.to readers prefer technical depth. Medium audiences appreciate broader context. Tailoring the wrapper improves engagement on each platform.

5. Use Internal Links Wisely

On Dev.to and Medium, link back to your Hashnode blog for related articles. This drives traffic to your primary platform and strengthens your content's authority through interconnected linking.

Common Cross-Posting Mistakes to Avoid

  • Forgetting canonical URLs — This is the #1 mistake. Without canonical tags, Google may index the Dev.to or Medium version instead of your Hashnode blog.
  • Ignoring format differences — Code blocks without language tags, broken tables, and missing images make cross-posts look unprofessional.
  • Using identical tags everywhere — Each platform has different tag ecosystems. What works on Hashnode might not be the right tag on Dev.to.
  • Publishing simultaneously — Without staggering, search engines may crawl the copy before the original, causing indexing confusion.
  • Not tracking performance — Use UTM parameters or platform analytics to track which platform drives the most engagement for each article type.

Frequently Asked Questions

Can I automatically cross-post from Hashnode to Dev.to?

Yes. You can cross-post from Hashnode to Dev.to using the Hashnode GraphQL API to extract article content, convert it to Markdown, and publish via Dev.to's REST API. Tools like PubliFlow automate this process, detecting new Hashnode posts and publishing them to Dev.to with proper canonical URLs.

Does cross-posting from Hashnode hurt SEO?

Not if done correctly. Set your Hashnode post as the canonical URL when cross-posting to Dev.to and Medium. This tells search engines which version is the original. Both Dev.to and Medium support canonical URLs natively. Without canonical tags, search engines may treat cross-posts as duplicate content.

How do I convert Hashnode content to Markdown for Dev.to?

Hashnode's GraphQL API can return article content as Markdown via the content.markdown field. This is directly compatible with Dev.to. For code blocks, verify language annotations are preserved. For embedded content like tweets or YouTube videos, replace with plain links since Dev.to handles embeds differently than Hashnode.

What's the easiest way to cross-post from Hashnode to multiple platforms?

The easiest approach is using a cross-posting tool like PubliFlow. Connect your Hashnode account, select your target platforms (Dev.to, Medium, and others), and PubliFlow automatically detects new posts, adapts the content format for each platform, sets canonical URLs, and publishes — all without manual intervention.

Stop Manually Cross-Posting Your Hashnode Articles

PubliFlow automatically detects new Hashnode posts, converts content for each platform, sets canonical URLs, and publishes — all in one click.

Start Cross-Posting Free →