Hosting dns issue - node.js

I have developed a react/node.js web app and i hosted in heroku with my own domain name.
the domain name that i have added to my heroku includes www like www.example.ca and in godaddy forwarding section i have added htttps://www.example.ca.
the problem is if i now open the browser and type example.ca it wont open my website. neither https://example.ca nor http://example.ca.
i can only open it through https://www.example.ca or www.example.ca. from some browsers it opens in http and some other https.
so confused and i couldnt find a good documentation for this. any help will be appreciated.

GoDaddy doesn't support alias so you will never be able to access https://example.ca nor http://example.ca. You have to use a DNS service (DNSimple or Cloudflare) which support alias or in case you want to stick with Heroku service then choose pointDNS
Here is the flow to configure a domain with pointDNS and Godaddy
1 Add pointdns add-on
2 Add all DNS records to pointdns
3 Replace GoDaddy ns by pointdns NS something like *.pointhq.com
4 Remove forwarding from GoDaddy

Make sure you didn't add www under name.

Related

How to allow CNAME pointed to my server / how to use subdomain for a different server?

We create custom web apps for businesses and for the first time a client of ours has asked that instead of using our subdomain and instead of using a custom domain for their web app they would like to use their own subdomain for a domain currently hosted on another server.
For instance our domain is webapp.com and their domain is business.com. They would like app.business.com to be point to our name servers so we can continue hosting the web app for them.
I know it's possible to do this because we currently have outgoing CNAMEs on our server for help desks, etc, that aren't hosted on our own server but are using subdomains of ours.
Could you help me with what our client has to do on their zone editing side and what we need to do on our WHM/cPanel side to allow this?
NOTE: We had the client create a CNAME for app.business.com. pointed to our nameserver ns1.webapp.com and then we created an add-on domain for business.com and subdomain for app.business.com but when you try to visit app.business.com it gets the "Sorry!" cPanel page.
Thank you!
Alright I figured out how to do it on my own after a lot of testing & thought I'd post here to help others out in case they run across this in the future.
For the server with the subdomain on it have them create an 'A' record for that subdomain pointing to your server's IP address like so:
subdomain.business.com. ((note the extra period at the end is required))
TTL: 14400
Record Type: A
Pointing To: Your server's IP address.
Now on your server's cPanel you will need to create an addon domain for THAT subdomain (ie subdomain.business.com) - not for the actual business.com domain but for the entire subdomain subdomain.business.com with the folder being the root folder wherever you would like it to show.
That worked for me!
The CNAME should not point to your nameserver but your subdomain f.e. client1.webapp.com.
An other solution could be to add the subdomain app.business.com to your server and the client add an A record for the subdomain to your ip.

Client cname pointing to my domain on cloudflare

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

Domain without WWW on Cloudflare?

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.

PaaS DNS Synchronization

I'm not exactly sure if this is more of a DNS question or the nature of most PaaS's.
I purchased a domain from namecheap.com. I wanted to get a WordPress site up and running so I could start development so I went over to openshift, created an account and installed WordPress, which was very easy! Only one problem... I'm having issues trying to sync my domain name from namecheap with the application on openshift. I must admit I've always purchased the domain name and hosting together so I've never had to go this route so I'm not entirely sure this has anything to do with the fact openshift is a PaaS.
In openshift, I have the URL for my application applicationname-account.rhcloud.com and I've added an alias on my namecheap.com account which works for a redirect... If I go to my purchased domain, www.example.com, it will simply redirect me to example-account.rhcloud.com. But I do not want a redirect...
I guess I'm confused as to how you get a domain name that you've purchased from one company to a hosting company. Do I need to modify something on my namecheap account?
This document states that you need to add a bare CNAME record to your DNS setup (may be what you refer to as an alias)
https://www.openshift.com/blogs/custom-url-names-for-your-paas-applications-host-forwarding-and-cnames-the-openshift-way
then add an alias to your Openshift application using the rhc command line tool, eg:
rhc alias add example-account www.example.com

How to add a subdomain on GoDaddy on Azure site

Lest say I have a web application called example.com
everything is ok with it and both www.example.com and example.com redirect to the correct A record "#" defined on the GoDaddy Zone file.
The thing is, that my back office web application is on a different Azure server than the main site (site is on example.com and the back office needs to be on office.example.com).
for that i have created another server on Azure.
example.com is on example.azurewebsites.net
office.example.com is on example-office.azurewebsites.net
(azure management site shows that both server have the same ip)
(Btw, is that what I should have done?)
What I tried was:
1. add "office" A Record on Goddady that redirects the same ip (in addition to #) - didnt work.
2. add "office" CNAME that redirects to example-office.azurewebsites.net - didnt work
In both cases i added the awverify and the awverify.www as followed:
awverify.office is awverify.example-office.azurewebsites.com
awverify.www.office is awverify.www.example-office.azurewebsites.com
Azure Manage Domains doesnt recognize office.example.com
What should I do at GoDaddy's to make it work?
Thanks
you can find solution (godaddy screenshots included) here
https://azure.microsoft.com/en-us/documentation/articles/web-sites-godaddy-custom-domain-name/
CNAME or A records pointing to IP or domain is right solution
adding awverify is needed only if using A record
better solution is to use CNAME - after stopping web service and starting again, you will receive probably different IP addres in azure (or you can use traffic manager)

Resources