Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE Error 404 after setting redirect www to naked domain on GoDaddy

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?

like image 854
Chetabahana Avatar asked Nov 17 '14 07:11

Chetabahana


1 Answers

Finally I found solution how to solve this domain redirecting problem.

I came to this help article: Updating Your Domain Name's IP Address for Forwarding from GoDaddy Support, stating that I must update the domain address manually so domain name forwarding services work correctly.

But instead of replacing all of the '@' Host in A record into this forwarding address I just need to add a separate host record name it 'www' to point the www domain to 50.63.202.1 to be forwarded and left the other original A and AAAA records as they are need for the naked domain to serve from GAE Application.

So after updating the records in A Host it will look like this:

Host    Points To
@       216.239.32.21   
@       216.239.34.21   
@       216.239.36.21   
@       216.239.38.21   
www     50.63.202.1

Redirecting is work correctly now. My www domain is now redirecting to my naked domain. Off course the page will took some time to show up than point http directly to the naked domain but seems all is OK.

Hope this will also help others who preferably want to set their naked domain (non-www) as the preferred domain rather than the www domain.

like image 91
Chetabahana Avatar answered Sep 28 '22 21:09

Chetabahana