1

I am hosting a website on Google Cloud, and I have mapped a custom domain name to it, myurl.com

When I type https://www.myurl.com or https://myurl.com, the URL appears correctly in the browser bar.

However, whenever I access the site through HTTP (http://myurl.com, http://www.myurl.com), the browser bar shows the generic URL https://something-appspot.com.

I have tried setting up Cloudflare and activating the option "Always Use HTTPS" and also separately creating a redirect rule (301) from *.myurl to https://www.myurl.com - but nothing is working, I keep getting the appspot URL.

I have tried clearing caches and using multiple devices to make sure that the problem is not on the client side.

How could I get all requests, no matter the protocol, to show https://www.myurl.com?

  • 3
    Better remove always use https settings from cloudflare and setup redirection rule on your web server for http to https. – Sunil Bhoi Nov 13 '17 at 6:55
  • If using GCP HTTP(s) LB, currently there is no existing feature to redirect HTTP to HTTP(s). However, There is a feature-request in place to support this. As @SunilBhoi mentioned, you can setup redirection rule on the webserver to redirect HTTP traffic to HTTPS. – N Singh Nov 15 '17 at 16:59
  • Thanks both, see below. The Cloudflare solution works just fine now - it was just an issue with DNS change propagation. – alexcs Nov 15 '17 at 21:59
0

This now works.

The DNS configuration change in my domain name provider had not propagated. If anyone finds this problem, make sure you wait up to 48 hours after making changes to your DNS configuration.

Cloudflare's HTTP to HTTPS auto-rewrites work just fine - the appspot URL appears no longer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.