I am trying to set up DNS forwarding on CloudFlare, to my Openshift page (the-domain.rhcloud.com).
But when I go into the CloudFlare DNS settings and try to change the A setting, I get this error:
You entered 'the-domain.rhcloud.com' which is not a valid IP address.
It seems to be asking for a static ip address. It seems that other hosting services can provide a numerical ip address for DNS settings, but I cannot find anything like that on rhcloud / OpenShift.
How can I find my domain's ip address on rhcloud OpenShift? What should basic DNS settings look like on CloudFlare when forwarding to an rhcloud host?
Should I use any of the default A and AAAA settings from my registrar?
It's a bit unusual, but when using services like Openshift/Heroku etc, there is no A record for the domain in your DNS. This is because there is no single A record corresponding to your site or app on the service.
If you've already set up the domain at your registrar using Cloudflare's nameservers (you need to do this!) there should be no need to do anything else at the registrar.
You need to set up one (or more) CNAMEs for the site/app at Cloudlare (if it's a website, you may want one each for e.g. example.com and www.example.com).
Assuming you do need the 'naked' domain and the www version, you'd do this:
Openshift
Make sure you have domains set up for both the 'naked' domain and the www subdomain.
Cloudflare:
Back it up!
Cloudflare lets you export your DNS settings; do this before making any changes.
Naked domain
go to the DNS settings page
choose CNAME from the selector at bottom
enter the-domain in the first field
enter the-domain.rhcloud.com in the second ("is an alias of") field
www subdomain
repeat steps 1-4 from above, but enter www for step 3.
go to the "Page Rules" page
add a new "page forwarding" rule that either:
redirects http://the-domain.com/* to http://www.the-domain.com/$1 or
redirects http://www.the-domain.com/* to http://the-domain.com/$1
choose '301' for the redirect type
If you want your domain name to start with https://www, take a look at the steps bellow that worked for me.
Let's say we want to configure cloudflare and openshift for this domain name: example.org.
Cloudflare
DNS page
I have two records set:
Type: CNAME Name: example.org Value: example-example.rhcloud.com (you should see CNAME flattening sign for this one)
Type: CNAME Name: www Value: example.org
"Page rules" page
Two rules:
http://www.example.org/* Settings: Always use HTTPS
example.org/* Settings: Forwarding url, 301 — Permanent redirect, https://www.example.org/$1
OpenShift
Add one alias:
www.example.org
Related
I have a domain name mydomain.com registered at Google Domain. I would like to use it for a static website in Azure.
I would really love to use my naked domain rather than the www version, but I don't think it is possible since when I try to create a CNAME from mydomain.com, I get CNAME records for the root domain are not supported. If anyone has a solution, I am interested.
Custom domain in Azure portal tells me to create a CNAME from www.mydomain.com to diamnis.z16.web.core.windows.net, which I did.
Now, how do I get traffic from the naked domain mydomain.com to go to www.mydomain.com in Google Domains?
You can do that in google domain dns. Follow the below steps -
After you have done the CNAME mapping for www.chartvibes.com, do as mentioned below -
To configure the naked domain, add a "Synthetic Record", and set up a
"Subdomain Forward." In the subdomain text box, enter the # sign and
nothing else.
Select option to 'Forward path'. That should do the root domain forwarding.
You can refer to the below official link too - https://support.google.com/domains/answer/4522141
I wish to setup Cloudflare so that both mydomain.com and www.mydomain.com will reach the same Elastic Beanstalk host.
I've created a CNAME for the "www" subdomain, it works great.
But how do I handle the mydomain.com DNS root entry? It's currently an A record, pointing to some IP, but in order to point to EB, I need to have a CNAME like "www", correct? If so, is it safe to somehow replace the A record with a CNAME despite the fact this is a root DNS entry rather than some subdomain..
thanks.
All you need to do is add a Page Rule
Match: mydomain.com/* and Redirect (301) to https://www.mydomain.com/$1
Or http if you’re not using SSL. The $1 means to copy the path from the original request.
Delete the A record from Cloudflare DNS Panel
Add a record with type CNAME and value as yourdomainname.com
This doesn't work on most DNS providers. However, Cloudflare has a feature called "CNAME flattening" that allows a CNAME Record to co-exist with other records at a domain's root. In practice, it doesn't act like a CNAME because when someone looks it up, Cloudflare resolves it internally, finds an A Record and returns the value. (This is how Alias A Records work on AWS Route 53, for example.)
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:
I have a domain name (somename.com) registered at godaddy and i am using godaddy DNS Manager. But i am hosting my website with hostinger.com. So i have created a subdomain (sub.somename.com) on hostinger which by default points to same IP as a domain.
Now i have entry on godaddy DNS for my domain and subdomain name which points to hostinger server address where my website hosted. But when i access my subdomain (sub.somename.com) it goes to my somename.com. I have to refresh it to load sub domain page correctly.
Godaddy DNS Entry
domainname -- somename.com -> IP address of hostinger.com
subdomain -- sub.somename.com --> IP address of hostinger.com (same as above)
Hostinger DNS Entry
subdomain -- sub.somename.com --> IP address of hostinger.com(same as above)
Is above entries is correct ?
Should we need to have entry for domain and subdomain both on godaddy DNS ?
Do we need to have a entry for subdomain in hostinger.com also ?
In order to create a subdomain correctly you have to go through 2 steps:
1. Update your DNS records, so they accept your subdomain (sub.somename.com).
You should have these records for your setup:
A: # -> IP of hostinger.com (this is to connect the domain with hostinger)
A: sub -> IP of hostinger.com (only put the subdomain name)
CNAME: * -> somename.com (so that everything before somename.com goes to somename.com)
CNAME: *.sub -> sub.somename.com (so that everything before sub.somename.com goes to somename.com)
There are different types of DNS Records, the one's you mentioned are all A Records, you have to use CNAME Records as well.
2. Creating a virtual host (on the hosting provider)
The previous step was so that the Domain Name Servers know to which ip to point when the subdomain is used. From this side we have to point the subdomain address (sub.somename.com) to a specific folder that contains the different website. Most host providers, when you create a subdomain automatically create a new folder you can put your content at and point at it.
So to answer your questions.
No you have to change your DNS Records so they match the information above. Let me remind you that changes in the DNS Records might take a while to take effect (1-2 hours).
Your DNS entries should be at one place. Usually they are provided by the hosting provider (hostinger in this case), but since they are also provided by GoDaddy as well feel free to update them there.
There is no need to have a DNS entry in hostinger if you update them in GoDaddy.
P.S. Since I haven't used hostinger before, feel free to update me if you have more info, like if you're using CPanel.
If you intend to host a subdomain at an IP different than your main site, the records should look like this.
Main Site (mysite.com)
Type: A
Name(Host): #
Value(Points To): 192.168.1.1
Blog Site (blog.mysite.com)
Type: A
Name(Host): blog
Value(Points To): 192.168.1.2
As a reference, you only need an A record to host a subdomain. CNAME record is an alias. www records are usually CNAME records to the root domain as they are the same page.
Hope this helps!
I have mysite.eu working fine, and I have registered a new site mysite.co.uk which I would like to forward to mysite.eu. According to various articles on the net, this is a pretty straightforward procedure yet, I can't make it to work since when i type mysite.co.uk I get a "This site can’t be reached www.***uppies.co.uk’s server DNS address could not be found". Here are my current settings:
and the .co.uk site hosting settings
Do i also have to edit the DNS settings maybe?
Error massage you have see is about domain name and DNS, not about forwarding.
If you have recently register new domain, than DNS record of .co.uk site may be not propagated to all DNS servers and you have to wait about 24 hours.
Also check that you have www record of your new .co.uk domain:
Check for no-www record:
nslookup <you domain name here>.co.uk
Check for with-www record:
nslookup www.<you domain name here>.co.uk
If you need www part for domain you can add in your domain's registration panel.
Turns out the domain registar had not completed the .co.uk domain registration properly.