<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Domain – Serverküche</title><link>https://serverkueche.de/en/tags/domain/</link><description>Domain – Neueste Beiträge von Serverküche</description><generator>Hugo</generator><language>en-US</language><managingEditor>feedback@serverkueche.de (Serverküche)</managingEditor><webMaster>feedback@serverkueche.de (Serverküche)</webMaster><copyright>2026 Serverküche</copyright><lastBuildDate>Fri, 17 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://serverkueche.de/en/tags/domain/index.xml" rel="self" type="application/rss+xml"/><item><title>Connecting a domain to your server (DNS basics)</title><link>https://serverkueche.de/en/tutorials/connect-domain-to-server/</link><pubDate>Fri, 17 Jul 2026 00:00:00 +0000</pubDate><author>feedback@serverkueche.de (Serverküche)</author><guid>https://serverkueche.de/en/tutorials/connect-domain-to-server/</guid><description>A and AAAA records, TTL and propagation explained clearly: how your own domain points to your server – the prerequisite for HTTPS with Traefik.</description><content:encoded><![CDATA[<p>So far you only reach your server via its IP address. For real services you need a
<strong>domain</strong> – and not just for looks: without a publicly resolving domain,
<a href="/en/tutorials/traefik-reverse-proxy/">Traefik</a> can&rsquo;t fetch a <strong>TLS certificate</strong>
from Let&rsquo;s Encrypt later. This tutorial connects your domain to the server and
explains the three terms beginners get stuck on: A record, TTL and propagation.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>By the end, your domain (<code>YOUR_DOMAIN</code>) points to your server IP via an <strong>A record</strong>
(IPv4) and – if your server has IPv6 – an <strong>AAAA record</strong>, including <code>www</code>. You can
verify this yourself with <code>dig</code> and understand why a change isn&rsquo;t always visible
immediately. Optionally you also set up <strong>reverse DNS (PTR)</strong> – important as soon as
your server sends emails. This lays the foundation for all publicly reachable
services.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>A <a href="/en/tutorials/first-steps-netcup-vps/">set-up server</a> with a known public IP
address</li>
<li>A <strong>registered domain</strong> (at netcup, another registrar, or included in your hosting
package)</li>
<li>Access to the <strong>DNS management</strong> of your domain (at netcup: the customer account
CCP)</li>
</ul>
<h2 id="step-by-step">Step by step</h2>
<h3 id="step-1-find-the-server-ip">Step 1: Find the server IP</h3>
<p>Connect via SSH and display the public IP addresses:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ip -4 addr show scope global
</span></span><span class="line"><span class="cl">ip -6 addr show scope global</span></span></code></pre></div>
</div>
<p>The IPv4 address is after <code>inet</code> (e.g. <code>203.0.113.10</code>), any IPv6 address after
<code>inet6</code> (does not start with <code>fe80::</code>, that would only be link-local). Alternatively
you&rsquo;ll find both in the netcup <strong>Server Control Panel (SCP)</strong> in the server overview.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-herb-400 bg-herb-50 dark:border-herb-700 dark:bg-herb-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">🧑‍🍳</span>Tip
  </p>
  <div class="prose-kitchen text-sm">Note down both addresses. If your server has <strong>no</strong> global IPv6 address, you simply
don&rsquo;t create an AAAA record later – that&rsquo;s perfectly fine.</div>
</div>
<h3 id="step-2-create-a-and-aaaa-records">Step 2: Create A and AAAA records</h3>
<p>Open the DNS management of your domain. There you enter <strong>resource records</strong> – the
mapping of names to addresses. Create:</p>
<table>
	<thead>
			<tr>
					<th>Type</th>
					<th>Host / Name</th>
					<th>Value</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>A</code></td>
					<td><code>@</code></td>
					<td><code>YOUR_SERVER_IPV4</code></td>
			</tr>
			<tr>
					<td><code>A</code></td>
					<td><code>www</code></td>
					<td><code>YOUR_SERVER_IPV4</code></td>
			</tr>
			<tr>
					<td><code>AAAA</code></td>
					<td><code>@</code></td>
					<td><code>YOUR_SERVER_IPV6</code> <em>(only if available)</em></td>
			</tr>
			<tr>
					<td><code>AAAA</code></td>
					<td><code>www</code></td>
					<td><code>YOUR_SERVER_IPV6</code> <em>(only if available)</em></td>
			</tr>
	</tbody>
