Openshift - alias on domain name not showing - url

So i have gone through all the suggested tutorials on mapping my domain to open shift app and this is where i am.
I assume that i have configured my CNAME correctly as when i type my domain name into a browser i am taken to my open shift app.
ie www.mydomain.com takes me to my open shift app...
So thats correct...
I then set up an alias on my open shift app i.e. www.mydomain.com
i run rhc app show (myOpenshiftapp)
and i am shown the following...
Domain: myDomain
Created: Aug 31 2:36 PM
Gears: 1 (defaults to small)
Git URL: ----
SSH: -----
Deployment: auto (on git push)
Aliases: www.mydomain.com
Therefore i assume that its configured correctly, yet when i type my domain name in a browser i get taken to my open shift app and i see my .rhcloud.com name showing not the alias ???

You have to use https://pointhq.com/ for integartion of your openshift app which provide free nameserver for one domain. any problem with that let me know:)

I had the same problem for the longest time.
To fix it, in openshift, I added both versions of my domain name: www.domainame.com AND domainname.com (without the WWW)
Also, in my CNAME entries on my domain name hosting I had the following:
domainname.com -> points to app-name.redhat.com
www.domainname.com -> points to app-name.redhat.com

Related

Adding domain name to heroku hosting gave me unknown urls in the DNS Target

I am trying to point my heroku url to my domain name
$ heroku domains
=== limo-rent-vancouver Heroku Domain
limo-rent-vancouver.herokuapp.com
=== limo-rent-vancouver Custom Domains
Domain Name DNS Record Type DNS Target
─────────────── ─────────────── ────────────────────────────────────────────────────────
www.limorent.ca CNAME evening-springs-1jaz70fwn4eivw1ettgqmsfb.herokudns.com
limorent.ca ALIAS or ANAME deep-taro-5a3t14qryjbz96eh1f9ks084.herokudns.com
*.limorent.ca CNAME behavioural-gorge-epekec9gk8s8byxtqdqhjrmt.herokudns.com
In the DNS target there's three different url. I know that it should be this one https://limo-rent-vancouver.herokuapp.com/ to work.
Can someone help me.
This is absolutely normal. Heroku has been changing the DNS targets these past few years.
Each domain now has it's own target, to prevent abuse cases such as removing a subdomain from an app, but not removing the DNS entry.
Then, anyone could create an app and add your own domain to it, spoofing you.

Setting up domain from domain.com with Heroku

I have several domains with domain.com , and it used to be if I want to set up a Heroku app with a domain bought at domain.com, all I have to do is point the cname to [name-of-heroku-app].herokuapp.com . And add the domain in Heroku.
But now, if I add a domain at Heroku, the DNS target will be [domain-name].herokudns.com . My older apps on heroku with a custom domain however have a DNS target of [name-of-heroku-app].herokuapp.com .
Am I doing something wrong? Can't seem to get the domain to work properly. Any help would be appreciated.
Nonetheless. Set the CNAME to [name-of-heroku-app].herokuapp.com and not [domain-name].herokudns.com.
I would wait a few hours as it depends on many circumstances how fast the change happens.
[domain-name].herokudns.com should be used, when you want to add SSL:
The DNS Target can be different from the Heroku Domain and different for each custom domain. For instance, if you add Heroku SSL on your application, your DNS target will be .herokudns.com, instead of .herokuapp.com.
Source

Redirecting my Heroku app to a custom domain on BigRock

I have added my domain to heroku using heroku domains:add.
Now when I run heroku domains in my terminal, I get
=== sampleapp Domain Names
sampleapp.herokuapp.com
sampleapp.me
www.sampleapp.me
I'm unable to configure BigRock's DNS to point to the Heroku-supplied DNS Target (which is sampleapp.herokuapp.com).
There's a domain forwarding option in BigRock, but when I use it, it shows my Heroku app in an iframe.
In the DNS management panel, I see A records, CNAME records etc., but I have no understanding of what they mean. I have, however, added a www cname with the value shown in the image below.
Can someone please tell me how I should go about doing this? Thank you.
I had to remove my A records for WWW to get it working.
For naked domain, CNAME is not recommended.

Setting up a custom domain with Heroku and namecheap

