Can I route only a subdomain through CloudFlare?

CloudFlare don't allow this in their Terms of Use. I received the following email from CloudFlare when I attempted this on an image-only subdomain once:

Also note here -- you seem to only be using CloudFlare for this products.xyzmedia.co.uk subdomain. We do not permit CloudFlare to be used only for static file delivery. You will need to have xyzmedia.co.uk or www.xyzmedia.co.uk resolving and proxied by CloudFlare to continue using our service. This is outlined in section 10 of our Terms of Service.

The current version (October 26, 2018) of the terms specifically notes:

The Service is offered primarily as a platform to cache and serve web pages and websites. Unless explicitly included as a part of a Paid Service purchased by you, you agree to use the Service solely for the purpose of serving web pages as viewed through a web browser or other application and the Hypertext Markup Language (HTML) protocol or other equivalent technology. Use of the Service for the storage or caching of video (unless purchased separately as a Paid Service) or a disproportionate percentage of pictures, audio files, or other non-HTML content, is prohibited.


Yes: add the root domain, then you can select which subdomains to route through CloudFlare in the DNS tab, at which point you can disable CloudFlare on the domain and enable it on the subdomains by clicking the cloud icon next to the relevant DNS record.

In this example, I have georgegarside.com through CloudFlare and server.georgegarside.com bypassing CloudFlare, however this can be reversed by clicking the cloud icons on the right.

A gray cloud means that the traffic is not passing through the CloudFlare network.

Source: https://support.cloudflare.com/hc/en-us/articles/200168756-How-do-I-add-a-subdomain-

Tags:

Cdn

Cloudflare