www redirect in amplify console infinitely redirects

0

I think I found a bug with AWS Amplify. When I deployed a starter gatsby application and then add a route53 url, I can get the www domain working where it redirects to the root domain. If I go to the root domain directly, however, it redirects infinitely to the www version.

So www.mydomain.com will redirect to mydomain.com and the page loads fine.

Directly going to domain.com will redirect to domain.com/www.domain.com/www.domain.com... and that will repeat forever in the web address.

In the custom domain section I do have a redirect in the root to the www so perhaps that is it, but it is strange that it appends the domain to the url instead of just redirecting.

demandé il y a 5 ans1505 vues
3 réponses
0

I had the same problem.
I believe the default values written in the tab "Rewrites and redirects" are not correct.

If you look at the line for the 302 redirect, you will see:

  • source address: https://your_domain.com
  • target address: www.your_domain.com

You need to change the target address to: https://www.your_domain.com

Hope it solves your problem!

Not sure how to report it as a bug to the amplify team.

Edited by: boris13 on Apr 28, 2019 9:16 AM

boris13
répondu il y a 5 ans
0

Hi stephen and boris,

You're right, this is an issue on our end that we are working to fix! In the meantime, the above answer is correct. Add "https://" to the front of the custom domain target in the app rewrites and redirects page.

Please let me know if this still doesn't working for you.

Thanks,
Dan

AWS
répondu il y a 5 ans
0

That totally worked, thanks so much Boris & Dan!

répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions