I have been searching an answer this redirecting problem. There are many similar question but I still cannot find how to solve.
I have set my domain from GoDaddy for my GAE application as below:
Set CNAME for www to ghs.googlehosted.comdomain follow to: https://cloud.google.com/appengine/docs/domain
Enable my naked domain by setting A and AAAA records follow to: https://support.google.com/a/answer/2579995
From this step both of my naked domain and my www are working perfectly.
However refer to the 'Site Setting' of 'Google WebMaster Tools' it is advised to decide a preferred domain either www or naked domain and set 301 redirect to the preferred one. So I decided to set my naked domain as my preferred one.
In my domain setting at GAE and my account at GoDaddy I deleted CNAME for www record and create at GoDaddy 'New Subdomain Forward' of www to http of my naked domain with type 301 (Permanent). However now my www domain come with this error:.
404. That’s an error.
The requested URL / was not found on this server. That’s all we know.
I checked my naked domain is still work. Could anyone advise what I have been misiing?