# Why Vercel uses .app for your projects, not .com

> Vercel serves your deployments from vercel.app instead of vercel.com so that code written by users can never share cookies, storage or reputation with Vercel's own dashboard. A separate domain, registered on the Public Suffix List, isolates every project from the platform and from every other project.

By Hitesh Choudhary | Published 2026-11-19 | Updated 2026-11-19

Source: https://chaicode.com/blog/why-vercel-uses-app-not-com
Video: https://www.youtube.com/watch?v=7KeFUBs5vvg

## Key takeaways

- Never run untrusted user code on the same registrable domain as your own product.
- A path shares everything with your app, a subdomain still shares cookies, a separate domain shares nothing.
- The Public Suffix List is what makes alice.vercel.app and bob.vercel.app two different sites to a browser.
- The .app ending is HTTPS-only by design, which is one reason platforms pick it.
- A separate domain also keeps one user's phishing page from damaging your main domain's reputation.

Everyone wants to learn system design, and most of what gets taught is the same list: caching, sharding, SQL against NoSQL. This post has none of that. It is about a quieter decision that almost every hosting platform has made, and that no book I know of covers.

Open Vercel and your dashboard is on `vercel.com`. Deploy a project and it lands on `something.vercel.app`. Same company, two completely different domains. GitHub does it with `github.io`, Netlify with `netlify.app`. That is not branding. It is a security decision, and once you see why, you will make the same one in your own projects.

## How did I end up studying this?

I ran into it while building ChaiCode Labs. I wanted learners to be able to host a small project for a while, mainly so they could practise the parts of integration that need a public address. When you integrate Razorpay, Stripe or Clerk, their server has to call your server. That call is a webhook, and it cannot reach `localhost`.

So I needed to give each learner a public address. My first instinct was the easy one:

```text
labs.chaicode.com/project-1
labs.chaicode.com/project-2
```

A path per project. It is the simplest thing to build. It is also wrong, and it took me about a day to reject it. Every project would share one address as far as the browser is concerned, so their cookies, sessions and tokens would collide, and so would their webhooks.

The next idea was a subdomain per learner, such as `hitesh.labs.chaicode.com` and `rohit.labs.chaicode.com`. That looks fine. Most decisions in system design look fine. The real skill, and the thing interviewers are actually testing, is whether you can back a decision with facts and not with a feeling.

To find the facts I did a small case study of a company that had already solved it: Vercel.

## Why not host user projects on your main domain?

Imagine you are the founder of Vercel. Your dashboard is on `vercel.com`. Your team wrote that code and you trust it.

Now a user called Alice deploys her project, then Bob deploys his, and then someone with bad intentions deploys theirs. You did not write any of that code. It is **untrusted code**, and you are about to serve it to the public under your name.

The dashboard holds things worth stealing: login sessions, API tokens, billing. So the question is simple. Where can you put untrusted code so that it has no way to reach any of that?

You have three choices.

