Hello people I have an issue regarding Amplify and Godaddy, hosting a next.js site.
I'll explain the issue in list so I don't write too much and be as clear as possible.
- I Have a GoDaddy account to which I have only delegated access to domains
- I have deployed a next.js site (using SSR) on amplify
- Eventually, I'll need to add the root domain to Goddady, but the issue is that amplify needs to add the root domain in an
ANAME, not aCNAMEwhich GoDaddy does not support. - I forward the root domain, to a www subdomain like so:
https://www.example.com - When I access my browser my site, for example:
example.com(without the www or any protocol) it redirects me perfectly to my website.
The problem
If I go to my site like this: https://example.com, it loads nothing and sends a PR_END_OF_FILE_ERROR. I can only access my site with: example.com or www.example.com.
And this issue is because, on amplify, when I set the domains, I'm setting the www.example.com with the actual branch code. Since I cannot add an ANAME to GoDaddy because ANAME's are not supported, the root domain has to be disabled like so:

Possible solutions?
I cannot have access to all the products of GoDaddy and change nameservers.
I did add a 301 forwarding in GoDaddy from the root domain to the www subdomain. But still, accessing https://example.com does NOT redirect to the www.example.com one.
Is using Nginx a solution? or probably a raw .htaccess file?
I mean, I don't care if the domain goes to a www, I just need it to redirect it.
PD:
On amplify I have my redirections as well:

I'll appreciate a lot your help, It's been 3 days and nothing.