3 bases to understand

Each domain has DNS (Domain Name System), which indicate where the DNS zone of the domain name is

The DNS zone is then used to entrust the management of various services related to the domain name to different providers. For a single domain name, it is possible, for example, to entrust web hosting to provider X (via the A Record) and Email hosting to provider Y (via the MX record)

Example: the infomaniak.ch DNS are ns1.infomaniak.ch and ns2.infomaniak.ch, which indicates that the DNS zone of the domain name infomaniak.ch is managed by Infomaniak.

In administrative terms,

The DNS for a domain are configured with the registrar that manages the domain

The DNS zone can be supported by the registrar or another service provider

Web Hosting and Email Hosting can be supported by any host

In the most complex case, it is possible to have 1 different provider for the following services: reservation of the domain name and DNS management, management of the DNS zone, Web hosting, Email hosting.

As a registrar and web host, Infomaniak can manage all these services. This is the simplest solution.

The following diagram summarizes these possibilities, with X, Y, A and B being different providers.

For more information:

An MX record is used to point a domain name (ex .: your-site.com) to an email server

An A record is used to point a domain name (ex .: your-site.com) or a subdomain (ex .: example.your-site.com) to a Web server that has a static IP address