Question

WordPress and GoDaddy problem Domain and Url

Hi everyone. I installed WordPress in Ubuntu, and I have a domain i want to use with the WordPress Droplet, I put the DNS configuration (AAA, A, CNAME) like the config tutorial everything works fine, in GoDaddy I point to my DO servers, everything is fine… But, when I go to the domain url it shows the page but changes my domain URL to the droplet IP URL. Like redirects the DOMAIN to the IP and the URL changes from mydomain.com to the 192.xxx.xxx. IP droplet.

I see many post of this problem here, so, i change the URL Settings in WordPress Dashboard (only the homepage URL) to mydomain.com, it loads perfect but fonts icons are not loading correctly and when I try to go the WordPress admin panel, I can’t, so I inspect with JS the url and seems like is redirecting to the mydomain.com URL and not the droplet (where are all the files) and loops, so I change the URL in the JS inspector and put the Droplet IP. In the inspector, doing this i can enter, and I was be able to edit the URL Settings in WordPress Dashboard and put the older (IP Droplet Adress) instead the domain…

My question is… How I can have this working? I have to put mydomain.com in both of Settings URL of WordPress Dashboard and will work fine? Or the pages will crash? This is a Apache problem config? Please… I will appreciate any help, I have days in this problem…


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

@infocreditprotech

When you first install WordPress, it uses whatever hostname or IP is used to access the installer. So if you used an IP to install WordPress, then the IP is used as your sites URL.

You can modify ./wp-config.php and within it, add:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

… save the file, upload it, and then refresh the page and that should set your URL to your domain without any further changes needed. Simply change example.com to your actual domain.

@jtittle Hi, sorry for the late reply, I did what you told me but the pages is not showing and throws an 500 error (Page can’t be load) . I change the variables with my domain URL but throws that error. I delete them and the page loads correctly but… redirecting to the IP. What you think is the problem?

@jtittle , Sorry! It works! Thank you very much!!! Now I can see my domain and login to WordPress without problems. But… the icons fonts for the theme loads by the IP adress and throws an JavaScript problem, this not show the font icons. What you think is the problem here? Is something in the theme url or?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.