The domain is the address of your website, and web hosting is the storage space on a server where the website actually lives. The two are connected by DNS records that point to the server's IP address. You can book domain and hosting together or with different providers and change the hosting later without changing the domain.
Key facts
- Domain
- Address, for example example.com
- Web hosting
- Storage space and software for the website
- Connection
- DNS records, mainly A and MX
- Domain on its own
- Shows no content without a server
- Changing host
- Domain stays, only the records change
- Email mailboxes
- Belong to the hosting, not the domain
What is a domain?
A domain is a name on the internet under which visitors reach your website and other people reach your email addresses. It is rented from a registration authority for a term, usually one year, and then renews as long as you do not cancel it. The domain itself contains no files. It is an entry in a worldwide directory that specifies which name servers provide information about it. Only these name servers say which server hosts the website and which mail server accepts email. A domain without matching records therefore leads nowhere.
What is web hosting?
With web hosting you rent space on a server that the provider operates and maintains. That is where the files of your website are stored, such as the installation of a CMS like WordPress, along with the related databases. A web server delivers the pages to visitors, and a scripting language such as PHP generates dynamic content. Usually several customers share one server, each in a separate area with a fixed quota for storage, databases and mailboxes. The provider takes care of operating system updates and securing the server, while you maintain the content through a control panel.
How are domain and hosting connected?
The connection is made through DNS records in the domain's zone. For example.com to point to your hosting, a handful of records are needed:
- An A record and, where applicable, an AAAA record with the IPv4 and IPv6 address of the web server.
- A record for www, either as another A record or as a CNAME pointing to the domain.
- An MX record pointing to the mail server that accepts email for the domain.
- TXT records for SPF and DKIM, so that your emails are not classified as spam.
How the name resolution behind this works and what the TTL does is explained in the article on DNS.
Book the domain separately or as part of a package?
Many web hosting packages include one or more domains, or you book both from the same provider. The advantage lies in the setup: the provider enters the required DNS records itself, and you manage domain and hosting in one place. A separately registered domain is more flexible. You can point it to any server, spread different subdomains across different services and cancel the hosting without touching the domain. With a package domain, make sure that you are registered as the holder and that you can keep or move the domain if you cancel the package.
Domain with your own server instead of web hosting
A domain does not need web hosting. You can just as well point it to a VPS or a dedicated server by entering its IP address in the A record. This makes sense if you need root access, your own server software or an application that does not run on PHP and MySQL. You then set up the web server, database, SSL certificate and mail server yourself and keep them up to date. Many operators therefore leave email with a hosting package or a mail service and point only the A record to their own server. Separate DNS records make both possible.
Moving and email mailboxes
Because domain and hosting are separate things, you can change your hosting without changing the address of your website. You set up the website with the new provider and then adjust the DNS records. The domain can stay with its current registrar; a domain transfer is a separate process using an auth code, described in the guide to moving a domain. The same applies to email: the address info@example.com belongs to the domain, but the mailbox with the stored messages sits on the hosting's mail server. When you move, you create the mailboxes again with the new provider, transfer the messages, for example via IMAP, and only then switch the MX record.
At Realtoxmedia you can register domains on their own, .de from €5.21 per year, and manage the DNS records in the customer panel. If you book domain and web hosting together, the DNS records are preset. The web hosting packages include email accounts and databases and are managed via Plesk.
The domain is the address, and web hosting is the place where the website and mailboxes live. DNS records connect the two and can be switched to another server at any time. This is why you can change hosting or servers and keep your domain.