---
title: "Site handling basics"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:sitehandling-basics@12.4"
source: "ApiOverview/SiteHandling/Basics.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

# Site handling basics {#sitehandling-basics}

TYPO3 site handling and configuration is the starting point for creating new
websites. The corresponding modules are found in the TYPO3 backend in the
section **Site Management**.

A site configuration consists of the following parts:

-   Base URL configurations: the domain(s) to access my site.
-   [Language configuration](https://docs.typo3.org/permalink/t3coreapi:sitehandling-addinglanguages@12.4): the languages
    of my site.
-   [Error handling](https://docs.typo3.org/permalink/t3coreapi:sitehandling-errorhandling@12.4): error behavior of my
    site (for example, configuration of custom 404 pages).
-   [Static routes](https://docs.typo3.org/permalink/t3coreapi:sitehandling-staticroutes@12.4): static routes of my site
    (for example, `robots.txt` on a per site base).
-   Routing configuration: How shall routing behave for this site.

When creating a new page on root level via the TYPO3 backend, a very basic site
configuration is generated on the fly. It prevents immediate errors due to
missing configuration and can also serve as a starting point for all further
actions.

Most parts of the site configuration can be edited via the graphical interface
in the backend module **Sites**.

![](../../Images/AutomaticScreenshots/SiteHandling/SiteHandlingSiteModule.png)

> [!TIP]
> **Hint**
>
> While the editing mask for a site looks like a "normal" TYPO3 editing form,
> it is not. In contrast to other forms, the site configuration is stored in
> the file system and not in database tables.

## Site configuration storage {#site-storage}

When creating a new site configuration, a folder is created in the file system,
located at `<project-root>/config/sites/<identifier>/`. The site
configuration is stored in a file called `config.yaml`.

> [!NOTE]
> If you are using a Classic mode installation, the location is
> `typo3conf/sites/config.yaml`.

> [!TIP]
> Add this folder to your version control system.

## The configuration file {#site-configuration-file}

The following part explains the configuration file and options:

**config/sites/\<some_site>/config.yaml | typo3conf/sites/\<some_site>/config.yaml**

```yaml
rootPageId: 12
base: 'https://example.org/'
websiteTitle: Example
languages:
  - title: English
    enabled: true
    locale: en_US.UTF-8
    base: /
    websiteTitle: ''
    navigationTitle: English
    flag: gb
    languageId: 0
  - title: 'danish'
    enabled: true
    locale: da_DK.UTF-8
    base: /da/
    websiteTitle: ''
    navigationTitle: Dansk
    fallbackType: strict
    fallbacks: ''
    flag: dk
    languageId: 1
  - title: Deutsch
    enabled: true
    locale: de_DE.UTF-8
    base: 'https://example.net/'
    websiteTitle: ''
    navigationTitle: Deutsch
    fallbackType: fallback
    fallbacks: '1,0'
    flag: de
    languageId: 2
errorHandling:
  - errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=8'
  - errorCode: '403'
    errorHandler: Fluid
    errorFluidTemplate: 'EXT:my_extension/Resources/Private/Templates/ErrorPages/403.html'
    errorFluidTemplatesRootPath: 'EXT:my_extension/Resources/Private/Templates/ErrorPages'
    errorFluidLayoutsRootPath: 'EXT:my_extension/Resources/Private/Layouts/ErrorPages'
    errorFluidPartialsRootPath: 'EXT:my_extension/Resources/Private/Partials/ErrorPages'
  - errorCode: '0'
    errorHandler: PHP
    errorPhpClassFQCN: MyVendor\ExtensionName\ErrorHandlers\GenericErrorhandler
routes:
  route: robots.txt
  type: staticText
  content: |
    Sitemap: https://example.org/sitemap.xml
    User-agent: *
    Allow: /
    Disallow: /forbidden/

```

Most settings can also be edited via the **Site Management > Sites**
backend module, except for custom settings and additional routing configuration.

### Site identifier {#sitehandling-basics-site-identifier}

The site identifier is the name of the folder in
`<project-root>/config/sites/` that contains your configuration file(s).
When choosing an identifier, be sure to use ASCII, but you may also use `-`, `_`
and `.` for convenience.

### Root page ID {#root-page-id}

Root pages are identified by one of these two properties:

-   They are direct descendants of PID 0 (the root root page of TYPO3).
-   They have the **Use as Root Page** property in `pages` set to
    true.

> [!NOTE]
> The same root page ID **should not** be used in multiple site configurations.
> This may lead to misbehavior, since always the last defined site with this
> root page ID is used by TYPO3.
>
> <!-- TODO: no Markdown rendering for "versionadded" -->
>
> Starting with TYPO3 v12.1 the Sites module warns you if the
> same root page ID is used multiple times.

### websiteTitle {#sitehandling-basics-websitetitle}

The title of the website which is used in `<title>` tag in the frontend.

### base {#base}

The base is the base domain on which a website runs. It accepts either a
fully qualified URL or a relative segment "/" to react to any domain name.
It is possible to set a site base prefix to `/site1`, `/site2`
or even `example.com` instead of entering a full URI.

This allows a site base as `example.com` with http and https protocols to
be detected, although it is recommended to redirect HTTP to HTTPS, either at the
webserver level, via a `.htaccess` rewrite rule or by adding a redirect
in TYPO3.

Please note: when the domain is an [Internationalized Domain Name (IDN)](https://en.wikipedia.org/wiki/Internationalized_domain_name)
containing non-Latin characters, the base must be provided in an
ASCII-Compatible Encoded (ACE) format (also known as "[Punycode](https://en.wikipedia.org/wiki/Punycode)"). You can use
a [converter](https://www.punycoder.com/) to get the ACE format of the domain name.

> [!NOTE]
> This flexibility introduces side effects if you have multiple sites with
> mixed configuration settings as site base:
>
> -   Site 1: `/mysite/`
> -   Site 2: `example.com`
>
> It is unspecific when a URL like `example.com/mysite/` is detected,
> and can lead to side effects.
>
> In this case, the site administrator must set unique site base prefixes.

### languages {#languages}

Available languages for a site can be specified here. These settings determine
both the availability of the language and the behavior. For a detailed
description see [Language configuration](https://docs.typo3.org/permalink/t3coreapi:sitehandling-addinglanguages@12.4).

### errorHandling {#errorhandling}

The error handling section describes how to handle error status codes for this
website. It allows you to configure custom redirects, rendering templates, and
more. For a detailed description, see [error handling](https://docs.typo3.org/permalink/t3coreapi:sitehandling-errorhandling@12.4).

### routes {#routes}

The routes section is used to add static routes to a site, for example a
`robots.txt` or `humans.txt` file that depends on the current site
(an does not contain the same content for the whole TYPO3 installation).
Read more at [static routes](https://docs.typo3.org/permalink/t3coreapi:sitehandling-staticroutes@12.4).

### routeEnhancers {#routeenhancers}

While page routing works out of the box without any further settings, route
enhancers allow configuring routing for TYPO3 extensions. Read more at
[Advanced routing configuration (for extensions)](https://docs.typo3.org/permalink/t3coreapi:routing-advanced-routing-configuration@12.4).
