I have a Google App Engine project. On this project I have setup a custom domain and an SSL certificate. Therefore, I can use https://www.mysite.xxx
, http://www.mysite.xxx
and just the naked domain mysite.xxx
.
Is it possible to permanently redirect the last two to always use the secure https://
domain using the developers console or do I just have to redirect in the code?
To redirect a site permanently, one should use a 301 redirect. This type of redirect is best for SEO purposes and also informs the search engines that the site has moved permanently. If you change your domain name and want to point to a different URL, a 301 redirect is your best choice.
There are two ways to fix these errors; Replace the redirect chain with a single 301 redirect. Instead of Page 1 > Page 2 > Page 3 > Page 4, the redirect becomes Page 1 > Page 4. Replace internal links to redirected pages with direct links to the final URL.
So you can add "secure: always" to your yaml file
https://cloud.google.com/appengine/docs/python/config/appconfig?hl=en#Python_app_yaml_Secure_URLs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With