SSL cert with Cloudflare sudomain


I’m about 2 hours into signing up with netlify. I’m trying to serve static html files using Jekyll.
I’m using Cloudflare to manage my DNS records.

I have a subdomain I’d like to redirect toward netlify. I’ve modified the Cloudflare CNAME record to point to my netlify domain and changed the cloudflare settings to DNS Only.

I can verify the actual record is pointing to netlify in that I can navigate to the jekyll website through by browser. My only issue is during the redirect process I’m getting an SSL certificate error about name mismatch.

I’m experienced in setting up LE certs using dns challenge through ACME, however I don’t know how to enable netlify generate a certificate for me for this subdomain. I’d like to avoid uploading the cert/key manually since the certs need to be renewed every 90 days.

How do configure netlify to generate an SSL certificate for my subdomain. Going through the DNS setup, I don’t see a method how to do this working specifically with subdomains. Honestly I’m not really wanting to change my DNS provider from CF to netlify

Ok - I’ll answer my own question here.


  1. Cloudflare (CF) Setup. Modify your CNAME subdomain record to point to your netlify domain. Make sure that the CF CNAME record has the DNS only option
  2. Within Netlify page - Withing Domain Settings, Add a Custom domain and enter the FQDN of your subdomain – ie
  3. Enable the SSL/TLS certificate for your subdomain. This might take up to 10 minutes to activate

Since I’m using Jekyll, I still had to add a few things
Jekyll setup

  1. Within your production directory (usually the directory that holds the _config.yml file), you’ll need to add a _redirects file. (With an underscore). The contents of this file should be copied from netlify Domain Settings page (Custom Domains) that begins with the header “How to redirect the default Netlify subdomain to your primary domain” (It should be a black text box with the contents.
  2. Within you _config.yml file, you’ll need to specifically add and entry under the include: section, the adds the _redirects file. It should be something like
  - _redirects
  1. Push your _config.yml file to your git repository and then let netlify rebuild and provision your jekyll site.

  2. After a few minutes your site should be available. That’s about it.

Hopefully that helps!

1 Like

thanks for posting this! :tada:!