</table>
<ul>
<li><strong><code>@</code></strong> stands for the domain itself (<code>YOUR_DOMAIN</code>), <code>www</code> for the subdomain
<code>www.YOUR_DOMAIN</code>.</li>
<li><strong>A</strong> points to an IPv4 address, <strong>AAAA</strong> to an IPv6 address. The name &ldquo;AAAA&rdquo; comes
from an IPv6 address being four times as long as an IPv4 address.</li>
<li>For individual services you can later create specific subdomains (e.g. <code>cloud</code>,
<code>git</code>) – following the same pattern.</li>
</ul>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-amber-400 bg-amber-50 dark:border-amber-700 dark:bg-amber-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">⚠️</span>Warning
  </p>
  <div class="prose-kitchen text-sm">For A/AAAA enter <strong>only the bare IP</strong> – no <code>http://</code>, no slash, no port. For
redirects to other names there would be <code>CNAME</code>, but for &ldquo;domain → own server&rdquo; the
A/AAAA record is the right and most robust way.</div>
</div>
<h3 id="step-3-understand-ttl-and-propagation">Step 3: Understand TTL and propagation</h3>
<p>Every record has a <strong>TTL</strong> (Time To Live) in seconds – e.g. <code>3600</code> (one hour). It
tells resolvers worldwide <strong>how long</strong> they may cache the answer before asking again.</p>
<p>From this follows the notorious <strong>propagation</strong>: if you change a record, some
resolvers see the new value immediately, others only after the old TTL expires. &ldquo;DNS
propagating&rdquo; means nothing more than these caches expiring one by one. In everyday
use, reckon with <strong>minutes up to an hour</strong>, occasionally longer.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-herb-400 bg-herb-50 dark:border-herb-700 dark:bg-herb-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">🧑‍🍳</span>Before planned migrations
  </p>
  <div class="prose-kitchen text-sm">If you want to change an IP soon, lower the TTL <strong>one or two days beforehand</strong> to
e.g. <code>300</code> (5 minutes). Then the actual switch takes effect almost immediately later.
Raise it again after the migration.</div>
</div>
<h3 id="step-4-verify-with-dig">Step 4: Verify with dig</h3>
<p>Wait a few minutes, then check from your own machine where the domain points. <code>dig</code>
is the standard tool for that:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +noall +answer YOUR_DOMAIN A</span></span></code></pre></div>
</div>
<p>This is what a correct answer looks like (example for this site&rsquo;s real domain):</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">serverkueche.de.	600	IN	A	46.38.243.234</span></span></code></pre></div>
</div>
<p>The number <code>600</code> is the remaining TTL, followed by the target IP. For IPv6, do the
same with <code>AAAA</code>. If you only want it very brief:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short YOUR_DOMAIN</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">46.38.243.234</span></span></code></pre></div>
</div>
<p>If your correct server IP appears, the domain is connected. Also check <code>www</code>:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short www.YOUR_DOMAIN</span></span></code></pre></div>
</div>
<p>Here too, the <strong>same</strong> server IP as for the apex should come back as a plain line:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">46.38.243.234</span></span></code></pre></div>
</div>
<h3 id="step-5-set-reverse-dns-ptr--optional-but-recommended">Step 5: Set reverse DNS (PTR) – optional but recommended</h3>
<p>The A record answers the question &ldquo;Which IP belongs to this name?&rdquo;. <strong>Reverse DNS</strong> –
the PTR record – answers the opposite direction: &ldquo;Which name belongs to this IP?&rdquo;.
For a plain website you don&rsquo;t need this. But as soon as your server <strong>sends emails</strong> –
even if only notifications from Nextcloud, Gitea &amp; co. – it&rsquo;s practically mandatory:
the receiving mail servers reject mail from IPs <strong>without</strong> a matching PTR or treat it
as spam.</p>
<p>The crucial difference from the previous records: you enter the PTR <strong>not</strong> at your
DNS provider, but where the <strong>IP address is managed</strong> – i.e. at your <strong>VPS provider</strong>.
At netcup you&rsquo;ll find it in the <strong>Server Control Panel (SCP)</strong> in the <strong>Netzwerk
(Network)</strong> tab – there&rsquo;s a <strong>Reverse DNS</strong> field per address (IPv4 and IPv6). Enter a
hostname there that points to the same server via an A record – either directly
<code>YOUR_DOMAIN</code> or your own name like <code>server.YOUR_DOMAIN</code> (shown as an example in the
screenshot) – and click <strong>Save</strong>.</p>
<p><figure class="my-6"><img src="/en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_d24e02b203a775be.webp" srcset="/en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_888311629ed75749.webp 480w, /en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_d24e02b203a775be.webp 768w, /en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_1a64247f0e364cec.webp 1200w, /en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_ce3761572748486e.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/connect-domain-to-server/netcup-reverse-dns_hu_aff7b021b12d562c.webp"
    alt="netcup Server Control Panel in the Network tab: the reverse-DNS fields for the IPv4 and IPv6 address, each with an example hostname entered and a Save button" title="Reverse DNS in the netcup SCP under Network – one field per IP address"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Reverse DNS in the netcup SCP under Network – one field per IP address</figcaption></figure></p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-herb-400 bg-herb-50 dark:border-herb-700 dark:bg-herb-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">🧑‍🍳</span>Forward and reverse must match
  </p>
  <div class="prose-kitchen text-sm">For the PTR to count as &ldquo;clean&rdquo; (forward-confirmed rDNS, FCrDNS), the name entered
