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
andwww.example.com
. - Updated the DNS with the provided records to redirect
example.com
towww.example.com
. - Uploaded an SSL that covers both
example.com
andwww.example.com
. - Added "secure: always" in the app.yaml.
Here's what happens:
http://example.com
redirects tohttps://example.com
.http://www.example.com
redirects tohttps://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!