Deploying a custom domain with Heroku and Domain.com - web

I'm new to web dev and this would be my first proper deployment so apologies if this is a basic question. After following the steps on Heroku and Domain.com, my app is not showing at the desired url: www.rocketcreative.agency
Heroku
I've set up a basic web app (a draft version atm) on Heroku, and the code is working fine on https://hidden-sierra-22116.herokuapp.com . I've followed the Heroku instructions to generate a DNS target (cubic-orange-7jtaz36102kt9f8dir53koko.herokudns.com) for a domain I own (www.rocketcreative.agency) Heroku Dashboard Screenshot
Domain.com
I added the DNS target to Domain.com as a CNAME (with 'www' as the host name). I've waited 24 hours for the changes to propagate, and DNS checking sites indicate that the DNS has propagated. I've spoken to Domain.com support and they said everything appears to be set up correctly. Domain.com DNS Screenshot
Terminal:
In the terminal, when I input host www.rocketcreative.agency, it returns www.rocketcreative.agency is an alias for encircled-horseradish-4mpqnlzar9say364tz3hgy80.herokudns.com.
Browser Results for www.rocketcreative.agency
Safari: 'Safari Can't Find The Server'
Chrome: 'www.rocketcreative.agency’s server IP address could not be found. DNS_PROBE_FINISHED_NXDOMAIN'
I imagine this is a really basic question but if anybody could help that would be great. If there's any other info I need to provide please let me know. :)

Hold the phone! I've solved this one, but I'll leave the question up incase anybody encounters the same. Ran the Heroku DNS Diagnostic tool and there were some issues with https:// - fixed by running: heroku domains -a hidden-sierra-22116 heroku ps:resize web=hobby heroku certs:auto:enable heroku certs:auto It said 'cert issued' and now the url works

Related

www.example.com is not openning while example.com is working fine how to resolve it?

when i am trying to access my domain with www it shows an error like "This site can’t be reached
www.sustainabletourism.co.in’s server IP address could not be found.
Search Google for sustainable tourism co
ERR_NAME_NOT_RESOLVED"
and working with out wwww.
all dns records are set correctly
plz help me
thanx
As you mentioned DNS is configured corrent, than its is most probably due to wrong setup of virtual host for web server. Depending of the web server in use(eg. Apache or nginx or some other) you can correct this.
In the server alias, you need to add both www and without www of your domain.

Custom domain does not work on Heroku app url

I am trying to link my heroku app to my domain.
The image below shows that my heroku is pointing my my domain
https://pbs.twimg.com/media/Dnu7GK_UcAAd7vE.jpg:large
but when you visit my domain
https://cleveroscar.com
it loads up my markdown file instead of my app,
but on my heroku url the app is working perfect
https://young-castle-28382.herokuapp.com/
I am a self-taught developer so please excuse my unprofessional questions
Here is the right way to point your hosting to your domain name
Did you do them?
heroku domains:add example.com
heroku domains:add www.example.com
heroku domains:add *.example.com
This is to point your domain name from heroku side
Here is a youtube video to make it easier https://www.youtube.com/watch?v=kKGSGT7mSnQ&t=29s
Please let me know if this does work

Heroku App with Namecheap Domain Not Working

I have tried everything that has already been suggested on this site and others.
The Normal Way
Add my domain website.info to Heroku's "Domains and certificates".
Change the CNAME record to website.info.herokudns.com with the host www.
Leave the redirect record to be Host #, http://www.website.info.
Result:
"No Such App" comes up for Heroku.
The WWW way
The same thing as normal, except I added www.website.info to Heroku and removed website.info.
"This site can't be reached. www.website.info's server IP address could not be found."
Adding through the CLI
Installing heroku cli to my Git Bash: npm install -g heroku-cli
I try heroku domains:add website.info -a websiteapp.
"Domain already added to this app."
Tried accessing it. Same thing: "No Such App".
Removing the Redirect
Same thing as the normal way, just without the redirect.
"This website.info page can't be found" HTTP ERROR 404
I used to do this all the time when I was learning how to build web apps. Worked flawlessly. Did Heroku change something for free dynos? Do I need to run SSL or something?
At the very least, I can redirect the domain to the website.herokuapp.com domain, but I would rather not do that.
I've just had the same issue and tried all the methods you have tried plus more. In the end how got my custom domain to work was to set my namecheap Domain settings to Custom DNS.
elle.ns.cloudflare.com
rudy.ns.cloudflare.com
From there i used the www.customdomain.com format on heroku and set the rest up on Cloudflare as follows:
On the DNS Tab
Type Name Content TTL Proxy status
CNAME www myapp.herokuapp.com Auto Proxied
On the SSL/TLS Tab select Full
On the Page Rules Tab
If the URL matches:
customdomain.com/
Then the settings are:
Forwarding URL
301 - Permanent Redirect
/www.customdomain.com
After i applied those settings everything worked perfectly. I hope this can help anyone facing this issue in the future.

configuring heroku hobby dyno with a namecheap domain at root level

This question is highly similar to this, but barely different:
configuring namecheap domains with heroku
Here is what I have (for the purposes of hiding the original site, I have omitted its name for the string 'asdf'):
A namecheap domain titled as follows: asdf.com
A herokuapp running on a dyno that is hobby level that also has ACM set for automatic certificate management. It is running at https://asdf.herokuapp.com/ and this link works and gets my pushes from github integration. It is awesome :)
I want to link these up so that instead of having my site as https://asdf.herokuapp.com it would instead be https://asdf.com, so that is why I went and bought the namecheap domain for it, but linking these together I have failed at every opportunity. I have tried many different patterns but unfortunately I'm unknowledged on this layer of things. Here is something I have tried, but does not work:
On Heroku: Create a custom domain of: asdf.com
Heroku then supplies me with: asdf.com.herokudns.com
I then go into namecheap, and remove any and all possible cnames or redirects.
I create a new CNAME | host: www | target: asdf.com.herokudns.com
When trying to hit the site, I get this error:
ERR_NAME_NOT_RESOLVED
If I try changing CNAME host to # on namecheap, I get:
ERR_SSL_PROTOCOL_ERROR
Any help is greatly appreciated, and if more information is needed just ask.
Thank you.
I am experiencing the same issue. I've contacted Namecheap and Heroku both for support. This is what I've come up with, but my domain is still not resolving.
Since you're pointing www.mollydwellness.org at your app, you'll need to make sure you've added that to your Heroku config (currently you only have the non-www version assigned):
$ heroku domains:add www.mollydwellness.org --app mollydwellness
Once that is added, you should receive a new DNS target that you'll need to use to update your CNAME record.
$ heroku domains
=== mollydwellness Heroku Domain
mollydwellness.herokuapp.com
=== mollydwellness Custom Domains
Domain Name DNS Record Type DNS Target
────────────────────── ─────────────── ────────────────────────────────────
www.mollydwellness.org CNAME www.mollydwellness.org.herokudns.com
mollydwellness.org ALIAS or ANAME mollydwellness.org.herokudns.com
Namecheap Config
Type Host Value TTL
CNAME Record www
www.mollydwellness.org.herokudns.com.
5 min
URL Redirect Record
#
http://www.mollydwellness.org/
Unmasked
I am told to give it another 30 minutes before contacting support again. It's been 45 minutes and still not resolving.
Very confused, probably just going to deploy it myself to a VPS because that would be easier at this point. I went with Heroku to save myself time, but it appears there can be no shortcuts. More help from the community would be great.
the only thing you need to do for dns, is going to heroku, setting the following on the custom domain :
*.mywebsite.com
mywebsite.com
www.mywebsite.com
on Namecheap you do the following configuration:
CNAME Record # myapp.herokuapp.com. 1 min
CNAME Record www myapp.herokuapp.com. 1 min
URL Redirect Record # https://www.myapp.herokuapp.com Unmasked
URL Redirect Record www https://www.aipredictor.herokuapp.com Unmasked
and you are done. that covers all of the possible scenarios.

domain name does not open the website, redirects to default IP instead of opening www

I recently changed NS of one domain to another host and created a domain using Helm Control Panel.
The problem is that when I type domain name (ie. www.MyDomain.com) instead of opening the coresponding website, it opens host webmail page which is served by smarter mail.
I have cleared dns cache, rebuilt and updated it. also I removed the domain and added it again.
Pinging the domain name returns server's IP address and it's up.
The hosting OS is windows server 2003.
I appreciate any comments to solve the problem.
Edit 1:
Though this was a long last headache, I solved the problem by removing domain's DNS entry alongside with all alias domains attached to it directly in DNS Server console, restarting server and then rebuilding DNS Zone via Helm Control Panel. I'm not sure if this was the best practice but it seems there was a mix of domain's DNS, alias domains' DNS, Hosting software, Caching problems.
Edit 2:
Actually this error was not about the DNS stuff, it is a failure of Helm Control Panel adding/removing alias domains. To share the experience, I Add a answer to this question.
This was not a DNS error.
I found the answer when examining IIS where i noticed the website was stopped.
Forcing the website to start, this error message poped up:
IIS was unable to start the site, another site may already be using the port you configured for this site.
Further investigation revealed that one same domain alias has previously added to another domain/host.
Removing this alias from IIS > Website Properties > Website > Advanced > Advanced Website Identification, fixed the problem.
What led me to assume a dns problem mistakenly was that default IP of server is set to mail server by default. so, when a website is stopped the domain points to mail server.
Hope this help for future.

Resources