Question

Run Node server on DigitalOcean and run client on Zeit/Vercel

My intention is to run my server on a DigitalOcean droplet using a subdomain, server.mywebsite.com.

But I still want to run my client on Vercel (previously known as Zeit) at mywebsite.com.

So:

frontend -> mywebsite.com on Vercel backend -> server.mywebsite.com on DigitalOcean

Is this possible?

I tried following this post, but with no success: https://www.digitalocean.com/community/questions/how-do-i-create-an-a-record-in-zeit-now-to-point-to-digital-ocean-droplet

I added my droplet’s IP address to my Vercel config as an A record and pointing to server.mywebsite.com, but when I visit server.mywebsite.com, I just get a 404 Vercel error.

The deployment could not be found on Vercel.

DEPLOYMENT_NOT_FOUND


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.

Accepted Answer

Solved. There were two things I need to fix:

1. Vercel Settings I was adding server.mywebsite.com to the A record in Vercel instead of just the subdomain portion server. Their UI did not make it clear that I was accidentally adding the domain server.mywebsite.com.mywebsite.com. Also needed to add a second record, www.server. Point them both to the DigitalOcean IP.

2. DigitalOcean Settings Needed to add two A records in the DigitalOcean Domains settings. One for server and one for www.server both pointing to my DigitalOcean droplet IP.

@jpangelle can you explain above answer? I added admin.website.com to the A record in the digital ocean. But it points to vercel.

Try DigitalOcean for free

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

Sign up

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.