By Loading
My droplet can be visited from both IP & Domain
I am using Cloudflare with my Droplet. (https://www.youtube.com/watch?v=iWaFAIRWsA4)
I want to redirect my ip to my domain
I am using Wordpress (Linux on Ubuntu 14.04) on Apache Server
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!
Hi, First off, have you set up your DNS records correctly so that your domain name points to your IP address? e.g
Type Name Value TTL
A example.com your droplet IP address Automatic
CNAME www example.com Automatic
If that is done, then how is your server block defined? …Does it look like this?
server {
listen 80;
server_name YOURSITE.WHATEVER;
If you are set up like this, then I see no reason why you shouldn’t arrive at the same location regardless of what is entered into the address bar. Yours may look a little different as I am using Nginx, not Apache.
Sorry… couldn’t get my answer to format correctly and by the time I had messed around changing it, DO marked it as spam rolls eyes
Make sure your DNS records are set up correctly… A record lists your domain name pointing to your droplet IP address. CNAME record lists your www pointing to your naked domain name
In your server block, check that your domain name is listed as your server and you should be good to go. Not much point in me showing you my config for the server block as I’m using Nginx and its a little different to Apache. If you have done that, then I see no reason why if someone enters your IP address or your domain name, they wouldn’t resolve to the same location, because that is all I have done and it works for me.
Good luck.
Not really sure exactly what you are asking… I am using the same set up as you I am using Wordpress (Linux on Ubuntu 14.04) with Cloudflare What exactly are you wanting to do? You have said that My droplet can be visited from both IP & Domain and that is correct no? but yet you added I want to redirect my ip to my domain I’m confused. You have been a little vague about your issue and somewhat confusing having stated that you can visit your domain from your IP address and Domain (assuming you’re referring to domain name)… that would be a correct set up, hence confusing?
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.