-1

I have three separate domains in Route 53:

  • domain1.com
  • domain2.com
  • domain3.com

They all have an A record that points to the same IP address. In addition, they have a CNAME record that points to their respective A records.

Recently I removed the record for domain1.com. (I don't want users to browse the site via that URL while I am working on it).

However, when I try to browse domain2.com (or domain3, for that matter), I get a 301 response, redirecting me to domain1.com. Since the A record for domain1 no longer exists, I get a "server not found" response.

This happens when I try to browse the IP address directly too, even from a device which has not browsed any of the three domains before.

Why is this so? And what can I do about it?

DatsunBing
  • 459
  • 4
  • 8
  • 17
  • 2
    This really doesn't have much to do with Route53. It's going to be something on your server, or potentially something like CloudFront if you're using something like that too. DNS doesn't issue 301 redirects. – ceejayoz Jan 07 '20 at 22:29
  • Thanks ceejayoz, that's good to know. – DatsunBing Jan 07 '20 at 22:34
  • Actually ceejayoz, there is nothing in my server setup that mentions any domain names. It's just a default host setup, so can't see how it could be the server. Also, not using cloudfront or any CDN. – DatsunBing Jan 07 '20 at 22:39
  • 1
    I'm glad you were able to determine what was issuing the redirect. – ceejayoz Jan 08 '20 at 01:51

1 Answers1

0

The site runs wordpress. Evidently, if wordpress receives a request from a non-default domain (e.g. domain2), it issues a 301 to the default domain (i.e. domain1). This was the problem.

DatsunBing
  • 459
  • 4
  • 8
  • 17