How to secure all the different domains on Heroku with Godaddy Domain? - reactjs

Okay So I am trying to host a react application with Heroku using a Godaddy domain
I am facing 3 Issues
Issue 1: Site is not secure when visited through some address.
Here are the different addresses
https://www.example.com This is SECURE.
www.example.com This is NOT SECURE. And on safari browser does not put https in front of it automatically.
Issue 2: : Forwarding the following domains to main domain: https://www.example.com
http://example.com
http://www.example.com
example.com
www.example.com
https://example.com
Issue 3: After setting up the forwarding in the steps above, the pages with addresses like example.com/getstarted does not get forwarded to https://www.example.com/getstarted
I have looked at all the solutions currently available on Docs as well hundreds of stackoverflow posts.
I have a CNAME set up as www to the example.herokudns.com
I also have a forwarding setup in godaddy to permanently forward example.com to https://www.example.com
I am also using ACM (Automatic Cert Manager) SSL in Heroku (Paid Version)
Any advice is welcome and fast please.

Related

Redirect https:// to https://www on Google App Engine

I'd like to redirect https://example.com to https://www.example.com for my PHP project on Google App Engine.
What I've done so far:
Added and mapped the custom domains for both example.com and www.example.com.
Updated the DNS with the provided records to redirect example.com to www.example.com.
Uploaded an SSL that covers both example.com and www.example.com.
Added "secure: always" in the app.yaml.
Here's what happens:
http://example.com redirects to https://example.com.
http://www.example.com redirects to https://www.example.com.
The website resolves properly for both URLs, but I'd prefer that the secure naked domain redirects to the secure www subdomain. I've researched all of the related posts on Stack Overflow, but can't seem to find anyone having the same issue.
Please help. Thanks!

How do I redirect www to non-www in Google App Engine

My domain is bought from Godaddy and migrated to Amazon AWS. Previously we were using AWS and hosted our static website in AWS bucket but recently we moved to Google cloud platform and hosted our static website and wp blog in app engine. We manage our DNS in Amazon Route 53 and point dns to GAE. The problem is that our website can be browsed with both www and non www domain. Here, We wanted to redirect all the www to non-www domain. This cannot be done in Route 53 because we have pointed dns to GAE and added example.com as A record and www.example.com as CNAME. Thus this also doesn't solves the problem. We are not much sure how to write code in app.yaml file to redirect. We have searched a lot but haven't found any solution yet.

Google Apps / App Engine: https version of naked domain does not redirect

I have the following scenario:
Website is hosted in AppEngine and we want to force it to always load in https. (we use secure:always in app.yaml)
Domain is managed in Google Apps. We have uploaded SNI certificate and all looks good
In Google Apps we set the redirect of the naked domain to the www version of it
The following URLs all work:
http:// website.com (redirects to https:// www.website.com)
http:// www.website.com (redirects to https:// www.website.com)
https:// www.website.com (the URL of the app)
However this URL does not redirect and gives an error:
https:// website.com
Is this a bug or is this a settings issue?
As it is right now, SSL for naked domains does not work directly and this is an expected behavior. This is being tracked as issue 10802. Also, have a look at this question, where they found a workaround to use Naked domains and SSL through Google Apps. An alternative solution is proposed here.

Google Apps Custom Domain SSL configured but connection fails

I've followed the steps on https://cloud.google.com/appengine/docs/ssl and https://support.google.com/a/answer/2644334. I have a custom domain, have correctly uploaded the certificate. Everything seemed to be working, but then an hour later every https: connection fails with ERR_CONNECTION_CLOSED (in Chrome). How can I debug this?
My www CNAME record is ghs.googlehosted.com
I'm accessing the site via the www subdomain https://www.example.com
Google Apps shows as serving SNI only for the assigned url www.example.com
Billing is enabled
www.example.com is set as a custom domain in cloud console
http://www.example.com works fine
https://app-engine-id.appspot.com works fine (but I think this is irrelevant)
there are no errors in cloud console logs

Google AppEngine: multple domain urls for a site

I have a website running on google appengine. Url being say: www.mysite.com
recently I acquired the domains www.mysite.co.in and www.mysite.org
Question 1: Can I attach these new domain urls to the same server so that .com, .org and .co.in all work and how?
Note: I am NOT looking for redirecting these new urls to .com url.
If you do not need SSL (only http) then you can simply add it in the Developers Console: https://console.developers.google.com/project/your_project_name/appengine/settings/domains
If you need SSL (= https) then you must first add the domain as an alias domain in your Google Apps account. Then you can go back to above link and map it to AppEngine instances.

Resources