Yes!
Cloudflare supports wildcard DNS records, which can be configured as either proxied through Cloudflare or DNS-only.
Can I enable Cloudflare on my root domain (e.g., hostghostexample.com) if it’s an A record?
Yes!
When using Cloudflare nameservers directly, you can enable Cloudflare’s proxy service on A or AAAA records. While Cloudflare can proxy all HTTP traffic, it cannot be used for email services. Special care is required if you’re proxying the root domain to ensure that the MX record is excluded from Cloudflare’s proxy.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^hostghostexample.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ http://www.hostghostexample.com/$1 [R=301,L]
Note: Replace “hostghostexample.com” with your actual domain name in the example above.