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

0

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개 답변
0

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 (.*)$ http://example.org$1 (http://example.org$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!

References:

[1]https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry

[2]https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-route-53-to-point-a-domain-to-an-instance

[3] https://aws.amazon.com/premiumsupport/plans/

Winnie
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인