Follow

Follow
Hashnode Custom Domain via Cloudflare

Hashnode Custom Domain via Cloudflare

Christian Pelayo's photo
Christian Pelayo
·Apr 24, 2022·

2 min read

Play this article

Table of contents

  • Cloudflare Configuration
  • Hashnode Configuration
  • Conclusion

In this article, we will discuss the step-by-step configuration on how to point hashnode blog to cloudflare custom domain or subdomain.

Cloudflare Configuration

  1. Log in to your cloudflare account cloudflare. If you don't have an account yet, you can create one here. image.png
  2. In my case I already obtain my custom domain from godaddy and mapped it to cloudflare. If you already have a custom domain then start mapping it to cloudflare by clicking Add a Site. And navigate to your newly added custom domain. image.png
  3. Navigate to DNS Tab image.png
  4. Hence we are using Cloudflare for our DNS provider which supports CNAME flattening. We can also use A record but there is a disadvantage to it, you will lose the benefits of the global CDN and edge caching of the hashnode if you will use this approach. In this instance, I used the subdomain of my main domain on this configuration. So if you are using your main domain you can directly use that one, for instance, yourdomain.com in step 5. Note: Make sure to disable DNS Only Proxy status. For more information go visit this hashnode documentation . image.png image.png
  5. Hooray! Done mapping the CNAME Type, once you save it there should be a newly added record on the table. image.png

Hashnode Configuration

  1. Go to hashnode and log in. image.png
  2. Navigate to Blog Dashboard image.png
  3. Once you are in the Blog Dashboard go to Domain and click Custom Domain tab. Provide the custom domain that we map in the cloudflare, in my case I'm using a subdomain. image.png
  4. Alright! We are done mapping our custom domain both cloudflare and hashnode then you will wait for the three icons DNS config, SSL, Status to turn green. In my case, it takes a while (5 - 10mins) to populate my custom domain. image.png

Conclusion

Awesome! ! ! you already know how to enable cloudflare custom domain for your hashnode blog. Hope it helps. 😉

Thank you! Happy hacking ... 💻

References:

Did you find this article valuable?

Support Christian Pelayo by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
 
Share this