I've followed all the instructions on https://devcenter.heroku.com/articles/custom-domains to get my custom domain set up, and it still isn't working.
On Heroku, I have the following domains:
myapp.herokuapp.com
example.com
www.example.com
And on Namecheap, I have the following settings:
HOST NAME | IP ADDRESS/URL | RECORD TYPE
# http://example.com URL Redirect
www myapp.herokuapp.com. CNAME(Alias)
When I run: "host www.example.com" in my terminal, I expect to get "www.example.com is an alias for myapp.herokuapp.com". Instead, I get:
"www.example.com is an alias for myapp.heroku.com"
I can't figure out why it is pointing to myapp.heroku.com, because I have only specified myapp.herokuapps.com.
Does anybody know why this is happening?
Update note: Heroku and Namecheap change their interfaces every so often. This answer may have outdated screenshots, but it will be updated over time. See these updates below.
I've just done this myself so I thought I'd chime in as the answer doesn't illustrate how to get both www.example.org and example.org working. Heroku also changed its admin interface a bit.
Namecheap
First, login to Namecheap.
Go to Domain List and click "Manage" for the domain you're configuring.
Set both record types to CNAME (Alias) and enter your <name>.herokuapp.com in both url-boxes (# and www).
(PS: If they're not there, click the "Add new record" and add them there.)
Next, head over to Heroku
Login and choose your project from the list. For this example, we're choosing the "Lakka" project.
On the project page, click Settings
Scroll down and find the Add domain section
Enter your example.org and click Save.
Click the button again, and input your www.example.org and click Save.
That's it, You're done! Now when you enter example.org or www.example.org in your browser, both will show your Heroku project.
In this example, http://lakka.herokuapp.com would be accessible (after DNSes update) also on http://lakkatracker.com and http://www.lakkatracker.com.
(If you want to redirect traffic from www.example.org to example.org, which is a good practise, you can use the record type "URL (Redirect)" for the www host name)
It can take some time before your DNSs recognize the changes. You can try using a proxy for testing, like Anonymouse, if your changes aren't reflected immediately.
1) Go To Namecheap, and go to the domain you want to manage.
2) On the left sidebar, click "All Record Hosts", NOT any of the other jazz other tutorials tell you. No DNS pointing changes are necessary. It's easier to use alias.
3) Once you do, you'll see a line starting with "www" as a CNAME (Alias) option. Fill this in as your heroku app's domain name example.herokuapp.com
That's it for namecheap.
4) Then at heroku settings, under "domains", enter your purchased domain name you wish to be displayed.
That's it!
It's as easy as letting heroku and namecheap know about both domain aliases.
Credits to this blog:
http://blog.romansanchez.me/2013/06/08/point-namecheap-domain-to-heroku/
Update:
Apparently, heroku will only allow sites with www. prepended. To have a true root domain without www. will take some extra ninja hacking.
Namecheap updated its interface. New screenshots to supplement other good answers:
If you want all the traffic to point to http://example.com then do this:
and set both example.com and www.example.com in Heroku settings.
Then test everything by using http://anonymouse.org
Set up a namecheap config that looks like this:
And a heroku config that looks like this:
And you're good to go!
Depending on your application, it may be a result of not using an SSL certificate. If you are trying to use an SNI SSL on the free dyno it is not going to work. In my case, I upgraded to hobby dyno and it immediately worked via the ACM.
Here are 2 possibilities,
You had previously pointed the DNS records to myapp.heroku.com and the changes haven't propagated yet
This could be an artifact of the change Heroku made move apps from the heroku.com domain to the herokuapp.com domain, but I'm unsure of how this could happen or why it would happen for you; records for my apps all point directly to herokuapp.com, but I'm not using NameCheap.
You could try registering a different (free) domain with an entity like .tk to see if this is specific to NameCheap.
I linked a namecheap domain to my Heroku app today and it is now a bit different, so here is what I did.
Add the domain (purchased on namecheap) to your Heroku app like www.example.com. The 'www' is important. Copy the generated xxx.herokudns.com link.
Now go to your domain settings on namecheap. Click on Advanced DNS.
Add the following two records:
Type: CNAME Record, Host: www, Value: the copied URL from step 1.
Type: URL Redirect Record, Host: #, Value: http://www.example.com
Save and maybe you have to wait for up to 30 minutes.
I couldn't get both www.example.com and example.com to work, so one of the workarounds I found was to set the CNAME and # to www., and then on the Domain tab, set "Redirect Doman" from example.com to www.example.com.

Wildcard Domains with GoDaddy

I've read Heroku's documentation:
http://devcenter.heroku.com/articles/custom-domains#wildcard_domains
They say to add:
To use with a custom domain, configure your DNS registrar to point *.yourdomain.com at yourapp.heroku[app].com.
In GoDaddy, you can't do:
*.yourdomain.com
in the name field. I've heard you can get around that by doing:
**
However, I tried that, but it's not working.
When I run this in console:
host anysub.yourdomain.com
I get:
Host anysub.yourdomain.com not found: 3(NXDOMAIN)
What could be the problem? I'm guessing the wildcard isn't set up in GoDaddy correctly?
(FYI: I swapped out yourdomain.com for my actual domain.)
Go to GoDaddy's DNS Manager, the first table on top should say A(Host), click the button under that first table that says Quick Add. In the first text field, enter an asterisk (*), in the second one, the IP address to redirect to (the same one you have for the # record on top). Click "Save Zone File" on top-right and confirm.
This creates a catch-all record to anysub.yourdomain.com.
Good luck.
I just tried it today and it seems that it's now possible to create wildcard cnames in GoDaddy.
GoDaddy > ... > DNS Manager -> Zone File Editor (Edit Zone)
Then under CNAME (Alias) panel > Quick Add
Host: *
Points to: yourapp.herokuapp.com
Or
Host: *.dev.herokuapp.com
Points to: yourapp.herokuapp.com
Then click on "Save Zone File" and wait a few minutes.
I remember getting this "Host not found 3(NXDOMAIN)" error myself not so long ago. Not anymore.
Any subdomain other than those listed explicitly in either A or CNAME are redirected as expected.
I had this challenge recently and I tried all of the above, but none of them worked for me. After days of surfing I found a solution.
If your app is hosted on heroku, you'd usually not have a static IP Address and so the wild card A record will not work as the IP keeps changing
GoDaddy > ... > Manage DNS > ADD record
Record Type is
CNAME
Host
*
Points to your heroku app
Note: you can't do this if you already have a wild card A record
go to ->goddady cpanel->select subdomain
Create a Subdomain
Subdomain add *
*
in domain
yourdomain.com
then enter create

Resources