Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subdomains with CloudFlare

I'm using CloudFlare in my website and it works perfectly. Problem is, I decided to host my static files like JavaScript, CSS, etc. in static.example.com and I don't know how to set up the subdomain.

I already tried adding a CNAME record (static is an alias of example.com) and it didn't work, and as a A record (static points to IPAddress) where IPAddress is the IP address that both www and example.com use.

I'm I doing something wrong? I've waited about an hour for any DNS propagation problems and still doesn't work.

like image 759
federico-t Avatar asked Mar 18 '12 06:03

federico-t


2 Answers

If you have added the subdomain in your CloudFlare DNS settings (settings->DNS settings), then it should start propagating out after a few minutes or so. If you're still having issues with the subdomain, please contact CloudFlare with the domain name so we can look at it.

like image 135
Damon Billian Avatar answered Jan 03 '23 11:01

Damon Billian


I had the same issue until I realized I had to click on the greyed out cloud on that row to activate Cloudflare on the subdomain. This is what it currently looks like:

enter image description here

The instructions at the top of the page clearly say you have to do this, but I'm not one of those read the manual types for simple tasks. I guess what would have really got the point across was some sort of notice the very first time I added a subdomain on my account.

Once you've clicked the icon, then the activated proxy will be indicated like this:

using proxy

Oh well, hope this helps somebody else.

like image 41
Gerry Avatar answered Jan 03 '23 12:01

Gerry