I am trying to set up my domain (DNS on CloudFlare) to point to a DigitalOcean droplet, but I can’t seem to get it to work properly. I have an Ubuntu Droplet, running WordPress, and on CloudFlare, I have configured an A record to point to the IP address of my droplet. When I try to access it, I get a 521 Error. If I turn the CloudFlare CDN off (grey cloud), the domain takes me to the droplet, but shows the IP address in the browser. How do I configure both my DNS and droplet to have the DNS on CloudFlare pointing to the droplet?
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!
Nevermind, I found a fix elsewhere. Answer from sdayman on the CloudFlare community forums:
Having the IP address show up in the browser indicates a problem with your server configuration. You probably need to have Wordpress configured to use your domain for the URL. Add these two lines to your wp-config.php file with the appropriate URL:
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.