Hashnode Custom Domain via Cloudflare
In this article, we will discuss the step-by-step configuration on how to point hashnode blog to cloudflare custom domain or subdomain.
- Log in to your cloudflare account cloudflare. If you don't have an account yet, you can create one here.
- 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.
- Navigate to DNS Tab
- 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 .
- Hooray! Done mapping the CNAME Type, once you save it there should be a newly added record on the table.
- Go to hashnode and log in.
- Navigate to Blog Dashboard
- 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.
- 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.
Awesome! ! ! you already know how to enable cloudflare custom domain for your hashnode blog. Hope it helps. 😉
Thank you! Happy hacking ... 💻