GAE 404 error after setting www redirect to bare domain on GoDaddy

I was looking for an answer to this redirect problem. There are many similar questions, but I still cannot find how to solve them.

I installed my domain from GoDaddy for my GAE application, as shown below:

Install the CNAME for www at ghs.googlehosted.comdomain to: https://cloud.google.com/appengine/docs/domain

Enable my bare domain by setting A and AAAA records as follows: https://support.google.com/a/answer/2579995

From now on, both my bare domain and my www work fine.

However, refer to the “Site Setup” section of “Google WebMaster Tools”, it is recommended that you select your preferred domain, either www or bare domain, and configure 301 redirects to your preferred. So I decided to set my bare domain as my preferred.

In my GAE domain setting and my GoDaddy account, I deleted the CNAME for the www entry and created in GoDaddy a ' New Subdomain Forward ' from www to http of my bare domain with type 301 (Permanent), however now my www domain has come up with this error :.

404. That's an error. The requested URL / was not found on this server. That's all we know. 

I checked that my bare domain is still working. Can anyone advise what I misunderstood?

+5
source share
1 answer

Finally, I found a solution how to solve this domain redirection problem.

I came to this help article: Updating the domain name IP address for forwarding from GoDaddy support, stating that I have to manually update the domain address so that the domain name forwarding services work correctly.

But instead of replacing the entire “@” host in the A record with this forwarding address, I just need to add a separate host record name, this is “www” to indicate the www domain to 50.63.202.1 for forwarding and leaving the other source records A and AAAA, as they necessary for the bare domain to serve in the GAE application.

So, after updating the entries in 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 

Redirection works correctly. My www domain is now redirected to my bare domain . Of course, it will take some time for the page to show what the http point is directly in the bare domain, but everything seems to be in order.

We hope this also helps others who prefer to set their bare domain (not www) as their preferred domain rather than www domain.

+4
source

Source: https://habr.com/ru/post/1207004/


All Articles