My domain was bought from registro.br but it won't allow me to create CNAME entries without a subdomain, such as www. And Openshift seems to allow only CNAME entries.
So when I go to www.mysite.com it works well. But mysite.com won't work.
I heard some people talking about Cloudflare.
How can I make this system to work altogether? Is it possible?
Thanks folks!
My advice is a full-host CloudFlare set up. Set it up via the nameserver route, not a Partner/Business/Enterprise CNAME record; this will also speed up your DNS performance.
Point your nameservers to CloudFlare after set-up, then in CloudFlare DNS point the CName record to Openshift.
Related
I currently have a DNS setup where all content and applications are hosted on the same cloud server - example.com.
The presentation website is on example.com, www is forwarded to example.com with a CNAME and then various internal apps, eg app.example.com, are also forwarded with CNAME records to example.com. NGINX running on my server takes it from there, routing subdomains to the different apps.
I'd like to host the presentational website on an external service, and I'm confused about how to update my DNS config - specifically what to do with my A record.
I'm ok with creating a CNAME for www that will forward www.example.com to my external hosting service. But example.com is still pointing to my own server... and if I have understood correctly, if I forward example.com to www.example.com, then all my apps at eg app.example.com will break.
What are my options for handling this ?
My idea (from searching around) is that if I want example.com to point to an external service, then I should
1) create a new domain api-example.com whose A record points to a server where all my apps are hosted
2) make CNAME records for all my app subdomains on example.com which point to api-example.com
3) forward example.com to www.example.com, and forward www.example.com to the external service.
Will this configuration work ? Is there a simpler way to get the same result ?
Your plan is fine, except for maybe one thing: generally, you can't have a CNAME record for the root (apex) of your domain. This means that your external presentation website hosting will have to provide an IP address, and you will create an A record that will point example.com to that address. Then you can have a CNAME record simply aliasing www.example.com to example.com.
Also make sure that you leave enough time between the steps, to make sure that all DNS TTLs expired so you don't encounter DNS caching issues.
For explanation (and possible workarounds) for domain apex CNAMEing issue, look at https://stackoverflow.com/a/33027309/1145196
Can somebody tell me how I can redirect all subdomains to the root domain in Cloudflare DNS?
I have been looking for a day now without any luck.
I can't use .htaccess because all the subdomains doesn't resolve (They look just like a root domain that haven't propagated) and doesn't return anything, and I don't want to set up hundreds of DNS records for each possible subdomains.
I would like to set up a wildcard dns entry to redirect or at least make all subdomains reachable, so I can either do the rest via the .htaccess, or through DNS.
So how do I make the DNS entry for above requirements?
Thanks.
From the support: Does Cloudflare support wildcard DNS entries?
Cloudflare Free, Pro and Business plan:
We do not proxy wildcard records so these subdomains will be served
directly without Cloudflare performance, security, or apps. The
wildcard domain will have no cloud (orange or grey) on the Cloudflare
DNS Settings page for that reason. If you are adding a * CNAME or A
Record you need to make sure the record is grey clouded in order for
the record to be created.
To get Cloudflare protection on a wildcard subdomain (for example:
www), you explicitly have to define that record in your Cloudflare DNS
settings. First, log into your Cloudflare account and select the DNS
icon. In this example, you would add "www" as its own CNAME record on
your Cloudflare DNS Settings page and toggle the cloud to orange so
the Cloudflare's proxy is enabled.
Unless you are an Enterprise customer, you can't use a wildcard to redirect through Cloudflare.
Make sure the cloud logo is grey to add a wildcard record:
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/
I created an app on Openshift and added aliases.
My registrar doesn't allow me to add a CNAME without WWW. So I started using the Cloudflare DNS servers and added 2 CNAME records. In the records page it looks like this:
CNAME porta8080.com.br is an alias of blog-porta8080.rhcloud.com Automatic
CNAME www is an alias of blog-porta8080.rhcloud.com Automatic
I changed it like 3 or 4 ours ago and the domain status is already Active.
If I go to my website it won't be displayed if I omit the subdomain www. . But works well with www.
I wonder if I can do this with Cloudflare (with and without www.) and/or cloudflare is alrady routing for me. I got a free plan.
Thank you
#edit
Now I got a ERR_TOO_MANY_REDIRECTS error. Any ideas on what could this be?
CloudFlare Partner set-ups usually are done via a CNAME set-up. Unfortunately it doesn't strictly comply with an RFC to support a CNAME record on a root domain, accordingly you can either set-up your own CloudFlare account (you won't get RailGun if your host are not just a normal CloudFlare Partner but an Optimised Partner).
The way around this is either get them to support the Full Host set-up which CloudFlare now support or set-up your own CloudFlare account and use a nameserver install.
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.