When you create your Hashnode blog, we provide a free yourdomain.hashnode.dev subdomain for you. However, you can set up your own yourdomain.tld domain or blog.yourdomain.tld subdomain to your Hashnode blog.
In this guide, you will learn how to accomplish this alongside some additional specific guides for different domain DNS providers.
Log in to your Hashnode account.
Click on your profile picture at the bottom-left corner of the page on desktop screen or top-right corner on mobile screen.
- Click on the Blog Dashboard option from the popup modal to access your blog's dashboard.
- Navigate to the DOMAIN tab and enter your domain without the www or https:// prefix in the text field provided. Then click on the Update button to proceed.
- If your DNS provider supports CNAME record, head over to your DNS provider and add a CNAME record where the hostname is @, and the corresponding value is hashnode.network. This CNAME record will point your domain or subdomain to Hashnode's IP address.
It's not recommended to use the CNAME record at the root level (e.g., yourdomain.tld) unless your DNS provider supports CNAME flattening as this will affect your domain's MX records and email service.
- If your DNS provider does not support CNAME flattening, add an A record at the root whose value is 18.104.22.168. However, you will lose the benefits of our global CDN and edge caching with this approach.
Here is how to setup custom domain for your Hashnode blog using the most popular DNS providers:
Still not sure if your DNS provider supports CNAME flattening or when to use CNAME or A record? Here is a quick summary to guide you:
- If you are setting up a domain at the root level (e.g., yourdomain.tld), and your DNS provider supports CNAME flattening, use a CNAME record**.
- If you are setting up a root domain and your DNS provider does not support CNAME flattening, use an A record.
- If you set up a sub-domain (e.g., blog.yourdomain.tld), use a CNAME record without any worries.
|DNS Provider||Supports CNAME Flattening||Use CNAME Record (Root)||Use A Record (Root)|
|Oracle Dyn Managed DNS||No||-||✅|
|Amazon Route 53||No||-||✅|
|Google Cloud DNS||No||-||✅|
|IBM Domain Name Services (DNS)||Yes||✅||-|