![Three options side by side: a path on vercel.com, a subdomain of vercel.com, and a separate domain vercel.app](https://assets.chaicode.com/blog/vercel-app-three-ways-to-host.png "Three places to put a user's project, from worst to safest")

| Where the project lives | Example | Same origin as the dashboard? | Same site? | What untrusted code can reach |
|---|---|---|---|---|
| A path | `vercel.com/alice` | Yes | Yes | Cookies, localStorage, everything |
| A subdomain | `alice.vercel.com` | No | Yes | Can still write cookies for the parent domain |
| A separate domain | `alice.vercel.app` | No | No | Nothing |

**A path is a strict no.** Alice's page and your dashboard are the same origin, so her JavaScript can read your dashboard's localStorage and make requests as the logged-in user. That is a full account takeover waiting to happen.

**A subdomain is better, and still not safe.** Storage is now separated, which is why it looks fine. The problem is cookies, and to see it you need one distinction.

## What is the difference between an origin and a site?

These two words get used as if they mean the same thing. They do not, and the gap between them is where the attack lives.

![One web address broken into scheme, subdomain, name, public suffix and port, with origin and site defined below](https://assets.chaicode.com/blog/vercel-app-origin-vs-site.png "An origin is the exact address. A site is the wider family it belongs to.")

- An **origin** is the scheme, the full host and the port. `https://alice.vercel.com` and `https://vercel.com` are different origins.
- A **site** is the scheme plus the registrable domain, which is the part you actually buy (often written as eTLD+1). `alice.vercel.com` and `vercel.com` are the **same site**.

Here is how the pairs work out:

| Address A | Address B | Same origin? | Same site? |
|---|---|---|---|
| `vercel.com` | `vercel.com/alice` | Yes | Yes |
| `alice.vercel.com` | `vercel.com` | No | Yes |
| `alice.vercel.app` | `vercel.com` | No | No |

Browsers isolate storage by origin, so a subdomain protects localStorage. Cookies follow looser rules that are closer to "same site", and that is the hole.

If you take one thing from this post into your daily work, make it this distinction. It is the difference between writing code and understanding what the browser does with it.

## What is cookie tossing?

A page on a subdomain is allowed to set a cookie for its parent domain. So if the attacker's project lives at `evil.vercel.com`, one line is enough:

```js
document.cookie = "session=attacker-value; domain=.vercel.com; path=/";
```

That cookie is now sent to `vercel.com` and to every other subdomain. The attacker cannot read your real session this way, but they can plant their own. Depending on how the application handles duplicate cookies, that can log a victim into the attacker's account, fix a session the attacker already knows, or break a CSRF token. This is called **cookie tossing**.

The victim does not have to do anything unusual. They are logged in to the dashboard, they open a link to the attacker's project, and the cookie is planted.

This is not theory. It is the reason GitHub gave when it moved Pages sites from `github.com` to `github.io` in April 2013.

There are defences, and I agree you can lock much of this down with careful cookie settings. But think about what that means in practice: your security now depends on nobody on the team, including next year's intern, ever making a mistake with a cookie. If there is even a small chance of a slip, the design is bad. A separate domain removes the risk at the root, with no rules to remember.

## How does the Public Suffix List separate alice.vercel.app from bob.vercel.app?

Moving to `vercel.app` protects the dashboard. It does not protect Alice from Bob, because `alice.vercel.app` and `bob.vercel.app` are still two subdomains of one domain. Bob could toss cookies at Alice exactly as before.

The fix is something most developers have never heard of: the **Public Suffix List**, or PSL. It is a list, maintained by Mozilla and used by every major browser, of endings under which the public can register names. `.com` is on it, and so is `.co.in`. The browser treats each name directly under a public suffix as its own separate site.

The useful part is that a company can ask for its own domain to be added. Vercel did that for `vercel.app`. Once a domain is on the list, the browser treats it like `.com`:

- `alice.vercel.app` and `bob.vercel.app` are **different sites**, just as `chaicode.com` and `vercel.com` are.
- Nobody can set a cookie for `vercel.app` itself, so tossing between users stops working.

Here are a few entries you use every day without noticing:

```text
github.io
vercel.app
netlify.app
pages.dev
herokuapp.com
```

Getting listed is a submission and a review, and it can take a few weeks. One rule matters afterwards: once a domain is on the list, use it only for user content. Do not go back and host your own product on it.

## Why .app and not some other ending?

There is a second reason platforms like this particular ending. `.app` is **HSTS preloaded** as a whole. HSTS is the instruction that tells a browser to use HTTPS only, and "preloaded" means the instruction ships inside the browser itself. A site on `.app` cannot be loaded over plain HTTP at all, from the very first visit.

Google runs `.app` and introduced this idea of securing an entire ending, and `.dev` and `.page` work the same way. If you are going to run code you did not write, starting from "HTTPS always, no exceptions" is a good place to begin.

It also used to be expensive. A wildcard certificate, the kind that covers `*.yourdomain.app`, once cost a few hundred dollars a year. Today it is free.

## What is the blast radius, and why does reputation matter?

So far this has been about attackers going after your users. There is a second problem: attackers using your platform to go after everyone else.

Suppose someone hosts a phishing page with you. Google's Safe Browsing and similar systems flag it.

- If that page was at `vercel.com/something`, the flag lands on `vercel.com`. Your dashboard, your marketing site and every customer are now inside the damage.
- If it was at `something.vercel.app`, the damage stays on the user-content domain. With the Public Suffix List entry, it can be contained to that one subdomain. `vercel.com` is untouched.

The area that one bad event can damage is called the **blast radius**. A separate domain makes it small. In a system design interview, this is exactly the kind of reason you are expected to give when asked why a decision was made.

## What are the control plane and the data plane?

Splitting the domains also gives you two independent stacks, and they have names.

| | Control plane | Data plane |
|---|---|---|
| Domain | `vercel.com` | `vercel.app` |
| What runs there | Your dashboard, login and API | Users' deployments |
| Who wrote the code | Your team | Anyone |
| Certificates | Specific ones for known hosts | A wildcard for `*.vercel.app` |
| Traffic | Modest | Almost all of it |

The **control plane** is where you manage things. The **data plane** is where the actual traffic flows. Keeping them apart means separate firewall rules, separate rate limits and separate certificates, and a problem on one side does not automatically become a problem on the other.

## Do other platforms do the same thing?

Nearly all of them, and most learned it the hard way.

| Platform | Where its own product lives | Where user content lives |
|---|---|---|
| Vercel | `vercel.com` | `vercel.app` |
| GitHub | `github.com` | `github.io`, `githubusercontent.com` |
| Netlify | `netlify.com` | `netlify.app` |
| Cloudflare | `cloudflare.com` | `pages.dev`, `workers.dev` |
| Firebase | `firebase.google.com` | `web.app`, `firebaseapp.com` |
| Google | `google.com` | `googleusercontent.com` |
| Dropbox | `dropbox.com` | `dropboxusercontent.com` |
| Heroku | `heroku.com` | `herokuapp.com` |
| Render | `render.com` | `onrender.com` |
| Fly.io | `fly.io` | `fly.dev` |

None of them started this way. GitHub Pages used to be served from `username.github.com` until 2013. Netlify moved sites from `netlify.com` to `netlify.app` in April 2020. Vercel's deployments moved to `vercel.app` in mid 2020, from the `now.sh` addresses it used when the company was called ZEIT. I had sites on the old addresses for a long time. They asked me to move, I kept putting it off, and eventually they moved everything for me overnight.

That is the honest lesson. Even the companies that define this industry did not know on day one. They found out, then paid for a migration.

## What does it cost?

This design is not free, and you should say so when you propose it.

- **A second domain** to buy, renew and never let expire.
- **More infrastructure**: separate DNS, certificates and firewall configuration.
- **Migration pain** if you are adding it later, because every existing link and integration has to move.

Against that you get isolation that does not depend on anyone remembering a rule. Security outweighs the cost here, which is why every platform in the table above made the same call.

## A checklist for your own platform

If you are building anything that runs code or serves content you did not write, here is what I would do.

**Set up the domains**

1. Buy a separate registrable domain for user content. Not a subdomain, and never a path.
2. Give every tenant their own subdomain on it.
3. Submit that domain to the Public Suffix List, and keep it for user content only.
4. Prefer an ending that is HSTS preloaded, such as `.app` or `.dev`.

**Harden everything around it**

1. Keep allowlists exact. CORS, CSP, OAuth redirect URLs and webhook sources should name full hosts, never a wildcard like `*.yourdomain.com`.
2. Verify webhooks by their signature, not by the domain or IP they appear to come from. Razorpay, Stripe and Clerk all sign their requests for this reason.
3. Do not treat `HttpOnly` and `Secure` cookies as the whole answer. They help. They are not a wall.
4. Put a separate firewall and separate rate limits on the user-content domain.

A note on the first point. Wildcards and loose regular expressions in allowlists are among the most common mistakes in real codebases, and I have written them too. That matters more now, because AI coding tools learned from all of that code. When you review generated code, look hard at every wildcard and every regex in a security check. They are hard to read and easy to miss.

And on the last point: bots can now use more bandwidth than people do. We have seen our own bill jump because of crawlers. You pay for that traffic, so decide on purpose which bots you allow.

## Questions people ask

### Can I use a subdomain of my main domain for user content?

You can, and it is safer than a path, but user code on a subdomain can still set cookies for your parent domain. If the content is untrusted, use a separate registrable domain.

### Is vercel.app owned by Vercel?

Yes. Vercel owns both domains. It keeps them separate on purpose, so that what users deploy cannot affect the dashboard.

### Do I need this for a normal SaaS product?

Only if you serve content your users control: uploaded HTML, custom pages, hosted projects, user scripts. If users only ever see pages your team wrote, one domain is fine.

### What is the Public Suffix List used for?

Browsers use it to decide where one site ends and another begins, which controls how far a cookie can reach. Password managers and certificate authorities rely on it as well.

### Does a separate domain hurt SEO?

User content on a separate domain does not build authority for your main domain. For a hosting platform that is the point, since you do not want users' pages affecting your reputation in either direction.
