I am using Google Domains for domain name. I host client on Vercel which works perfectly fine. But I have a problem with accessing my droplet on subdomain.
My google domain settings are like this:
@ A 3600 Vercel IP www CNAME 3600 cname.vercel-dns.com. API A 3600 My Droplet ID
When I try to access the droplet with raw ip it works fine but I cannot access it through subdomain. What am I doing wrong?
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!
It seems to me like the DNS is not properly configured. Let’s say you have a domain.com and you want to point sub.domain.com to your droplet. What you can do is create an A record for sub.domain.com to point to your Droplet :
Name Type Destination
sub.domain.com A XXX.XXX.XXX.XXX
where XXX.XXX.XXX.XXX is your Droplet’s IP address.
As for the www version, now you can use a cNAMe record like so
Name Type Destination
www.sub.domain.com CNAME sub.domain.com
That way your www.sub.domain.com will point to where your sub.domain.com is pointing.
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.