Skip to content

Commit

Permalink
Update multi-domain-operation.en.md (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar authored Jun 3, 2021
1 parent df37870 commit 3265c92
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions docs/manual/layout/site-structure/multi-domain-operation.en.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
---
title: 'Multi-domain operation'
description: 'Multi-domain operation means that a Contao installation can be reached under several domains and each of them produces a different output.'
description: 'Multi-domain operation means that a Contao installation can be accessed via more than one domain whereas each of them produces a different output.'
aliases:
- /en/layout/site-structure/multi-domain-operation/
weight: 30
---

{{% notice warning %}}
This article is machine translated.
{{% /notice %}}
Multi-domain operation means that a Contao installation can be accessed via more than one domain whereas each of them produces a different output. The latter is a very important detail because you can theoretically make the same website available via different domains. This, however, is not a good idea in terms of search engine optimization (think about "duplicate content") nor does it have anything to do with the multi-domain operation of Contao.

Multi-domain operation means that a Contao installation can be accessed under several domains and each of them produces a different output. The latter is a very important detail because you can theoretically make the same website available under different domains. This is not a good idea in terms of search engine optimization (keyword "duplicate content") nor does it have anything to do with the multi-domain operation of Contao.

For a real multi-domain operation, you need several starting points in yourContao site structure in addition to several domains. If you only have one starting point, your installation is only accessible under several domains. In this case, it is best to choose a main domain and redirect the other domains to it. This redirection can usually be set up in the control panel of your server or in a file`.htaccess`.
For a real multi-domain operation, you need several root pages in your Contao site structure plus multiple domains.
In case you only have one root page which should be accessible using multiple domains, it is best to choose a main domain and redirect the other domains to it. This redirection can usually be set up in the control panel of your server or the `.htaccess` in case you're using Apache webserver.

**Redirection from example.com to example.org via .htaccess**

Expand All @@ -26,14 +23,14 @@ RewriteRule (.*) http://www.example.org/$1 [R=301,L]

Let's assume that an agency is looking after a company with several websites and wants to manage them with a central Contao installation. For this purpose, the following domains were registered:

- `firma.at`
- `firma.ch`
- `firma.de`
- `company.org`
- `company.com`
- `company.us`

All domains are routed to the central installation, which means that Contao can be reached under all three domains. To ensure that the frontend loads the appropriate website for the domain, three start points of a website must be created in the site structure and the domain must be`Domainname` entered in the **"DNS settings"** section.
All domains are routed to the central installation, which means that Contao can be accessed via all three domains. To ensure that the front end loads the appropriate website for the domain, three root pages must be created in the site structure and the corresponding domain must entered in the **"DNS settings"** section.

After that, Contao will only show the website for Austria when you visit the `firma.at`website. This also means that the URL
After that, Contao will only show the website for `company.com` when you actually visit the `company.com` website. This also means that the URL

`www.firma.at/produkte.html`
`www.company.com/products.html`

will result in a 404 error (page not found) if the "Products" page exists in the site structure but is assigned to the website for Switzerland.
will result in a 404 error (page not found) if the "Products" page exists in the site structure but is assigned to the website for `company.org`.

0 comments on commit 3265c92

Please # to comment.