I'm using google cloud platform to host my site and namecheap for the domain name. I want any traffic that hits https://www.example.com to redirect to https://example.com.
I currently have http://www.example.com and http://example.com redirecting to https://example.com from using DNS URL redirects and having secure: always
as a handler in my app.yaml file (for ruby on rails).
I dont know how to have https://www.example.com redirect to https://example.com. I've tried adding a .htaccess
file but couldn't get it to work so maybe there is a configuration I can have in the app.yaml file or some other way for this to work.