Skip to content
Sharing & access

Publish a website

Serve a site on your own domain as a website, keep it up to date from your AI, and review bigger changes before they go live.

Website, site or sharing domain?

A site is one page or folder you share with chosen people. A website is a site that answers publicly on its own domain, such as pson.is, edited only by named people. The sharing domain, such as share.pson.is, opens your private sites by link.

Make the site a website

  1. Publish the site as HTML, with an index.html at its root.
  2. Ask a workspace owner to add the domain as a website, with Add website under Websites in the sidebar, or with your AI. Choose whether search engines may list it.
  3. Add both DNS records SnapHost shows at your registrar, the one that points the domain here and the TXT ownership record, then verify the domain. Keep the ownership record.

You can have several websites, each on its own domain. Everything on a website domain is public, and once a domain has served a website it can never be used for private sharing.

If you already added the domain to the site as a shared page address, open the site’s Shared page address card and choose Make it a website, or use Add website with the same domain. Your AI does the same.

The owner who does this and the person who created the site become its editors. Owners add and remove editors on the Editors tab. A website lives under Websites in the sidebar and appears there only for its editors and the workspace owners.

Build the pages

  • Each file is a page: about.html and about/index.html both answer at /about/.
  • Ship a 404.html. It is shown for any address the website does not have.
  • Keep existing paths when you rebuild, so links people already have keep working.
  • Put the header and footer in _partials/ and include them from each page with <!--#include file="_partials/header.html" -->. A partial is never served on its own.
  • For a contact form or a waitlist, use a data recipe. It registers the collection and turns on email to the editors for each submission.

Change one page

Say “update our website” to your AI. It reads the pages it will change and sends only those, so every other page stays exactly as it was. This works from a chat window with no shell.

Sending the whole site again replaces every page. If that would remove pages the website has, SnapHost refuses and lists them. In the dashboard you confirm the list; your AI replaces the whole website only when you say so.

Review a bigger change as a preview

  1. Your AI sends the change as a preview. The live website does not change; the new version waits.
  2. Open the preview from the bar on the website’s page, or ask your AI for a link. The link works for one hour for anyone who has it. Forms on a preview store nothing and send no email.
  3. When you are happy, choose Put live, or tell your AI to. Only the waiting preview can be put live. To go back to an earlier version, roll back to it.

Putting a preview live or restoring a version replaces the whole website, and you confirm first. The bar names who saved the waiting preview and when. Saving a new preview replaces the one that waits, so you are asked first when it is a colleague’s.

When the live website changed after a preview was made

A preview is built on the live website as it was. If someone changes the live website afterwards, the waiting preview is marked stale and cannot be put live: putting it live would undo their change. Choose Discard on the bar, or tell your AI to, then download the live website from the Versions tab, make your change on top of it and upload it as a new preview.

Redirect addresses for www

Add the other addresses people might type, such as www.pson.is, as redirect addresses of the website. Each one sends visitors to the same page on the website’s own address. At your registrar, the website’s bare address needs an A record, and an address like www.pson.is needs a CNAME record that points to the name SnapHost shows. Each address also needs its own TXT ownership record. A website can have three redirect addresses.

Take a website offline and bring it back

A website is public or offline, nothing in between. Any editor can take it offline. Its addresses then answer that the site is not available, and nothing is deleted. Bring it back online the same way, from the website page. Bringing it back online is limited to 10 times an hour. Taking it offline never is.

Stop being a website

A workspace owner can remove the domain to stop the site being a website. The site is kept, private to its editors, and you change who can view it from the sharing settings. Its redirect addresses stop working. The domain can only ever be a website again; it can never be used for private sharing.

Delete a website

Only an owner can delete a website. Its content, history and form submissions are deleted and the domain answers that it is not available. Export the form submissions first if you need them. The domain can only ever be a website again.

Send a sharing domain home page to the website

A sharing domain’s bare address can show one site, or send people to one of the workspace’s websites. Choose the website in the domain’s settings. Only the bare address is redirected, and only while the website is online; if it goes offline or is removed, the bare address shows nothing.

Search and sharing

Search listing is on by default. A listed website has a sitemap.xml and a robots.txt made for it, unless your files include their own. With listing off, every page asks search engines to skip it and the sitemap is gone; pages already in search results can take weeks to disappear. Change the choice in the website’s Settings.

For your AI

  • list_websites comes first: it gives each website’s site id, its editors and its waiting preview.
  • Make a website with add_custom_domain and mode set to website. For a domain already added to the site as a shared page address, call it again with the same host and site_id; it changes that domain and adds none. Add other addresses with mode set to redirect.
  • Change pages with update_site: read each file with get_site_content, then send changes with base set to live and the content_hash you read as base_content_hash. The hash is required: if the site changed since, the update is refused and nothing is undone.
  • Send the whole site only with replace_all, and only when the person says the whole website should be replaced.
  • Send preview set to true for a bigger change, then get_preview_link and, after the person says yes, set_live_version. With action set to discard it removes the waiting preview. A preview a colleague saved is replaced only with replace_preview, after asking the person.
  • add_website_editor and remove_website_editor change who edits; set_link_status takes a website offline and back; set_search_listing changes the listing; set_workspace_domain_root sends a sharing domain’s home page to a website.