Private customers Business customers

Connect a domain to your web hostingNameservers, A records and subdomains

Without a domain, web hosting is not publicly reachable. This guide shows the three ways to connect a domain - from registering it with us and switching nameservers to setting a single A record.

NameserversA recordSubdomains

Published on

Why a domain at all?

The web hosting is the place where your files are stored. The domain is the address under which visitors find this place. Without it, there would only be an IP address - technically usable, practically unreasonable for anyone.

The connection is made via DNS: an entry in the Domain Name System points from your domain to the server on which your web hosting runs. This entry can be set in three ways.

Rent web hosting from €1.99 / month

Prepaid without a contract, Plesk included.

View plans & prices

Route 1: register the domain directly at MainHoster.de

The simplest case. If you order the domain in the same customer interface as the web hosting, it is automatically put on our nameservers and assigned to the web hosting. You do not have to set a single DNS record by hand.

How many domains you can assign depends on the plan: 2 in plan S, 5 in plan M, unlimited from plan L. Available extensions and prices are on the domains page.

Route 2: switch nameservers at another registrar

Your domain is with another provider and should stay there? Then switch the nameservers there to ours. We then take over the complete DNS management for this domain, and you can conveniently maintain subdomains, mail records and redirects in Plesk.

  1. Look up the nameservers valid for your web hosting in the customer interface.
  2. At your previous registrar, go to domain management and replace the nameserver entries there.
  3. Add the domain in the Plesk subscription so that the web hosting accepts requests for it.
  4. Wait until the change has been applied - see below.

Important: with the nameserver switch, all DNS records move along, including those for email. If you still use your mail addresses at the old provider, you have to add the MX records with us afterwards - otherwise mail delivery is interrupted. Background in Change domain nameservers.

Route 3: change only individual A records

If DNS management should stay with the previous provider - for example because other services depend on it there - you only change the A record.

  • Set the A record for @ (the domain itself) to the IP address of your web hosting.
  • Set the same value for www, or alternatively let www point to the main domain as a CNAME.
  • Leave all other records unchanged, especially MX for email.

You will find the IP address of your web hosting in Plesk in the subscription overview. In this case too, the domain must also be added in the Plesk subscription. What each record type does is explained in DNS records explained.

How long does the switch take?

DNS changes do not take effect immediately. How quickly they arrive depends on two things:

  • TTL: every DNS record has a validity period. Until it has expired, resolvers still deliver the old value. With us, the TTL is fixed at 24 hours: new records are usually reachable after a few minutes, changed ones can take up to a day. So plan a switch with a day's lead time.
  • Nameserver change: a nameserver change runs via the registry of the domain extension and usually takes longer than a pure record change - allow up to 24 hours.

During the transition, some visitors still see the old site. That is normal and not an error. So let the old server keep running for a few days if you are in the middle of moving.

Create subdomains

You create subdomains such as shop.yourdomain.com or test.yourdomain.com directly in Plesk - a DNS entry at the registrar is not needed as long as the nameservers are with us.

Every subdomain gets its own document root and can be configured independently, including its own PHP version and its own SSL certificate. Staging copies also run this way: you clone your WordPress site to a subdomain, test there calmly and then transfer the changes to the live site. How many subdomains are possible depends on the plan - 10 in plan S, unlimited from plan L. The complete guide including the DNS special case with external management is in Create a subdomain.

If the domain is not reachable

  • The old site still appears: usually caching. Check the resolution in another network or wait for the TTL before you change further settings.
  • Plesk shows a default page: the domain points correctly to the server, but there is no index file in the document root yet.
  • Certificate warning in the browser: the domain is connected, but the SSL certificate has not been issued yet. That only works once the domain points to the server - see Set up an SSL certificate.
  • Mails no longer arrive: after a nameserver change, the previous provider's MX records are missing. Add them in DNS management.

Frequently asked questions

Yes. You can either switch the nameservers to MainHoster.de - then you manage the DNS with us - or merely set the A record at your previous provider to the IP address of your web hosting. In both cases, the domain must also be added in the Plesk subscription.

A change to individual DNS records has arrived everywhere after a few minutes to 24 hours, depending on the TTL. A complete nameserver change runs via the registry of the domain extension and can take up to 24 hours.

Plan S allows 2 domains, plan M 5; from plan L, domains and subdomains can be assigned without limit. Every assigned domain gets its own directory and can serve its own website.

No. As long as storage, databases and the number of assignable domains in the booked plan are sufficient, you can run several websites on one web hosting plan - each under its own domain.

With the nameserver change, the entire DNS management moves along, including the MX records for email. If you still use your mailboxes at another provider, you have to add the MX records in DNS management, otherwise mail delivery stops.

Domain and web hosting from one provider

A .de domain costs €6.49 / year. If domain and web hosting are in the same customer interface, manual DNS maintenance disappears completely.

View web hosting plans & prices