By QuantumPie
I’m currently writing a script using the REST API to automate the process of creating a droplet from a snapshot. I have my own domain for the snapshot (we’ll say it’s example.com) and in the script I map the new IP of the created droplet to sub.example.com through an A record. When using putty, I try to enter sub.example.com as the hostname and it gives me an error saying “hostname not found”. If I try and enter the assigned ip address to the droplet it works. Is there something else I need to do that I’m missing to get this to work? Thanks!
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!
Hello, @QuantumPie
Have in mind that when you create an A record for the subdomain (sub.example.com) the DNS will need some time in order to propagate. This might take up to 48 hours in order to fully update due to ISPs (Internet Service Providers) cache on their end.
If the A is created shortly before you try to ssh using the subdomain as hostname, this will be the reason you’re getting the “hostname not found” error in putty.
Let me know if you have any questions.
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.