Adding new subdomain, data served by my server and not cloudflare

ssl
dns

#1

Hi everyone!

I recently bought mydomain.com and I activated cloudflare via cPanel to serve via HTTPS.

mydomain.com and www.mydomain.com work great (both, http and https).

Here comes the issue now: I would like to create blog.mydomain.com, how do I achieve that?

As per the instructions here, I have done the following changes In cPanel:

  • Created the subdomain.
  • DNS on cPanel looks like:

ORIGINAL
mydomain.com. CNAME mydomain.com.cdn.cloudflare.net.
www.mydomain.com. CNAME wwww.mydomain.com.cdn.cloudflare.net.
cloudflare-resolve-to.mydomain.com CNAME cloudflarearecord.mydomain.com

ADDED
blog.mydomain.com. CNAME blog.mydomain.com.cdn.cloudflare.net.
cloudflare-resolve-to.blog.mydomain.com. CNAME mydomain.com.cdn.cloudflare.net.

In Cloudflare > Crypto > Edge Certificates, I have the following:

mydomain.com (1 host) Universal (type) 1 (certificate)
www.mydomain.com (1 host) Universal (type) 1 (certificate)

I really don’t know how relevant is this particular info, for some reason I believe that blog.mydomain.com should also appear there. I could be wrong though ^^

The error I am getting is that the certificate is self-signed, what leads me to believe that the data is not coming from cloudflare but my server, right?

Is there something wrong in my configuration above? How could I know (in my cloudflare account) if everything is correct?

Thanks for any pointers :slight_smile:

Regards,
EOZyo


#2

I don’t know whether this helps. But when I added a subdomain: I first created a virtual server on my server to host it; then I added the subdomain as an A record and AAAA record on cloudflare’s dns setup (in your case that would be “blog … points to …your origin IP”) and that was it. EXCEPT I had to install an ssl certificate on my own server to include the subdomain. I did this with Letsencrypt. I’m guessing but I think you can order a certificate for your new blog sub domain through Cloudflare and import it into your origin server.