How to setup SSL for dev.mysite.com but not mysite.com or www.mysite.com

I’d like to test my move to SSL in my dev environment before doing the move on my live server. dev.mysite.com points to a different IP address than my live site, and lives on different hardware. I understand how to setup an origin certificate and how to configure Apache.

How do I setup Cloudflare’s SSL/TLS settings such that SSL is only enabled for dev.mysite.com?

There are different ways. Since youre Not using SSL right now:

  • go to theCrypto section
  • activate SSL (if not already done)
  • ensure that always use HTTPS and Automatic HTTPS rewrites is disabled

Go to Page Rules

  • Create Page Rule:

dev.domain.com/*
Setting: SSL → Full (or strict, if you have a valid certificate installed)

This should be enough for testing.

Thanks for the details! Understood on everything, except for “activate SSL (if not already done)” in the Crypto section. At the top of the Crypto section, I’m seeing the dropdown with SSL settings of Off, Flexible, Full, and Full (strict), but I don’t want to activate those for the entire domain.

You need that active, or there will be no certificate assigned to your domain.
As long as you don’t force clients to use HTTPS nothing should happen.


To be safe you could also create Page Rules to disable SSL for yourdomain.com and www.yourdomain.com

Something like:

1 Like

Good call on using Page Rules to disable SSL. That’s what I was looking for! Thank you.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.