When I add the domain to CF, it works, but none of the mirrored subdomains resolve. I’ve tried adding them as CNAME entries, as A records and none of these options work. Anyone know how to make this kind of set up work?
For reference, this is an old website built on Drupal 7 using Domain Access for 23 subdomains that are mirrored to the main domain.
A mirrored subdomain does what it sounds like. If someone types in the subdomain they actually go straight to the main domain. While this seems redundant, it is how Drupal 7 enables setting up multiple sites via subdomains on one install of Drupal. Drupal recreates the subdomain url to display the unique content for that subdomain.
The main domain, domain.com works fine when added to Cloudflare, but none of the subdomains are. Tried added the subdomains as a CNAME and as an A record to the IP address. Tried Proxied and DNS only. None worked.
I can’t add it to Cloudflare without breaking the site. I’ve needed to remove it in order to get it work again. I’m just looking for some help with configuration to make this work with Cloudflare.
So the whole domain is not on Cloudflare right now?
There is not much to configure. Cloudflare will proxy whatever it receives from the server. What you can do on Cloudflare is redirects and that’s achieved via page rules. Everything else needs to be configured on your server.
It’s easy, make sure your site works fine on its own (also on HTTPS) and only then add it to Cloudflare.
The website does work fine on its own and has been working fine for about 8 years now. Adding to Cloudflare works fine for the main domain but none of the mirrored subdomains work. I’m starting to repeat myself here.
I tried adding each subdomain as a CNAME pointing to the main domain. Doesn’t work. Tried adding the subdomain as an A record pointing the server IP, doesn’t work. Tried making the subdomains proxied and DNS only. Doesn’t work.
Central and Entre-corp are not proxied by Cloudflare, though they both work, but do not have TLS/SSL certificates on them. You need to get them working with HTTPS before you proxy them with Cloudflare.
Unfortunately, it is not possible to add and SSL certificate to this site. When it was built, maybe 8 years ago, SSL certificates were optional. Because of the need to mirror the subdomains to the main domain, an SSL certificate can’t be added to this setup. The site is coming to end of life at the end of 2021 as that is when Drupal 7 will stop being supported but in the meantime, just trying to get this working to cut down on all the bots, etc. hitting the site.
I rebooted my computer and the subdomains are coming up. They weren’t before. So in my mind this can work. The SSL certificate is definitely an issue but the client doesn’t want to do what it takes to rebuild the site so all I can do is limp along like this.
Yes. This has been an ongoing discussion and I’ve tried to make them very aware. I can only let go and at least feel a bit better that it is now working behind Cloudflare.