Domains

Mayd has a quite sophisticated domain handling. That includes

  • Adding a global unlocalized domain
  • Adding a localized domain
  • Additional domains (as redirection targets)
  • Detection of unknown domains
  • Automatic dev domains

Domain Handling

You can assign domains either to a website or an application.

Application Domains

If you assign it to an application, it will be an unlocalized global domain, with the locals as first sub path:

https://example.org/de-DE/path

You will have a single domain for all your locales.

Website Domain

If you assign a domain to a website, it will be a localized domain, and directly display the website without the locale in the URL:

https://example.de/path

Keep in Mind

If you manage the domains manually in the database, a domain may only have either application or website set, never both at the same time!

  • An additional domain (a domain that is not the main domain) will always redirect to main domain of the application / website it is assigned to.
  • Not having a main domain but only additional domains is not supported.

Unknown Domains

If a request occurs with an unknown domain, it will automatically be redirected to the main website.

Dev Domains

If the request occurs in dev, a virtual domain is dynamically generated, that acts as an application domain for the main application. This way you normally don’t need to explicitly add the dev domain in the database (YMMV).