# MagicDNS

MagicDNS is a feature provided by Tailscale that automatically registers DNS names for devices in your network, making it easier to access and communicate with them using human-readable names instead of IP addresses.&#x20;

Here's a detailed explanation of how MagicDNS works and how you can use it:

### <mark style="color:blue;">Enabling MagicDNS</mark>

* For tailnets created on or after October 20, 2022, MagicDNS is enabled by default.
* If MagicDNS is not already enabled, you can enable it in the DNS page of the Tailscale admin console.

### <mark style="color:blue;">How MagicDNS works</mark>

* When MagicDNS is enabled, it automatically *<mark style="color:yellow;">**generates a fully qualified domain name**</mark>* (FQDN) for every device on your Tailscale network.
* The FQDN consists of two parts:
  * <mark style="color:purple;">Machine name:</mark> This is the name assigned to the device, which you can change.
  * <mark style="color:purple;">Tailnet name:</mark> This is the unique name of your Tailscale network, ending with <mark style="color:yellow;">`.ts.net`</mark>. You can view your tailnet name in the DNS page of the admin console.
* For example, if you have a device named <mark style="color:blue;">"monitoring"</mark> in a tailnet named <mark style="color:blue;">"yak-bebop.ts.net"</mark>, the FQDN for that device would be "monitoring.yak-bebop.ts.net".

### <mark style="color:blue;">Accessing devices using MagicDNS</mark>

* Once MagicDNS is enabled, any device signed in to your Tailscale network can access other devices using their machine names or FQDNs.
* To access a device, you can use its machine name in various scenarios:
  * SSH: <mark style="color:yellow;">`ssh username@monitoring`</mark>
  * Ping: <mark style="color:yellow;">`ping monitoring`</mark>
  * Browser: Type `monitoring` in the address bar
* Tailscale <mark style="color:yellow;">automatically adds search domains to your network</mark>, allowing you to use just the machine name instead of the full FQDN.
* However, when accessing devices that are shared with you, you must use the full FQDN, e.g., `ping webserver.example2.ts.net`.

### <mark style="color:blue;">Assigning and editing machine names</mark>

* MagicDNS automatically uses a device's machine name as part of the DNS entry.
* If you change a device's name, the MagicDNS entry will automatically update to reflect the new name.
* To assign a specific name to a device, you can edit its machine name in the Tailscale admin console.

### <mark style="color:blue;">Legacy beta.tailscale.net nameserver</mark>

* Previously, Tailscale used a tailnet name ending with `.beta.tailscale.net`. If you are still using this legacy nameserver, it is recommended to migrate to the new tailnet name ending with `.ts.net`.
* The `.beta.tailscale.net` nameserver will remain supported until at least November 1, 2023.

### <mark style="color:blue;">Disabling MagicDNS</mark>

* If needed, you can disable MagicDNS for your entire network by toggling the same button used to enable it in the DNS page of the admin console.
* To disable MagicDNS on a specific device, you can stop accepting network DNS settings on that device using the appropriate command or option based on your operating system.

### <mark style="color:blue;">Benefits of using MagicDNS</mark>

* Simplifies access to devices by allowing the use of human-readable names instead of IP addresses.
* Automatically updates DNS entries when device names change, ensuring consistent and up-to-date naming.
* Eliminates the need for manual DNS configuration for devices within your Tailscale network.
* Provides a convenient way to access devices across different platforms and locations.

### <mark style="color:blue;">To use MagicDNS effectively, follow these steps</mark>

1. Enable MagicDNS in your Tailscale network if it's not already enabled.
2. Assign meaningful and descriptive machine names to your devices.
3. Use the machine names or FQDNs to access and communicate with devices within your network.
4. If you have devices shared with you, remember to use their full FQDNs when accessing them.
5. If you encounter issues with MagicDNS on a specific device, you can disable it on that device while troubleshooting.

By leveraging MagicDNS, you can simplify the process of accessing and managing devices within your Tailscale network, making it more convenient and user-friendly for everyone involved.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://education.raspberrypiaustralia.online/network-manager/magicdns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
