Report this

What is the reason for this report?

How do I SSH into a droplet with my domain name instead of the IP address

Posted on June 15, 2016

I asked for help on this on the most similar question in the forum, but no luck yet…

I want to SSH into my droplet using the domain name that I have set up instead of the the IP address of the droplet.

I don’t have a complicated set up - just LAMP Ubuntu 14.04, but I do have CloudFlare set up managing the name servers for the domain.

If anyone can tell me if this is possible and the steps required to get it working, I’d be very grateful :)



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!

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.

you would have to add www.yourdomain.com in /etc/hosts of the server(or client) you use ssh from.

From a security perspective having subdomains that route around CloudFlare is a really bad idea.

You’re far better off setting an SSH config file that allows you to connect to a given host using a custom alias whilst also being able to add additional configuration.

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.