We are hosting our website on CloudWays Digital Ocean server, and our application is a PHP Stack.
That means the domain name isn't using ns1 ns2 as usual, but is using CNAME record to point to the PHP stack.
We need to start using CloudFlare CDN with our website, and I already know CloudFlare is implemented by changing the nameservers ns1 and ns2 to their nameservers.
But we're not using nameservers on our domain.
So, how do we start using CloudFlare, how do we set it up so it starts receiving traffic from the domain that points to our PHP Stack with a CNAME record?
Your domain will always have a nameserver option. Once you point your DNS to CloudFlare by changing your nameservers, you can then from CloudFlare point your CNAME records through CloudFlare to your Digital Ocean server.
If you are asking how to set-up CloudFlare without changing nameservers via a CNAME set-up, you either need to be an enterprise customer or need a company who is a CloudFlare Partner to set this up for you.
I think this question needs to be updated. Now, Cloudways offer a Cloudflare Enterprise plan for their customers (integration with a few clicks) and when it comes to a free Cloudflare plan then read this guide: https://www.cloudways.com/blog/wordpress-cloudflare-cdn/
Related
I have a domain name registered with GoDaddy, e.g., "mysite.com", and have followed the Azure instructions to map that domain's CNAME and A records to my Azure WebApp, i.e.,
I then updated GoDaddy's nameservers to point to cloudflare so cloudflare is now in charge of my DNS records, i.e.,
Within cloudflare I have SSL set to Full and the certificate appears to be active
and my DNS records in cloudflare pointing to my azurewebsites domain name, i.e.,
It has been over 36 hours since I updated the nameservers, but as you can see from cloudflares DNS records screenshot above (see Status), all traffic appears to be routing around cloudflare directly to Azure, i.e., I'm not hitting cloudflare. Putting domain mysite.azurewebsites.net in whatsmydns also shows everything pointing to Azure.
What have I missed in the setup to ensure all traffic routes through cloudflare?
Probably a little late but you need to click on that grey cloud icon in Cloudflares settings. The icon will then go orange and the traffic will be routed through Cloudflare.
CloudFlare appears to transparently replace all CNAME records to A, so this CNAME record is not visible for Azure. You have to change nameservers of your domain to its original ones (provided by GoDaddy in your case), add CNAME through GoDaddy DNS panel, wait for Azure to see it, approve domain in Azure, and only then migrate to CloudFlare.
I have been figuring out how to accomplish this for a day now and read through a bunch of tutorials but could not make it work the way I wanted.
So my current set up is that I have a website that I registered the domain with Namecheap, let's call it mywebsite.com. The main app is hosted on Heroku, so both mywebsite.com and www.mywebsite.com is set up as URL redirect and CNAME to point to the heroku address. For example I have a CNAME record for www pointing to www.mywebsite.com.herokudns.com. This works fine and I would like to keep it that way.
I recently registered for a SiteGround service to set up my wordpress blog. I would like it to be accessible at blog.mywebsite.com. Most of the tutorial I have seen is to either migrate the domain to siteground so the wordpress site can point to the main domain or to point the namecheap DNS nameservers to the siteground one which I don't want to do neither because I do not want to redirect the traffic away from the heroku app.
I have tried to set up NSRecord according to Namecheap doc, I added the record for blog to point to ns1.siteground1111.com (the nameservers siteground provided) but when I entered blog.mywebsite.com it said server not found. I am on a SiteGround shared IP plan and I can see the blog if I visit ns1.siteground205.com/~myusername. However creating A record or CNAME requires bare IP and domain so I wonder if that's the issue.
My question is if my approach was correct in trying to set up the subdomain by creating a NSRecord on Namecheap pointing to SiteGround's nameservers. Or is it necessary for me to pay extra and get a dedicated IP address from SiteGround for me to point my A record for blog to.
Alternatively, I also have extra domains I am not using and I could set SiteGround blog to those domains and perhaps create a CNAME record for blog.mywebsite.com to www.myotherwebsite.com? That sounds like an overcomplication of the issue but I am not sure what to try at this point.
Really appreciate any help!
In Namecheap admin for your domain name mywebsite.com:
(1) Create an A record:
[type, host, value, TTL]
A, #, 1.2.3.4, 1min
where 1.2.3.4 is the Siteground IP address of your account.
(2) Create another A record:
A, blog, 1.2.3.4, Automatic
A client of ours has the domain client.com
Our application is at superapp.mycompany.com
We want the client to be able to access our application via their own subdomain, like: superapp.client.com.
Normally we'd just tell the client to add a cname for superapp and point it to superapp.mycompany.com. Then on our server (IIS) we'd bind their domain to our app and everything would work as intended.
However, we can't replicate this functionality when our mycompany.com domain is managed via cloudflare.
When we navigate to superapp.client.com we get the following error page:
Error 1001
What happened?
You've requested a page on a website (superapp.client.com) that is on the Cloudflare network. Cloudflare is currently unable to resolve your requested domain (superapp.client.com).
Is there any way that Cloudflare can be used in this fashion?, this seems like a pretty standard set up for a multi tenant application that supports custom domains.
We don't need all the protection that Cloudfront offers for these client domains, but we want to use the Cloudfront nameservers for out application (mainly for fast switching of DNS records in the event we migrate servers, etc).
Any help is appreciated.
I hope it's not too late. But just found a way to do so.
You just need to add your client's domain (Add site in Cloudflare) to your account.
You don't need to change client domain's NS. So in your Cloudflare panel this domain will showing as "Pending Nameserver Update".
Next step is add the CName record to this domain.
Although the NS of client domain is not changed to CF, but CF has a lookup record as CName for it.
Hope it helps.
Just in case someone arrived here with same issue as me. Here is the answer. For short, no that won't work.
Since Cloudflare is a reverse proxy for the domain that is on Cloudflare, the CNAME redirect for the domain (not on Cloudflare) wouldn't know where to send the traffic to.
Ref: https://support.cloudflare.com/hc/en-us/articles/360017421192-Cloudflare-DNS-FAQ#CloudflareDNSFAQ-CanICNAMEadomainnotonCloudflaretoadomainthatisonCloudflare
If you don't need the CDN benefits, you can still use Cloudflare nameservers to manage your DNS zone and keep your current configuration. Just make sure the CDN is deactivated for the target subdomain in your zone (superapp.mycompany.com in your case).
You can tell if the CDN is activated or deactivated for a subdomain by looking at the cloud icon on the right of each DNS entry: if the cloud is orange the CDN is active, if it is gray, it isn't.
Cloudflare also supports external CNAME resolution in their CDN infrastructure, but it's only available for its Enterprise customers:
https://support.cloudflare.com/hc/en-us/articles/217371987-Managed-CNAME
I have a VPS server on OVH, it just has its own ip and Reverse DNS.
So i basically always used domain trough cloudflare and pointed a record to my VPS IP.
I don't want to use cloudflare anymore, I've bought the DNS Anycast option for my domain and pointed a record to my VPS IP, but website just stopped working.. What should i do ?
I have 3 more domains, i would want to make some ns1.mydomain.com ns2.mydomain.com zones based on my main domain, so i could use it for all my other domains, How can i do that?
ps. In case if this info is needed, all my domains are in OVH too.
1) You could revert back to previous state. Other than that, it is difficult to troubleshoot DNS issues without real domain name.
2) DNS is crucial part of infrastructure, you don't want to host that by yourself unless you know what you are doing.
This is a definitely a high level question so please take that with a grain of salt. I'm using GoDaddy as my registrar to point to my github pages website. I've uploaded the CNAME file and the URL resolves correctly. I've then set up CloudFlare on my site and am confused as to why I need to switch DNS servers to resolve to an IP address. So now, when the root finds the Top Level Domain for .com, will it now point to the CloudFlare DNS vs the GoDaddy one? In effect am I now just paying GoDaddy for the address and allowing CloudFlare to resolve the IP from the Top Level Domain Servers? Just trying to get an idea of what the CloudFlare DNS server is actually doing and why I had to switch out the GoDaddy one.
CloudFlare is taking over managing the DNS for the domain when you switch to our nameservers (GoDaddy is still your registrar/host). CloudFlare works via authoritative DNS.