This can probably be fixed quite easily. I tried to research and find the answer to this but couldn't find anything relevant.

Basically, I can access my website perfectly through its url. (ex. example.com)

Whenever I click a link, go to my /wp-admin, or go to any other page, my domain changes into the IP address. (ex. instead of showing example.com/about it would show

How do I fix this? Do I have to edit a file or can this be fixed by adding a domain record?


  • Can you post the virtualhost config block?
    – Dan Lowe
    Nov 16, 2015 at 1:42

2 Answers 2


Since you mention /wp-admin, chances are this is WordPress's doing.


In wp-config.php, update or add:

  • Sort of. I just found the answer by going to Settings>>General and then changing the site url and address to my domain. I appreciate your help!
    – Doug Beney
    Nov 16, 2015 at 2:13
  • @exoro Yeah, that does the same thing, just via the UI. :)
    – ceejayoz
    Nov 16, 2015 at 2:38
  • 1
    This one is useful if you can't get into the WordPress admin because of the redirects. May 22, 2019 at 18:11


Phew... This was a simple fix.

In the Wordpress dashboard I went to Settings>>General and then changed WordPress Address (URL) and Site Address (URL) into my actual domain instead of an IP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.