doc/pages/02.administer/45.tutorials/05.domains/03.dns_subdomains/dns_subdomains.md
OniriCorpe 7a01793062
Improve markdown formatting of pages, a lot of them are improperly formatted (#2429)
* Revert "Revert "markdown format""

* fix formating

* fix readme

* add .markdownlint.json

* add markdownlint-rules-grav-pages

* add markdownlint-rules-grav-pages files

* add license for Markdown Lint Rules for Grav Pages

* fix [figure] mess

* fix [figure] mess 2

* fix [figure] mess 3

* maj .gitignore

* various fixes

* fix markdownlint-rules-grav-pages

* second formater pass

* various manual fixes

* add .markdownlintignore

* markdownlintignore: auto-generated pages

* disable proper-names for html_elements

* another bunch of various markdown fixes

* Update pages/02.administer/10.install/20.dns_config/dns_config.es.md

Co-authored-by: tituspijean <titus+yunohost@pijean.ovh>

---------

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
Co-authored-by: tituspijean <titus+yunohost@pijean.ovh>
2024-03-23 08:59:52 +01:00

2.5 KiB

title template taxonomy routes
DNS and subdomains for the applications docs
category
docs
default
/dns_subdomains

Subdomains

YunoHost allows the use of subdomains. If one owns a domain name mydomain.com, one first needs to create the subdomains in the DNS configuration (with one's registrar like Gandi).

Configuration example with Gandi

The DNS configuration needs an A record with an IPv4 address, an AAAA record with an IPv6 address, and various CNAME records, one for each desired subdomain.

If your DNS configuration looks like:

@         A            XYZ.XYZ.XYZ.XYZ
@         AAAA         1234:1234:1234:FFAA:FFAA:FFAA:FFAA:AAFF
*         CNAME        mydomain.com.
agenda    CNAME        mydomain.com.
blog      CNAME        mydomain.com.
rss       CNAME        mydomain.com.

then you can access agenda.mydomain.com, blog.mydomain.com and rss.mydomain.com subdomains.

Install an application on a subdomain

To install an application on a subdomain in YunoHost, for example blog.mydomain.com, the configuration is done in the administration panel. One first add the subdomain to the available domains list. The creation of a subdomain in YunoHost will create the corresponding configuration files for NGINX (the web server used in YunoHost).

Then, in the applications>install panel, one follows the classic installation process by choosing the desired subdomain as domain (for example blog.mydomain.com). One needs to choose the path / (in place of /wordpress for example). A warning message will appear telling that it won't be possible to install other application to this subdomain. After validation, the installation starts.

The application is then available at blog.mydomain.com (and not mydomain.com/wordpress).

Moving an application to a subdomain

What happens if the application is already installed? For example, one wants to move mydomain.com/wordpress to blog.mydomain.com. It depends on the application. Some applications allow the change of domain. In that case, one can proceed to the change through the administration panel: Applications > the_app_name > change URL. If the application doesn't allow URL change, then there is no easy way to do it. The best solution is to reinstall the application.

Reinstalling an application

First, save the application data through the backup process. Then uninstall the application with the administration panel. Then reinstall the application to the desired domain. Finally, restore the backup.