Domain redirects to IP address and also loading from IP address

October 23, 2013 7.2k views
Hi, I have a droplet running the latest ubuntu and wordpress. I set up everything like in the tutorials and my domain is working. But when I type in, it redirects itself to which is the IP address of the droplet that DigitalOcean gave me. Also, when I go to, my homepage loads just fine but I notice my browser says that its is connecting and waiting for, not itself. I may be unclear here so please ask for more info. I would not like to expose my IP address like that and also it looks extremely shady to my visitors. Please help! Thanks a lot!
1 comment
8 Answers
Did you configure wordpress with your IP address before purchasing or setting up your domain name? I do know that Wordpress uses a lot of absolute links which I believe is the source of your problem.
Log into your WordPress Dashboard & navigate to Settings. What's listed as your Site URL & Home URL?
Look in /etc/apache2/sites-enabled. Then, execute cat [filename_of_your_wordpress_config_file] and look for the ServerName directive. What do you have listed?
@Ahrotahntee: Yes, I managed to install WP using the IP address and then later I pointed my domain to that IP. How should I fix this?
@Pablo of vDevices: In /etc/apache2/sites-enabled, only the 000-dafault file is there. Please advise!
Thanks guys for your help!
Execute cat /etc/apache2/sites-enabled/000-dafault. Do you see a line that begins with ServerName? If so, what's after it? If not, then add it, as described in Step Five of: How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS.
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.
@Pablo of vDevices: I followed the tutorials and add all the info like you said but the problem is still there. :(
Wow I'm such an idiot. The URL in WP is... the IP address. I didn't think to check for that first.
Thank you a lot Pablo! I am this close to create another droplet and start over lol! Please know that I'm deeply grateful!
hi Pablo,when i follow your instractons then the site is broken redirect my site to a broken site also wo-admin url not working!
"Log into your WordPress Dashboard & navigate to Settings. What's listed as your Site URL & Home URL?"
Have another answer? Share your knowledge.