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