there must <strong>point back to the same IP</strong> via an A/AAAA record. For <code>YOUR_DOMAIN</code> and
<code>www</code> this is already satisfied by step 2. If you use your own name like
<code>server.YOUR_DOMAIN</code>, first create an A/AAAA record for it as in step 2 – otherwise
the reverse direction doesn&rsquo;t match.</div>
</div>
<p>If you have <strong>IPv6</strong>, set the PTR <strong>for both</strong> addresses – IPv4 <em>and</em> IPv6. The IPv6
PTR is easily forgotten, and that&rsquo;s exactly what some mail servers trip over after all.</p>
<p>You can check the result with <code>dig</code> and the <code>-x</code> option (reverse lookup) – for IPv6
do the same with <code>YOUR_SERVER_IPV6</code>:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short -x YOUR_SERVER_IPV4</span></span></code></pre></div>
</div>
<p>Your hostname with a trailing dot should come back:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">serverkueche.de.</span></span></code></pre></div>
</div>
<p>If nothing comes back, or still the provider&rsquo;s default name (at netcup something like
<code>v220….bestsrv.de</code>), the PTR is not (correctly) set yet – or, as with every DNS entry,
the change still needs some time.</p>
<h2 id="when-things-go-wrong">When things go wrong</h2>
<div class="troubleshoot not-prose">
<p><strong><code>dig</code> returns no IP or a wrong (old) one.</strong> Usually still propagation. Query a
public resolver specifically to bypass your local cache: <code>dig +short YOUR_DOMAIN @1.1.1.1</code>. If it already shows the correct value, only your local/provider cache
hasn&rsquo;t expired yet – wait.</p>
<p><strong>The domain resolves, but to the wrong IP – e.g. a registrar&rsquo;s parking page.</strong> Often
an old A record or a redirect/parking setting still exists. Remove contradictory
entries; per name and type there should be exactly <strong>one</strong> value (deliberate
exceptions aside).</p>
<p><strong>IPv4 works, IPv6 (AAAA) leads to timeouts.</strong> You entered an AAAA record even though
the server has no working IPv6 address. Browsers then prefer IPv6 and run into a
timeout. remove the AAAA record until the server really supports IPv6.</p>
<p><strong>In some interfaces the value is stored with a trailing dot (<code>YOUR_DOMAIN.</code>) and
you&rsquo;re unsure.</strong> The trailing dot (root of the DNS hierarchy) is normal and correct –
many DNS managers add it automatically. No reason to worry.</p>
<p><strong>Emails sent from the server land in spam or are rejected (the mail log shows e.g.
<code>does not resolve to address</code> or <code>no PTR record</code>).</strong> The reverse-DNS entry (PTR) is
missing or doesn&rsquo;t match the sender hostname. Set the PTR as described in step 5 at
the VPS provider and make sure it points to the same name that also resolves via the
A/AAAA record.</p>

</div>

<h2 id="maintenance--backups">Maintenance &amp; backups</h2>
<ul>
<li><strong>DNS is low-maintenance.</strong> Once set correctly, the A/AAAA record rarely changes.
Exception: a <strong>server migration</strong> – then the TTL trick from step 3 applies.</li>
<li><strong>Document your records.</strong> Keep track somewhere of which names (<code>@</code>, <code>www</code>,
<code>cloud</code>, …) point to which IP. With several services you otherwise lose the
overview.</li>
<li><strong>No classic backup needed</strong>, but a screenshot or export of your DNS zone doesn&rsquo;t
hurt in case you switch providers.</li>
<li><strong>Carry reverse DNS along on an IP change.</strong> If the server gets a new IP (migration,
new product), you have to reset the PTR at the VPS provider – it&rsquo;s tied to the IP,
not the domain.</li>
</ul>
<p>Your domain now points to the server – with that, the last prerequisite is met for
serving services <strong>publicly with automatic HTTPS</strong> via the <a href="/en/tutorials/traefik-reverse-proxy/">reverse proxy
Traefik</a>.</p>
]]></content:encoded></item></channel></rss>