Address bar redirects for https and some paths

63 views
Skip to first unread message

Daniel Young

unread,
Sep 30, 2018, 8:58:00 PM9/30/18
to Google App Engine

In the browser address bar in chrome/firefox if I type in 'example.com/full/path'

It redirects to https://www.example.com. If I type the full path (https://www.example.com/full/path) in the address bar there is no problem.

I have https required in app.yaml

- url: /.* script: myapp.app secure: always redirect_http_response_code: 301

However, some shorter paths work in the address bar, if I type in 'example.com/help' it routes fine to the https://www.example.com/help.


I can't tell if the issue is in app.yaml, the dns records, or somewhere in a browser settings.

Daniel Young

unread,
Oct 1, 2018, 12:52:17 AM10/1/18
to Google App Engine

Amit (Google Cloud Support)

unread,
Oct 1, 2018, 5:59:20 PM10/1/18
to Google App Engine

Hello Daniel


As you referred to the issue discussed in this Stackoverflow link, I went through a couple of cases related to “xxx domain is already mapped to a project “ . In order to solve this, you would need to use the API which will let you overwrite the existing mapping, however, please keep in mind that doing this will probably stop other products for serving as if the domain is mapped on another App Engine, that app will no longer serve from this domain.


You can use the following steps in order to execute the API:


1) Go to this link.

2) Fill out the request form and enable OAuth2.0 Under the request body on the id parameter, put your naked domain.

3) Execute the command, which will require you to authenticate with Google

4) To enable Google's built-in SSL support (Optional): Select your subdomain from the table of custom domains under App Engine settings and click the "Enable Managed Security" button.


I found this solution worked for many people, so I would recommend you to try this. If you still having this issue, Please open a private issue in issue tracker. Please provide the output of this [1] command in the body including detailed description of your issue. Which will allow us to investigate your project in depth.


[1] gcloud info --anonymize


Daniel Young

unread,
Oct 1, 2018, 11:09:21 PM10/1/18
to Google App Engine
Thank you for the response.  I believe I know what is happening now.  I am getting redirected twice and in the process I'm losing the path.  Now I'm trying to figure out if the first redirect is with my DNS record and the second is with app engine perhaps.

Fantasizr__Create_your_own_fantasy_league_out_of_ANYTHING__and_Securing_Custom_Domains_with_SSL_ _ _App_Engine_standard_environment_for_Python_ _ _Google_Cloud.png

edgaral...@google.com

unread,
Oct 2, 2018, 10:06:58 PM10/2/18
to Google App Engine
- Note that Google Groups is reserved for general product discussions and not for technical support. For further technical support it is recommended to post your detailed questions to Stack Overflow[1] using the supported Cloud tags, for example App Engine[1]. 

I would also suggest to provide more details on the configuration. One thing that could be happening would be that there is another handler for that specific path /help as if it would have passed through the /.* handler, it would have been redirected as well. 

Also I am not too certain of the issue at hand, do you need it to be redirect to https://www.example.com when going to the path '/help'? 

Edgar (Google Cloud Platform Support)

unread,
Oct 2, 2018, 10:25:58 PM10/2/18
to Google App Engine
Here is the Stackoverflow link for App Engine tagged issues.

Reply all
Reply to author
Forward
0 new messages