Skip to main content

Command Palette

Search for a command to run...

Connecting Your Domain to Hashnode

What most students do wrong and how to do it right

Updated
3 min read
Connecting Your Domain to Hashnode

Introduction

If you’re serious about blogging, having a custom domain makes a real difference. If makes your blog look professional and gives you ownership.

Hashnode makes this process easy, but many students still get confused, mainly with CNAME records and blog setup.

This article will guide you on how to connect a custom domain name using CNAME and common mistakes I see students making (and how to avoid them).

Prerequisites

  • A HashNode account ❕

  • A domain name (from providers like Spaceship, GoDaddy, Namecheap)

  • Some Patience 😌

Creating Blog

Wrong Approach:

  • Creating a new Hashnode article for every article

  • Trying to attach a custom domain to each blog

Correct Approach:

  • Create one main blog

  • Add your custom domain to that blog

  • Publish all articles inside that same blog

Steps to create a blog:

  1. Go to https://hashnode.com

  2. Click on New Blog

  3. Enter your Blog name (e.g. Learn With Jay)

  4. Choose your Blog URL (this will be yourname.hashnode.dev for now)

  5. Click Create

This single blog will contain all your articles. Do not create a new blog for every article.

Adding Custom Domain to Hashnode (Using Cloudflare)

In this guide, I’m using Cloudflare becuase:

  • It’s free

  • It’s fast

  • Most developers prefer using it

Step 1: Add Domain in Hashnode

  • Steps:

    1. Open your Hashnode Dashboard

    2. Select the blog you just created

    3. Navigate to Domain Tab

    4. Enter your Domain Name (e.g. blog.yourdomain.com)

  • Hashnode will now show you CNAME record details.

  • Hashnode recommends using a subdomain, not the root domain.

    Avoid: yourdomain.com

    Prefer: blog.yourdomain.com

Step 2: Add Domain to Cloudflare

  • Steps:

    1. Go to https://dash.cloudflare.com

    2. Click Add a site

    3. Enter your domain name (e.g. yourdomain.com)

    4. Choose the Free plan

    5. Cloudflare will scan existing DNS records (you can continue)

  • Once added, Cloudflare will ask you to update nameservers at your domain provider.

Step 3: Update Nameservers at Domain Provider

  • Go to your domain provider (Spaceship, GoDaddy, Namecheap):

    1. Open DNS / Nameserver settings

    2. Replace existing nameservers with Cloudflare nameservers

    3. Save changes

  • DNS propagation may take some time.

Step 4: Add CNAME Record Mentioned by Hashnode

  • In Cloudflare:

    1. Open your domain

    2. Go to DNS → Records

    3. Click Add record

  • Fill the values:

    • Type: CNAME

    • Name: blog

    • Target: hashnode.network

    • Proxy status: DNS only (important)

    • TTL: Auto

  • Save the record.

  • Do not add extra spaces or change values.

Step 5: Verify Domain on Hashnode

  • Steps:

    1. Go back to Hashnode → Settings → Domain

    2. Click Verify Domain

  • If DNS has propagated, you’ll see a success message.

  • If not, wait a little and try again.

Step 6: SSL (HTTPS)

  • Hashnode automatically provides free SSL.

    • No manual setup needed

    • HTTPS may take a few minutes to activate

  • Once done, your blog will open securely.

How Publishing Works After This

Once the domain is connected:

  • You will write all articles in the same blog

  • URLs will look like:

    https://blog.yourdomain.com/article-title

Conclusion

Connecting a custom domain to Hashnode using CNAME is simple once you understand the flow.

One Blog. One Domain. Unlimited Articles

Want More…?

I write articles on blog.devwithjay.com and also post development-related content on the following platforms: