First time web developer can't get heroku godaddy and cloudflare to work together

I am a first time web developer that recently finished creating my first site and am now trying to get it on the web. I deployed it via heroku as that was the application the tutorial I was following used and then purchased a domain from godaddy for the actual site to live on. I acquired an SSL via heroku and attempted to forward the domain on godaddy but could not get it to work no matter what I tried. I found a stackoverflow post that mentioned using cloudflare so I created an account and am using it for hosting but still have the same problem. What I am trying to do is to simply get: https:// www. example. com
https:// example. com
www. example. com
example. com

all to point to the same secure url of https://www.example.com . Currently that is the only one that displays as secure while the rest show as Unsecure. Let me know if there is any information I can provide that would be helpful.

Thanks

Hi @cgr09 ,

Can you share the actual domain name? if it’s working on https://www.example.com, you should make sure you have enabled ‘Always use HTPS’ in the SSL/TLS section of your Cloudflare dashboard which should deal with the http urls. Then you probably want to redirect the root domain to www with something like this:

All of this will only work if your site s proxied through Cloudflare, which I am assuming it is.

The domain name is https://www.aboutthatwedding.com

I do believe I have that ‘Always use HTTPS’ in the SSL/TLS section switched to on. I’ll try following that tutorial you provided and give an update if it works for me. Thank you for the quick reply!

No problem, although that won’t work, currently. Your site isn’t using Cloudflare - the nameservers still point to GoDaddy.

This is so frustrating. I changed the nameservers on godaddy to the ones provided by cloudflare and sometimes it will show as cannot show dns settings since they are provided elsewhere and other times it will show the dns records as before and say it is using the default nameservers. I just tried changing it again but got a server timeout

Now it is saying “We can’t display your DNS information because your nameservers aren’t managed by us.” and it is displaying the cloudflare nameservers

The nameservers do now point to Cloudflare, but it may take a little while for everywhere to see the change. If you configure the page rule as in that tutorial I posted earlier, it should work soon.

Ok, thanks! I’ll do that now. How long should I wait to verify that the changes are working?

It can take up to 48hrs, but is usually quicker than that.

Both links are now secure but www.aboutthatwedding.com masks the url while aboutthatwedding.com shows my heroku url. Any idea what I might be doing wrong here?

Without the www, it redirects to www, then shows an “Offline for Maintenance” message.

The site is offline for maintenance but it shows https://desolate-peak-35339.herokuapp.com/ in the url. I was hoping it would still show aboutthatwedding in the url

Sorry, I don’t see that.

Maybe it has something to do with my cookies. I just tried it on mobile and got the correct url displaying so this is only happening on my desktop.

1 Like

Just cleared my cookies and now everything works. Thank you so much!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.