How do I set up a custom domain with Cloudflare?

  • For today’s example of setting up a custom domain with Cloudflare we will be using: newsletterhover.online 

Cloudflare will act a little differently than other typical domain providers and will act more as a third party service that sits on top of your already existing domain provider. You wouldn’t buy a domain via cloudflare but rather route it through cloudflare for more security. 

You must use a subdomain like "www" or "blog" or another of your choice.

Once done, we can forward root domain traffic to your subdomain with these instructions (this is so that domain.com -> www.domain.com without issues).

If you are using Cloudflare, you can use this A record to do so with these instructions.

If you are not using Cloudflare, you can set up a 301 or 302 redirect from within your DNS provider's settings.

We’ve also created a general overview video on custom domains here: 

By default, we will host your content on your-publication.beehiiv.com and send your emails from your-publication@mail.beehiiv.com.

If you'd like to host your site on a custom domain or set up a custom domain for email sending, we have created a seamless process to make that possible.

 

Note: Custom domain support is only available for users on one of our paid plans.

 

Tech Note: In order to set up a custom domain for use with beehiiv, you must own the domain and you must have the ability to modify its DNS settings.

 

Setting up a custom domain for your website means that readers will now visit www.yoursite.com instead of your-publication.beehiiv.com to subscribe to your newsletter and view your content.

You can use whatever subdomain you like but it is common practice to use "www". For example, your site would likely live at www.yoursite.com.

Let us walk you through 4 core steps to start setting up your very own custom domain on cloudflare. 

  1. Add your website domain to cloudflare
  2. Verify Domain Ownership
  3. Configure the domain to be used for web
  4. Setting up a custom domain for email sending

 

A. Add your website domain to cloudflare

1. Go to dash.cloudflare.com

 

2. Click on Websites

image34.png

 

3. Click on Add Site

image45.png

 

4. Enter your website domain you would like to add and click "Add Site"

image65.png

 

5. Select your plan or continue with their Free tier

image42.png

 

6. Cloudflare will do a quick DNS scan to pull over existing DNS settings (if you have any). It sometimes will not catch everything so you may have to manually move over certain DNS records.

image48.png

 

7. Review DNS records (if any) you would like to import

image4.png

 

8. Click on Continue

image25.png

 

9. You will now want to copy these two Cloudflare Nameservers and paste them into your current domain provider settings. This will route your current domain hosting and point everything to Cloudflare.

image29.png

 

10. In this example, we will replace the two nameservers in Hover

 

11. Click on EDIT

image28.png

 

12. Paste input

image23.png

 

13. Go to dash.cloudflare.com

 

14. Click on Click to copy

image10.png

 

15. Go to www.hover.com

 

16. Paste input

image5.png

 

17. Click on SAVE NAMESERVERS

image53.png

 

18. Click on NAMESERVERS (2)…

image37.png

 

19. Go to dash.cloudflare.com

 

20. Click on Done, check nameservers

image38.png

 

21. Click on Finish

image2.png

 

Now that we have re-pointed your domain from your original domain host to Cloudflare we can continue the normal domain setup in beehiiv below. 

 

Important Note: It may take up to 24 hours for Cloudflare to propagate the revised nameserver changes. This will have to be completed before continuing to the steps below. To check this status go to your “websites” section in Cloudflare and view the domain in question’s status. In the example below it still shows “Pending Nameserver Update” so you would need to wait until it propagates. 

image31.png

 

Once it is active it will look like this:

image66.png

 

B. Verify Domain Ownership

1. Go to app.beehiiv.com

 

2. Click on Settings

image62.png

 

3. Click on Publication

image12.png

 

4. Click on Domains

image47.png

 

5. Click on Add Custom Domain

image6.png

 

6. Enter your domain here with the "www" first.

image44.png

 

7. Click on Add Domain

image59.png

 

8. You will need to add this TXT record to your DNS setting in Cloudflare

image21.png

 

9. Go to dash.cloudflare.com

 

10. Click on the domain you would like to add to beehiiv.

image31.png

 

11. Click on DNS settings

image9.png

 

12. Click on Add record

image58.png

 

13. Click on TXT record type

image35.png

 

14. Add the Name & Content value from beehiiv

image57.png

 

15. Click on Save

image3.png

 

16. Confirm you have successfully added the TXT record

image20.png

 

17. Go to app.beehiiv.com

 

18. Click on Verify

image1.png

 

19. Once verified you will see the green check mark.

 

image60.png

 

20. Next, we will add your domain for email sending starting with "mail"

image43.png

 

21. Click on Add Domain

image59.png

 

22. You should now see both domains successfully added for "mail" and "www".

image61.png

We recommend you set up a second domain within your beehiiv account that you can use just for sending. 

Typically people don't want to send from a @www.domain. We want to encourage @mail.yourdomain.com.

By simply just clicking on add domain again you can just type in your desired subdomain and click “add Domain”.

Instead of putting www.yourdomain.com you can put “mail”, “email” or “newsletter” .yourdomain.com and then use that specifically just for sending. You will want to do that before setting up your custom domain for email sending below in step C. 

 

B. Configure the domain to be used for web

1. Go to app.beehiiv.com

2. Scroll down to the "Web Domain" section and click on Select Custom Web Domain button

image27.png

 

3. Select your custom domain with the "www"

image15.png

 

4. Click on Configure Domain

image39.png

 

5. You will be prompted with a CNAME record to add to your Cloudflare DNS settings

image63.png

 

6. Go to dash.cloudflare.com

 

7. Click on Add record

 

image54.png

 

8. Select the CNAME record type

image7.png

 

9. Type "www"

image16.png

 

10. Add the beehiiv cname value "cname.beehiiv.com" provided

image24.png

 

11. Click on Save

image55.png

 

12. You should now see your new CNAME record added. You may need to wait up to 10-min for it to propagate

image30.png

 

13. Go to app.beehiiv.com

 

14. Click on Verify Setup

image14.png

 

15. Once verified you will see the green check next to "Live"

image17.png

 

16. Go to www.newsletterhover.online

 

17. To test simply go to the domain and it should be live

image56.png

 

C. Setting up a custom domain for email sending

1. Scroll down to the "Email Domain" section and click on the "Select Custom Email Domain"

 

2. Click on Select Custom Email Domain

image41.png

 

3. Select your domain with "mail"

image51.png

 

4. Click on Configure Domain

image46.png

 

5. Click on dropdown trigger

image19.png

 

6. Click on Verify

image52.png

 

7. You will now be provided with 3 CNAME records to add to your Cloudflare DNS settings to finish your "Email Domain" setup

image50.png

 

8. Go to dash.cloudflare.com

 

9. When in Cloudflare and adding each of these 3 CNAME records you will want to ensure the "Proxy Status" toggle button is turned off. Otherwise you will see an error when trying to add a new CNAME record.

image49.png

 

10. Once added click Save and repeat for remaining CNAME records provided

image11.png

 

11. Once finished you should see all 3 CNAME records added within your Cloudflare DNS settings

image32.png

 

12. Go to app.beehiiv.com

 

13. Click on Verify Setup

image26.png

 

14. Your custom "Email Domain" is now verified!

image33.png

 

15. Last step is to set your email from name. Click "update email"

image18.png

 

16. Enter your desired email "From" name

image22.png

 

17. Click on Confirm

image40.png

 

18. Your "Email Domain" is now fully verified and setup

image8.png

 

If you have any questions about your SPF, DKIM, and DMARC records read this.

Was this article helpful?