By using AWS re:Post, you agree to the Terms of Use
/Cloudfront non-www URL routing to other site/

Cloudfront non-www URL routing to other site

0

I'm hosting a static website via S3 buckets and CloudFront. I've set it up so that the data is stored in the www bucket and the other, non-www, bucket routes to it. Typing in the ULR with the www works perfectly. The issue I'm running into is that when I type in the URL without the www, it routes to another site with a different, but similar URL. It's been like this for about a week and nothing I do seems to change it. I've redone the hosting zones and checked multiple times and none of it seems to work. I've done something like this before with other sites I've set up so I know what I'm doing works. I'm last as to how to go about fixing this so any help would be very much appreciated.

1 Answers
0

My comments are going to seem pretty simple but the information I have from your question is limited.

  • Check to see the IP address that the "non-www" address resolves to. Alternately, if it is a CNAME then ensure that it is pointing to another DNS entry that you own.
  • When you say "it routes to a similar URL" where is that routing happening? Is it happening at the DNS layer? Or is it happening on a web server that the browser connects to and is then being redirected? You can troubleshoot this with tools like curl and wget by telling the tools not to follow redirects.
EXPERT
answered 2 months ago
  • I'm not sure what this means, but I am getting no output when I run curl on the "non-www." Also what info could I provide that could help diagnose the problem better?

  • If you're getting no output, how is the redirect to "another site" working?

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