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.

asked 4 years ago385 views
3 Answers
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
answered 4 years ago
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

answered 4 years ago
0

That totally worked, thanks so much Boris & Dan!

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions