0

In order to create a backup of an AWS Lightsail instance I took a snapshot and recreated that snapshot as an instance.

I now have two different instances configured on my AWS Lightsail account with separate static IP Addresses:

Original: 18.223.243.244

Copied: 18.224.221.164

However, both static IP Addresses are still pointing to the same url: amar-bhatia.com.

The only thing I added was the following command to make 'www.amar-bhatia.com' redirect to to amar-bhatia.com:

RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

followed by: sudo /opt/bitnami/ctlscript.sh restart apache

Even though my DNS records show two A records that only point to one of my static IP Address, both of my static IP Addresses are point to the same URL, amar-bhatia.com.

How can I make sure only one static IP Address is pointing to amar-bhatia.com?

Is it because I made a clone of the instance?

a2b123
  • 573
  • 1
  • 5
  • 19

1 Answers1

2

IP addresses don't "point" to URLs. What you're seeing is WordPress redirecting from the IP to the "site URL". If you want to be able to access the copied instance, change the site URL to the IP address on that instance. https://codex.wordpress.org/Changing_The_Site_URL

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • See also: https://wordpress.stackexchange.com/questions/13777/my-wordpress-site-gets-redirected-automatically-to-the-old-site-any-known-soluti – ceejayoz Oct 25 '18 at 15:31