Let me keep this as simple as possible. I have looked at a bunch of other posts related to this but haven't found an answer :(. I am hosting my web app on Heroku and using Gandi as my domain provider.
Note: The top answer from this post is what I used as my basis.
A few days ago I set up web forwarding on Gandi so that my mydomain.gg forwards over to www.mydomain.gg. I also set up custom domains in Heroku. It looks like this:
*.mood.gg wildcard.mood.gg.herokudns.com
www.mood.gg www.mydomain.gg.herokudns.com
mood.gg mydomain.gg.herokudns.com
I then went into Gandi and added these to my zone file so it looks like this:
# A 217.70.184.38
* CNAME mydomain.gg.herokudns.com.
www CNAME www.mydomain.gg.herokudns.com.
The A tag is there for the web forwarding where the IP points to a Gandi IP. Heroku changes IP addresses frequently, which is why I use CNAME.
Cool!
This all worked perfectly for 3 days, where I didn't touch my zone file or Heroku app for those 3 days at all.
So here is where the oddness begins. I upgraded my Heroku server to a more expensive plan and pushed some new code to it as well. A few hours later, my root domain mydomain.gg breaks and doesn't forward over to www.mydomain.gg. If I go directly to www.mydomain.gg it works perfectly.
So my question comes down to, where did this break? I never touched my Gandi zone file. All I did was push to my Heroku server and it seemed to break the web forwarding with Gandi. How did pushing to Heorku cause something to mess up with Gandi where all I'm specifying is a Heroku DNS that didn't change at all?
Another thing is, Gandi says they don't support naked domain CNAMEs which is why I use web forwarding. But then whats the point of this line in my zone file:
* CNAME mood.gg.herokudns.com.
Any help would be appreciated!
Related
I have some struggles setting up a custom domain for my rails application. I followed the "Summary of steps" on Heroku
For example: i bought the domain "mydomain.com". I added the domain by running heroku domains:add "www.mydomain.com"
And gave all Informations shown when running heroku domains(Domain Name; DNS Record Type; DNS Target) to my Domain-provider. But it seems like these are not enough informations therefore my provider is asking for a so-called "host" or subdomain, for which the DNS target is to be deposited.
So my question is what is this "host" and why is it needed?
EDIT:
So to clarify, the Problem was that i did not really knew what heroku is doing when running heroku domains:add
"Host" probably means the bare domain, i.e. mydomain.com, excluding 'www' at the front or anything else.
The subdomain is the bit that comes before that.
In doing domains:add www.mydomain.com you are asking heroku to respond to www.mydomain.com.herokuapp.com, so you need point your DNS to that.
Hence, on your DNS provider you probably need a CNAME record like www.mydomain.com.herokudns.com
That basically means send everything that they receive on your actual domain to that one, instead, which is the one that heroku serves your app on.
Different DNS providers do use slightly different terms, so you need to get the concepts clear of what you're trying to achieve, then you'll work it out. Also, delays in records updating can make it annoying to debug when you're trying to get this working.
I'm having hard times trying to redirect a custom domain on Heroku, have you guys had the same problem?
Configured custom domain on Heroku (already tried different variation):
The server asks for Server Name, so I add the only thing Heroku returns as the DNS:
Below there are two domains, the first says "servfail" (the current app domain), the second "nxdomain", which I've just bought it's fine.
Any advices? Should I deploy on another server? Thanks for the help!
You need to update the DNS servers of your domain fariba.cl to fariba.cl.herokudns.com at the domain registrar's end (from where you purchased the domain)
After that it will work fine.
For those facing DNS redirecting problems in Heroku, I suggest this Add-on that you can add to your app in Heroku (for free): PointDNS
With it you can get many types of adresses, including IP and/or n1.server n2.server and so on, in which you can add the address to your domain settings.
I'm having some problems configuring the DNS settings for my custom domain to work correctly on Heroku.
I have set the DNS records as follows:
Host Type Points to
example.com WR www.example.com
www.example.com CNAME example.herokuapp.com
www.example.com.au CNAME example.herokuapp.com
However, the 'www.example.com' domain sometimes fails to load on my computer, as well as my client's phone. It seems rare for this domain to fail (it works fine on everyone else's computers that I've asked), but the fact that it doesn't work on mine and my client's computers is a problem.
However, the '.com.au' domain (and the heroku one) always works. Why is this?
Is there anything wrong with the configuration above? I followed the 'custom domain names' article on heroku to reach this configuration (I don't have much experience with DNS, unfortunately). The DNS provider I am using does not support ANAME or ALIAS so I went with the above config instead.
Thanks. Any help in getting the '.com' domain working on every device would be appreciated.
I'm not really sure, it may be a lot of things, DNS caching and other stuff.
But if you don't have a lot of DNS records, I suggest you use a heroku add-on like PointDNS (https://addons.heroku.com/pointdns) as it supports ALIAS.
Just bought a new domain on https://iwantmyname.com/. For the purpose of this post lets assume the domain is example.fm
I set up domain forwarding where I got example.fm to point to example.herokuapp.com. Everything seems to work, but after the site is forwarded, the browsers textbox displays the old example.herokuapp.com domain instead of example.fm
I already added example.fm to heroku with heroku domains:add example.fm, but that didn't seem to change anything.
Any thoughts?
So the people at iwantmyname.com have been extremely helpful.
It turns out that I only did URL forwarding, which isn't the recommended way of setting up a domain through them.
They have a specific system with dealing with heroku here: mysite.herokuapp.com
I got rid of the forwarding and set up my domain completely through Heroku custom domain DNS setup.
I'd like when a user types the domain YOURSITE.com to not go into a loop and crash. I've searched for answers for a couple days now and can't seem to find the exact one.
Error from chrome: This webpage has a redirect loop - The webpage at http://YOURSITE.com/ >has resulted in too many redirects. Clearing your cookies for this site or allowing third->party cookies may fix the problem. If not, it is possibly a server configuration issue and >not a problem with your computer.
Background:
Rails 3.2.14 App with Ruby 2.0.0
Domain bought with godaddy
Hosting on Heroku with both domains setup www.YOURSITE.com and YOURSITE.com
Using AWS with route 53 and S3.
Let me know what relevant code you need to help or if this is something that is being caused by AWS or the like. I've tried an reversed several different things via my code, but can't seem to find anything that works.
you should log into your Heroku dashboard, click on the app and then click on the "Production Check" button. This will help you check for DNS issues among other.
Check your DNS Zone file with godaddy. How are you redirecting the sub domain www to the host domain?
On your rails app, how is your route.rb file handling the incoming traffic? do you have any redirection there?
Hope that helps..
There is a very good write up that goes through configuration settings between AWS, the domain registrar (in my case godaddy), and heroku here: https://devcenter.heroku.com/articles/route-53#naked-root-domain I used this originally when I set up my site.
I wish I could say I know what the problem was, but I'm not totally sure what it was. My guess is that it had to do with APEX domains being unsupported by AWS and/or Heroku, and therefore I needed not to try to redirect. Here's the settings that worked for me:
Godaddy domain mysite.com, transferred my DNS stuff to AWS (I had done that prior to the problem)
Heroku: you can either use the CL or you can access the settings for your app online. In either situation I set up my domains to be mysite.com and www.mysite.com
AWS: This is a little trickier. You need to make sure the settings for Route 53 and S3 are exactly like in the tutorial link above. Your mysite.com bucket in S3 must redirect to www.mysite.com.
This isn't ideal and there are probably ways to get around this using different companies for hosting/DNS services, but with the Heroku/AWS combo this is what I had to do to stop the redirect loop.