By using AWS re:Post, you agree to the Terms of Use

Half of my wordpress site uses my Static Ip while the other half uses my domain


Hi, So I hosted a wordpress site on amazon lightsail, and I have attached a domain to it, now half of my site uses my domain while the other half still loads on my static ip. I have no idea why this is happening because I also have other wordpress sites and they don't have this issue.

Please help me out

  • Check if the IP is configured somewhere in wordpress settings file like wp-config.php

1 Answers

Hi there!

From the notes, I understand that you have a problem with half of your WordPress site on amazon LightSail using a static IP address and another half using your domain.

Please run the $dig command on your domain and see if it points to the IP address. If it does, your DNS is setup correctly, which means it's most likely a WordPress configuration issue. Check if the IP is configured somewhere in wordpress settings file like wp-config.php .It's possible that since you set this up prior to attaching your domain, that it has the IP address listed as the site name instead of your domain name.

You can set up the htaccess to forward the IP to the domain. If you are using the bitnami image, you can adjust the htaccess.conf and do something like: RewriteEngine On RewriteCond %{HTTP_HOST} ^IP.IP.IP.IP [OR] RewriteRule (.*)$$1 ($1/) [R=301,L] I also recommend setting up HTTPS/SSL if possible for better security.

If the dig command doesn’t point to the IP address, then you have to set it up properly.Please check the outlined documentation to setup DNS via LightSail DNS[1] and Route53[2].If you are still having issues with the DNS setup you can contact AWS customer support to further assist on the issue[3]

I hope you find the above information helpful.

Have a great day ahead!





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