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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