I have a small laravel website that I built for a company on heroku. They had the domain registered with godaddy, so I altered the cname and it seems to work fine when I go to www.example.com.
However, when I go to http://example.com, the naked domain of example.com still ends up at the godaddy error page for a parked domain.
In heroku, I added a custom domain as www.example.com and entered the DNS target I was given.
Do I need to do something different for the naked domain?
Yes, you need to add point DNS add on on heroku for your naked domain to work :
https://devcenter.heroku.com/articles/pointdns
Related
My api.<base-url> subdomain is not configured correctly. I purchased a domain through AWS and hooked it up to my static website running on Netlify. To do this, I set up Route53 to use Netlify's Name Servers. This works fine for the apex domain and https://<base-url> sends me to the static site.
Image of the Route53 hosted zone for this domain
I also have a node instance running on Heroku which I want to be hosted at api.<base-url>. Currently it is accessible by the heroku provided url (<project-name>.herokuapp.com)
I added a custom domain to Heroku for the api subdomain of my Netlify site api.<base-url>, the result of my heroku domains command is:
➜ heroku domains
=== <project-name> Heroku Domain
<project-name>.herokuapp.com
=== <project-name> Custom Domains
Domain Name DNS Record Type DNS Target
api.<base-url> CNAME fitted-lemon-gzwby8exkguturnmh2emy5l4.herokudns.com
And I created a CNAME record on Route53 that points to this Heroku DNS target.
This sort of works, running host api.<base-url> gives:
➜ host api.<base-url>
api.<base-url> has address 104.248.60.43
api.<base-url> is an alias for <project-name>.herokuapp.com.
api.<base-url> is an alias for <project-name>.herokuapp.com.
So it is aliased to my heroku app, but when I go to api.<base-url> directly I get a white page that says 'Not Found', looks like this is on Netlify's side not Heroku? But I'm not sure. I feel like I need to tell Netlify somehow that there is a custom subdomain at api.<base-url> but the only thing I can find in the docs is setting up Netlify's subdomains from other branches of the project, not when a subdomain is hosted elsewhere.
Setting api<base-url> as a Netlify custom domain just ended up routing all the traffic for api.<base-url> to the static netlify site at <base-url> instead of my Heroku app.
I made a few other attempts but nothing has worked so far, I am officially stuck on this. Thank you in advance!
Found it! Figures that it would click 30 minutes after posting.
I had a CNAME on Route53 but this was useless since I was using the Netlify DNS. You'll need to create a CNAME on Netlify that points to the host Heroku gives you.
So my heroku domains gave me the host I needed the CNAME to point to. I created a CNAME record on Netlify - which was not very obvious, I had to click into the badge 'Netlify DNS' in order to find the config.
I was able to create the right CNAME and then have it all work after that.
I recently purchased a domain name with namecheap.com, and added a CNAME record from my Heroku app where I am running the application. I am sure that I added the correct domain name to my Heroku app, and the correct DNS target to my CNAME on Namecheap web settings.
Previously it was working, but this morning I purchased an SSL certificate on Namecheap, and my domain just points to a Namecheap page saying "This domain is registered with Namecheap".
I followed all the steps to properly activate the SSL certificate, and it even says it's activated on Namecheap on the domain I want. Also what's strange is the the Heroku domains appear to have good ACM status.
So on the surface everything seems to be all right, but when you go to my domain my app doesn't show up.
Any idea as to why this is? Also if you have any more information you want to know feel free to ask.
I figured it out. I had to delete the default records on the domain. Initially namecheap sets a reroute, and CNAME for their parking lot page.
These need to be removed so that they don't interfere with the domain routing that you want.
I have an application where users get their own subdomain, like site1.mysite.example. I would like to allow users to register a custom domain that they can point to to their sub domain but I'm having trouble figuring how to configure Heroku and my DNS settings to allow this.
In my DNS settings for my domain I have a CNAME record setup like so:
Host = *
Value = sites.mysite.example
The value here is an app I have running which will translate the subdomain (site1.mysite.example) to figure out which site to load.
I have a CNAME for mysite.com which points to Heroku's DNS site:
Host = sites.mysite.example
Value = mysite.example.herokudns.com
On the domain I'm testing with I have a CNAME record setup like this:
Host = docs.othersite.example
Value = site1.mysite.example - this is the subdomain they get on my site
But for some reason this is not working. If I register site1.mysite.example as the custom domain in my application and I run dig site1.mysite.example I get the following:
;; ANSWER SECTION:
docs.othersite.example IN CNAME site1.mysite.example
site1.mysite.example IN CNAME sites.mysite.example
sites.mysite.example IN CNAME mysite.example.herokudns.com.
When I try docs.othersite.example in a browser I get Heroku's There's nothing here, yet. page. So it seems like Heroku is not loading up my application. I am guessing this is because I do not have docs.othersite.example registered as a domain in my Heroku application, but I do not want to have to register every custom domain. Also, I do not own these domains so I could not anyway.
What am I doing wrong here? Any help is much appreciated. I'm happy to post any more info someone needs or clarify anything.
Heroku does support wildcard domains, so in this case you could add *.othersite.example to your Heorku app's custom domains.
If you need to support different root domains (othersite2.example, othersite3.example) for each user, there's no easy way to support that. You'd need use Heroku's Platform API to programmatically manage custom domains.
I am trying to use my hostgator registered domain on my node.js application deployed through heroku.
I have added the domain to my heroku application through the custom domain feature, and when i type "Heroku Domains" in the console, it shows up with a target of: "photosbysalwa.com.herokudns.com" and a type of ALAIS or ANAME.
When I try to add an ANAME record through hostgator, I try to set the address to "photosbysalwa.com.herokudns.com" but it won't let me submit the record because it says the address must be an IP address.
If you could help me with how to get the domain pointed, that would be fantastic.
Check this video its about how to point your domain name to heroku hosting.
It have godaddy domain name and its the same way to hostgator I think
in the heroku page in the settings add three domains:
1 *.xyz.com
2: xyz.com
3. www.xyz.com
open your Hostgator account and in the DNS Management page add in the cname the host: www and in the point to: your heroku url
https://www.youtube.com/watch?v=kKGSGT7mSnQ&t=9s
I believe this will solve your problem
I am using Media Temple to configure my DNS settings for a domain. I recently launched an application on Heroku and want to set a subdomain of my domain to be the CNAME for the Heroku application. The issue is the DNS editor places a period at the end of the Heroku domain name when I enter it as a CNAME, and Heroku shows an error that this is not a valid domain.
In my DNS settings, I have:
subdomain.domain.com CNAME appname.herokuapp.com
When I save this, it shows up in the settings as
subdomain.domain.com CNAME appname.herokuapp.com.
Any ideas on how to remove that trailing dot?
I ran into this problem the other day when setting up CloudFlare for my Heroku app. "I do not think it means what you think it means."
With Heroku, you have to add domains that your app will be accessible from, even if your managing DNS elsewhere. Here's there documentation for how to do it. Basically, you can do this from the terminal:
cd into your app's directory
heroku domains:add subdomain.domain.com to add the subdomain like you want.
Also, on mediatemple, I think you might need to put just the subdomain part instead of subdomain.domain.com, though it'll probably work either way. As shown on the knowledgebase article from launchrock on adding a CNAME with Media Temple:
"5. In the Name field, enter the part of the address you chose to use for your website with
LaunchRock. For example, if you chose signup.yoursite.com, enter signup in the Name field."