

What Are Domain and VPS? A Home for Your App and a Sign for People to Find It
🏠 What Are Domain and VPS? A Home for Your App and a Sign for People to Find It
A VPS is a server you rent monthly, running around the clock, so your app can run for other people to use. A Domain (domain name) is an easy-to-remember name, like yourcompany.com, standing in for the string of numbers that is the server's address. Both do different things but always go together: one is the house, the other is the address sign.
When you finish building an app with AI, it only runs on your computer (at localhost), meaning only you can see it. This article helps you understand the VPS and domain duo, then point your domain to your server without confusion.
Understanding It With an Everyday Analogy
Think of a phone contact list.
- The IP address of your VPS is like a real phone number: a hard-to-remember string of digits, like 203.0.113.10.
- A Domain is like the name in your contact list: you tap "Mom" for convenience, your phone automatically dials the right number behind it.
- DNS is the phone book of the entire internet, recording which name goes with which number.
Switch to a new server (change to a different VPS with a new IP) and you only update the phone book. The name stays the same, users never need to know.
VPS: Where Your App Actually Runs
VPS stands for Virtual Private Server. Think of it as a computer placed in a data center that you rent monthly. It has three key points:
- A public IP address: the "house number" for the whole world to find you.
- Full installation rights: you build websites, run Docker, install databases however you want.
- Always on: your laptop may shut down, but your VPS runs continuously so your app doesn't crash when you close the lid.
In short: without a VPS (or a similar kind of server) your app won't run for others to use. A small VPS costs just a few dollars a month and is enough for internal tools or personal websites. You can rent from many providers, domestic and foreign: Hostinger, Vultr, DigitalOcean, or Vietnamese providers. Compare renewal prices, not just the first month's cost.
If you just need a webpage to display data (no file storage, no scheduled tasks), you can use platforms like Vercel instead of a VPS (see a solo Vietnamese founder who had Claude deploy his SaaS to Vercel in 4 hours). How to choose between the two is covered in What is a Tech Stack.
How It Works
In theory, an IP address is enough: type http://203.0.113.10 in your browser and you get in. But the number string is hard to remember and looks unprofessional. With a domain name, here's how it flows:
- A user types yourcompany.com into their browser.
- The browser asks DNS: "What IP does this name point to?"
- DNS answers: 203.0.113.10.
- The browser connects to the VPS with that IP, and your app appears.
What you're about to do is "point your domain to a VPS". This is actually just adding one line to the DNS phone book, noting: this domain name goes with that IP. That's it.
What This Means for You: Point Your Domain Step by Step
Step 1: Buy a domain. You buy from registrars like Cloudflare, GoDaddy, or local Vietnamese providers. .com or .vn endings both work.
Step 2: Open the DNS Management page of wherever you bought your domain.
Step 3: Add one A record. An A record does one thing: point a domain name to an IP address. Fill it in like this:
| Field | What to Enter | Meaning |
|---|---|---|
| Type | A | Point domain to an IP |
| Name / Host | @ | Symbol for the root domain yourcompany.com |
| Value | Your VPS IP | Paste the IP your VPS provider sent you |
| TTL | Auto | Leave at default |
Step 4: Add a second A record with Name set to www, also pointing to the same IP, so both yourcompany.com and www.yourcompany.com work.
Step 5: Wait a moment. DNS needs time to spread globally, usually a few minutes, sometimes a few hours. If the domain isn't working right away, don't keep tweaking. Just wait and try again.
Subdomains
A subdomain is the part before your main domain, like app.yourcompany.com or api.yourcompany.com. Thanks to subdomains, one domain can serve many purposes: app for your application, api for backend, blog for your news.
It's very simple: add another A record, just change the Name field.
| Name | Result | Points To |
|---|---|---|
| @ | yourcompany.com | Your VPS IP |
| www | www.yourcompany.com | Your VPS IP |
| app | app.yourcompany.com | Your VPS IP |
| api | api.yourcompany.com | Your VPS IP |
Add as many subdomains as you need.
How can multiple names point to one VPS without getting mixed up? Your VPS runs software called a web server (usually Nginx) that routes traffic, like a building receptionist: ask for app.yourcompany.com and you're directed to application A; ask for api.yourcompany.com and you're directed to application B. You can have Claude Code set this up on your VPS, just tell it:
Configure Nginx on this VPS so app.[domain] runs the application on port 3000
and api.[domain] runs the application on port 4000. Also install the free
HTTPS certificate from Let's Encrypt for both, then show me the verification.
What About the HTTPS Lock?
After pointing your domain, you can visit it via http://. To get the padlock for https:// (required if you want to look trustworthy and accept logins or payments), you need an SSL certificate. Let's Encrypt offers free certificates that work great, and you can have Claude Code install it just like the command above.
Common Misunderstandings
- "Buying a domain means you have a website." Not yet. A domain is just a name in the phone book. You still need a server (VPS or platform like Vercel) for your app to actually run.
- "Each subdomain needs its own VPS." No. One VPS runs many applications, each with its own subdomain, thanks to your web server routing traffic.
- "If I can't access it right after pointing, I did something wrong." Usually it's just DNS hasn't spread yet. Double-check your A record's IP, then patiently wait.
One security note: once your app is on the internet, anyone can type your address into their browser. Read why so many coding projects get hacked and what you need to know before sharing the link widely, and always push your code to GitHub like in the Git and GitHub article.
Quick Summary
- VPS is a server running 24/7 with a public IP, where your app actually runs for others.
- Domain is an easy-to-remember name standing in for the IP, thanks to DNS translating names to numbers.
- Pointing a domain to a VPS means adding an A record: Name = @, Value = your VPS IP. Add a www line too.
- Creating a subdomain means adding another A record, changing the Name field to app or api.
- For https://, install a free SSL certificate from Let's Encrypt.
Frequently Asked Questions
How is VPS different from hosting? Hosting usually runs ready-made websites with limited customization. A VPS is a whole virtual machine where you have full control: install Docker, databases, run scheduled tasks.
How much does a VPS cost? Small plans run a few dollars a month, enough for internal tools or personal websites. Check renewal pricing, not just the first month.
Do I have to buy a domain? Not required; typing the IP works fine. But domains are easy to remember, look professional, and you need one for HTTPS, so most app makers buy one.
How long after pointing a domain can I access it? Usually a few minutes, sometimes several hours for DNS to spread everywhere. If it hasn't worked after a day, check your A record again.
I don't know how to work with servers. What should I do? You handle buying the domain and adding the A record. Have Claude Code handle the Nginx setup, HTTPS, and deploying your app to the VPS. Read through each command carefully before approving.
More articles

Why Japan Is Building Its Own AI Instead of Just Using ChatGPT or Gemini

Use AI to Write Trending Captions Without Losing Your Brand Voice

Use Claude to Write a Freelancer Job Post on Upwork and Fiverr in 15 Minutes

AI Builds Software From a Raw Idea: Inside Cole Medin's "AI Software Factory"

What Is PII Redaction in AI? How Chatbots Mask Your Personal Data

Use Claude to Check and Fix Citations in Your Essay or Report in 15 Minutes