Skip to content
Sign up

Sites and domains

How a site's domains decide which websites its forms accept and which URLs its sitemap can hold.

Every site has a primary domain, such as yourclient.com, and can have other domains and patterns. Together they’re the site’s allowed domains. A form on the site accepts posts only from https:// pages on those domains, and refuses every other website. A sitemap URL must be on one of them too.

http://localhost is off by default. Turn on Allow localhost to accept it while you build.

Why it works this way

A form endpoint is public: anyone who reads the page source can see it. Checking where a browser post came from stops other websites from posting into your client’s inbox, or embedding your client’s form as their own, without you having to add keys or tokens to the markup.

A domain also names the site. It’s the site’s label across the app, so one domain can belong to only one site in your agency.

The primary domain

You set the primary domain when you create the site. It’s entered without https:// or a path, like yourclient.com, and Atomicity stores it in lowercase.

The primary domain is:

  • The site’s label across the app.
  • Its first allowed domain.
  • The address the sitemap’s install check and robots.txt line use.

Changing it never changes a form’s endpoint, so forms already installed keep working.

Other domains and patterns

Under Site settings → Domains, add every other host the site is served from, such as www.yourclient.com, a staging copy, or preview builds.

A domain can include:

  • A wildcard: * stands for any letters, digits, or hyphens within one part of a name. It never crosses a dot, so *.staging.yourclient.com matches a.staging.yourclient.com but not a.b.staging.yourclient.com.
  • A port: add :port for a non-standard port, like staging.yourclient.com:8443.
www.yourclient.com
*.staging.yourclient.com
pr-*.yourclient.com
yourproject-*.vercel.app

Two kinds of pattern are refused because they’d let strangers in:

  • Too broad: a * must sit under a domain you own. *.com or *.co.uk can’t be used.
  • A shared host: anyone can publish on hosts like vercel.app, netlify.app, pages.dev, and github.io, so *.vercel.app would let any site in. Name your project too, like yourproject-*.vercel.app.

Localhost

With Allow localhost on, forms also accept http://localhost on any port. Submissions from localhost get a TEST tag automatically, and don’t count toward the site’s plan. The same goes for submissions from staging or preview addresses, such as staging.yourclient.com or a *.vercel.app build.

Boundaries

  • The check applies to browser posts, which always say which page they came from. A request from a server or curl sends no origin, so it isn’t refused by this check.
  • With no domains at all, a site’s forms refuse posts from every website.
  • Only https:// is accepted on the site’s domains. An http:// page on the right domain is still refused.
  • Allowed domains don’t move submissions between sites. Each form still belongs to one site.
  • Deleting a site deletes its forms and all their submissions, settings, rules, and webhooks, and its endpoints stop accepting submissions. The client and its other sites are untouched.

See also

Type to search…

↑↓ navigate↵ selectEsc close