Point a Subdomain to Droplet

I have a domain that I use for the frontend of my application, hosted on Vercel. I’ve passed the DNS records provided by Vercel to my registrar (Squarespace). If I access the frontend is being displayed.

Now, I have a droplet for the backend of my application which for now only has some dependencies and Nginx installed. If I visit http://droplet-ip the default Nginx page is displayed. How can I achieve the same behaviour by visiting ?

I’ve added a new DNS record to Squarespace:

  • Host: api | Type: A | Data: <droplet’s ipv4>

But for some reason when I try to visit it redirects me to and a Vercel specific error is being displayed “Deployment not found”. What am I doing wrong here?

I did not modify any NS and if I use the DNS lookup tool ( to search for it displays Owner: DIGITALOCEAN

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.

Site Moderator
Site Moderator badge
November 6, 2023

Heya @dragos1412,

First, you need to make sure your DNS is working properly. Try to do a ping

ping -c 2

Does it return your Droplet’s IP address? If, yes, then good!

As for Nginx, you need to configure your domain in your Nginx configuration. Check the following docs :

It should help with what you need.

Try DigitalOcean for free

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

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

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

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel