---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/sites.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/concepts/sites.md
  - href: en/sourcecraft/concepts/sites.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
title: SourceCraft Sites
description: SourceCraft Sites is a tool for free static website hosting. Learn how to publish your website from a repository.
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt


# SourceCraft Sites

<!-- source: en/_includes/sourcecraft/sites-intro.md -->
_SourceCraft Sites_ is a tool for free static website hosting without the need to configure server infrastructure. Files for a published website are hosted in a public [repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#repos) of a public SourceCraft [organization](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#org).

A static website is built with such client-side technologies as [HTML](https://en.wikipedia.org/wiki/HTML), [CSS](https://en.wikipedia.org/wiki/CSS), and [JavaScript](https://en.wikipedia.org/wiki/JavaScript). It may not contain any scripts that run on the web server side. You can use any static website generators, e.g., [Jekyll](https://jekyllrb.com/), [Hugo](https://gohugo.io/), [Gatsby](https://www.gatsbyjs.com/), etc.

Access to websites hosted in SourceCraft Sites is arranged over the secure [HTTPS](https://en.wikipedia.org/wiki/HTTPS) protocol. You do not need to upload your own [TLS certificate](https://en.wikipedia.org/wiki/Transport_Layer_Security).

{% note info %}

You can confirm ownership of a SourceCraft Sites website in [Yandex Webmaster](https://webmaster.yandex.com/welcome/). For more information, see [Questions about SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/qa/sourcecraft-sites.md#verify-site-owner).

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/sites-intro.md -->

Your website will be available at `https://<organization_slug>.sourcecraft.site/<repository_name>`.

SourceCraft Sites hosting is a great fit for portfolios, blogs, docs, landing pages, and more.

[Sample landing page on SourceCraft Sites](https://sourcecraft.sourcecraft.site/sites-landing/)

<!-- source: en/_includes/sourcecraft/sites-config.md -->
The SourceCraft Sites configuration is set up for a particular repository and stored in a file named `.sourcecraft/sites.yaml`. A configuration stored in the main branch, e.g., `master` or `main`, applies to the entire repository.

The general configuration format for SourceCraft Sites in `.sourcecraft/sites.yaml` is as follows: {#config}

```yaml
site:
  root: "<path_to_directory_with_website_files>"
  ref: "<branch_or_tag>"
```

Where:
* `root`: Absolute path from the repository root to the directory with website files, e.g., `site`. This is an optional setting. By default, it is set to the repository root.

  {% note tip %}

  We recommend using `index.html` for your website homepage.

  {% endnote %}

* `ref`: Name of branch or tag whose files will be used to publish the static website, e.g., `release`. This is an optional setting. By default, it is set to the repository’s main branch. Once you commit changes to the branch, the website will update automatically in a few minutes.
<!-- endsource: en/_includes/sourcecraft/sites-config.md -->

{% note tip %}

For examples of a SourceCraft Sites configuration, static website files, and source code, see the SourceCraft [sites-landing](https://sourcecraft.dev/sourcecraft/sites-landing) repository.

You can also use this repository as a template to create your own website.

{% endnote %}

The platform offers the following features for managing your published website in SourceCraft Sites:
* Versioning with [Git](https://git-scm.com/)
* Publishing changes through [pull requests](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md#pr)
* Automatic build from source code using [CI/CD](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/ci-cd.md)

<!-- source: en/_includes/sourcecraft/configuration-tip.md -->
{% note tip %}

You can set up and view repository configurations in the SourceCraft interface under ![image](../../_assets/console-icons/gear.svg) **Repository settings** in the ![image](../../_assets/console-icons/nut-hex.svg) **Configurations** section. Learn more in [this article](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configuration-edit.md).

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/configuration-tip.md -->

#### Useful links {#see-also}

* [Hosting a static website from a repository using SourceCraft Sites](https://sourcecraft.dev/portal/docs/en/sourcecraft/tutorials/sites.md)
* [SourceCraft resource relationships](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md)