Skip to main content

Command Palette

Search for a command to run...

How to create your own Domain name for Hashnode

Domain registration using GoDaddy & configuration via Cloudflare

Published
β€’3 min read
How to create your own Domain name for Hashnode
A

Web Developer +15 years, Bug Bounty Hunter +5 years, Email: contact@therceman.dev

This article will guide you through the setup & configuration of your custom Hashnode domain name.

Let's begin...

Domain registration on GoDaddy

1) You have to come up with your desired domain name

Note: This is the hardest part of this tutorial πŸ˜…

Let's imagine that you have chosen the following domain name mynickname.dev

2) Go to https://godaddy.com, enter your domain and click Search

3) If the domain name is available - add it to your cart and hit Continue to Cart

1A.jpg

4) In the second section uncheck the box Start your website for FREE

Note Additionally you can enable Full Domain Privacy & Protection (recommended)

2.jpg

5) On the final page you need to remove Standard SSL since Hashnode & Cloudflare will set up their own life-free SSL certificates.

Note You can change 2 Years to 1 Year - it will be cheaper to start.

3.jpg

6) Continue to checkout and pay for the domain


Domain registration on Cloudflare

1) Navigate to https://www.cloudflare.com/ and create your account

After creating an account click on the section named Protect your internet presence

3B.jpg

2) Enter your domain name and hit Add site

3C.jpg

3) Select Free plan and hit Continue

3D.jpg

4) Click on the newly created domain name

4B.jpg

5) Copy Nameserver 1 and Nameserver 2 URL's from the config page

5BB.jpg


Changing nameservers on GoDaddy

1) Navigate back to your GoDaddy account, go to the home page and click on your domain

6.jpg

2) Click on DNS and select Manage Zones from the dropdown

7.jpg

3) Search for your domain on the next page and click on it

8.jpg

4) In the Nameservers section click the Change button

9.jpg

5) Check I'll use my own nameservers and enter copied Nameserver 1 and Nameserver 2

10.jpg

6) After ~5-30 minutes you will receive an email that your domain is ready, you can go back to your Cloudflare dashboard and check the status

11A.jpg


Hashnode setup for custom domain

1) Go to your Hashnode account, click your profile image and select Blog Dashboard

12.jpg

2) Scroll down and click the Domain button

13.jpg

3) Enter your domain name or blog subdomain for your domain and hit Update

Note In this example we are using the blog subdomain. e.g. blog.mynickname.dev

14.jpg

4) On the next page with configurations, you need to copy the Host name & Value fields.

15.jpg


Cloudflare final setup for Hashnode domain

1) Go to your Cloudflare account, select your domain and then click the DNS button

2) Click the Add record button, select CNAME as Type.

3) Put copied Host name value into Name field and Value value into Target field

4) Click on Proxy status to set it to gray and Save

16.jpg

After ~ 5 - 10 minutes go back to your Hashnode account and check the status of your domain

Screenshot_1.jpg

If everything is OK - you can now use it


Thank you for your time, Have a nice day!

Best Regards, Anton (therceman)

Find me on Twitter

A

Hi i manged to do this, and this is working perfectly fine, but when i want to access my blog without www prefix, i got a ERR_SSL_PROTOCOL_ERROR. I have already installed SSL previously, on my server, and this redirection is not working at this moment. I have also made www.mywebsite.com and mywebsite.com to point to same ip address in my DNS record, so should i just wait some more to be propagated or i made some mistake ? All this stuff was done on AWS Amazon Lighsail instace

A

Hi, Alen!

I've tested your blog domain. This is a really interesting situation.

Your main domain & www subdomain seems like pointing to Hashnode normally.

However, the certificate that has been given by Hashnode is valid only for www.devopsengage.com

Hard to say where you've made a mistake (or it is something from Hashnode side)

I can recommend you to create a special subdomain for Hashnode blog, like blog.devopsengage.com

And create a redirect from your main website devopsengage.com to blog.devopsengage.com (while you don't have any other content)

For example I am redirecting my domain *.theceman.dev to my Github page, and blog.therceman.dev is connected to hashnode

A

Okay, issue resoled with the SSL certificate, now, i need to figure out how to redirect www .devopsengage.com to devopsengage.com. I have A record for www .devopsengage.com to redirect traffic to devopsengage.com since address without prefix is now primary address, but it's not working, i need to figure out redirection on AWS. Thank you for your time and assistance Anton (therceman)

Tutorial

Part 1 of 1

All types of tutorials (except #development & #infosec topics)