URL of site showing IP not Domain

Posted October 7, 2019 2.6k views

I have a wordpress site, hosted on digital ocean with a domain from 1&1. When I type in the domain it correctly goes to the site, but the URL displays the IP not the domain.

I have tried changing the Site Address (URL) in wordpress settings but this seems to leave me in an endless redirect, where the domain redirects to the IP which redirects to the domain etc.

What do I need to do to get a user to see the domain rather than the URL.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Indeed in most cases, this is due to an incorrect Site and Home URLs. I would suggest the following:

  • Change your site and home URLs to your domain name

  • Clear your website cache in case that you are using any caching plugins

  • Check your Apache Vhost for any redirects

  • Check your .htaccess file for any redirects as well

  • Go through your plugins and make sure that there are no redirect plugins installed that could be causing the issue

Let me know how it goes!

  • Hey,

    Thanks for replying, unfortunately I can’t get that to work. Event after cache clearing and/or trying in new browsers I still get the infinite redirect. Could not even get back on to change is so had to set a redirect in the wp-config file.

    How do I check Apache Vhost for redirects? I have checked the access file and tried going through plugins and they all seem ok.

    • Hello,

      Your Apache Vhosts should be stored at:


      You need to find the Vhost for the specific website and check if there are any rewrite/redirect rules which could be causing the issue for you.

      Feel free to share the Vhost here in case you are unsure.