Skip to content

Major domain routing issue

0

I'm using the origin domain demo.com and AWS Amplify to manage the frontend environment. I selected demo.com and created the subdomain www.demo.com in the custom domain settings. I also enabled the option to redirect from https://demo.com to https://www.demo.com . Additionally, I configured this redirect in Amplify's "Routes and Redirects" section with a 301 status code.

When accessing https://www.demo.com , everything works as expected. However, when I try to visit https://demo.com , I receive the following error:

"Hmm. We’re having trouble finding that site. We can’t connect to the server at tentkotta.com. Did you mean to go to www.demo.com?

If you entered the right address, you can:

Try again later
Check your network connection
Ensure Firefox has permission to access the web (you might be connected but behind a firewall)"
1 Answer
0

The issue you're facing with the redirect from the root domain (demo.com) to the www subdomain (www.demo.com) could be caused by a few different factors. First, it's important to ensure that the DNS configuration for the root domain is set up correctly, with the appropriate records pointing to the correct endpoint, such as the Amplify distribution URL or the origin server.

Next, you should double-check the custom domain settings in the Amplify Console, making sure the "Redirect from HTTP to HTTPS" and "Redirect from root domain to www subdomain" options are properly configured. Additionally, verify that the redirect rules in the "Routes and Redirects" section of the Amplify Console are correct, with the redirect from "demo.com" to "www.demo.com" using the appropriate 301 Permanent Redirect status code.

It's also possible that caching issues or the time needed for propagation of the changes (up to 24-48 hours) could be contributing to the problem. You should try clearing your browser cache and waiting a bit to see if that resolves the issue. Finally, ensure that there are no other conflicting redirects or configurations in other services that might be interfering with the Amplify-managed redirect.

If the issue persists after checking these potential causes, you may need to contact AWS Amplify support for further assistance, or consider alternative solutions, such as using a third-party DNS service or a custom web server configuration, to manage the domain redirects.

answered 2 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.