{"id":143795,"date":"2023-03-05T13:10:29","date_gmt":"2023-03-05T13:10:29","guid":{"rendered":"https:\/\/ded9.com\/?p=143795"},"modified":"2025-11-04T13:28:25","modified_gmt":"2025-11-04T13:28:25","slug":"how-to-configure-dns-in-mikrotik","status":"publish","type":"post","link":"https:\/\/ded9.com\/tr\/how-to-configure-dns-in-mikrotik\/","title":{"rendered":"Master DNS Configuration on MikroTik: Setup &#038; Best Practices"},"content":{"rendered":"<p>If you are active in the internet world, you know that <a href=\"https:\/\/ded9.com\/what-is-a-dns-server-2\/\">DNS<\/a> is like a phone book. The phonebook that you receive the domain name and gives the IP address to the browser (or vice versa) so that the user&#8217;s request can be answered correctly. Configuring DNS in Mikrotik also lets your router act as a DNS server. Therefore, by purchasing a Mikrotik virtual server, you will improve your network&#8217;s performance and access its various features, allowing you to use your router in multiple fields.<\/p>\n<p>By configuring DNS in Mikrotik, the router acts as a DNS server that can easily translate domain names to IP addresses and vice versa.<\/p>\n<p>For this tutorial, we have used the Winbox tool. Suppose you follow all the steps carefully and set the addresses and options according to your needs. In that case, you can be sure that you will not encounter any problems or errors in the process of configuring DNS in Mikrotik:<\/p>\n<h2>What does DNS do?<\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-143796 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS.png\" alt=\"What does DNS do?\" width=\"700\" height=\"500\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS.png 700w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-300x214.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>The same is valid for web users. When a user enters a domain name (www.example.com) in the browser bar, the browser first sends this request to the DNS server. The server returns the IP address of that domain to the browser. Then, using this IP address, the browser can communicate with the web server, receive the necessary information, and provide it to the user.<\/p>\n<p><strong>Using the ping command, you can see the IP address of a specific domain!<\/strong><\/p>\n<p>Run CMD as Administrator:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-143799 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/ping-domain-name-1.png\" alt=\"Run CMD as Administrator:\" width=\"494\" height=\"257\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/ping-domain-name-1.png 494w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/ping-domain-name-1-300x156.png 300w\" sizes=\"(max-width: 494px) 100vw, 494px\" \/><\/p>\n<p>The DNS protocol is client-server. In this way, the DNS Client requests that the server convert the domain name to the IP address, and the DNS Server responds.<\/p>\n<p>The Mikrotik router has DNS Client and DNS Server features that translate the domain name to the IP address. In addition, the DNS Server converts domain names to IP addresses for all clients connected to the server itself (not the router).<\/p>\n<h2>So why should we use Mikrotik&#8217;s DNS server?<\/h2>\n<p>If you want to use the ISP&#8217;s public DNS server, you need bandwidth for every request made through the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wide_area_network\" target=\"_blank\" rel=\"noopener\">WAN<\/a> connection, which you have paid for. Too many requests lead to delays.<\/p>\n<p>But suppose you use your router as a DNS server by configuring DNS in Mikrotik. In that case, you can cache DNS information related to the server, save bandwidth, and quickly respond to client requests. The Mikrotik DNS server is more reliable, faster, and secure than a public one.<\/p>\n<h2>How to configure DNS in Mikrotik<\/h2>\n<p>The following steps will show you how to configure the DNS service on your MikroTik router.<\/p>\n<h3>1) Open the inbox.<\/h3>\n<p>Open the Winbox program and enter the Mikrotik router&#8217;s main dashboard by entering your router&#8217;s address.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-143802 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/winbox-dashboard.png\" alt=\"Open the Winbox program and enter the Mikrotik router's main dashboard by entering your router's address.\" width=\"843\" height=\"555\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/winbox-dashboard.png 843w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/winbox-dashboard-300x198.png 300w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/winbox-dashboard-768x506.png 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/p>\n<h3>2) Go to the DNS section.<\/h3>\n<p>From the left menu, find the IP option and click on it. Select DNS from the corresponding submenu.<\/p>\n<h3>3) Complete the fields of the DNS settings window.<\/h3>\n<p>After clicking on DNS, the following window will open:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-143805 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-setting.jpg\" alt=\"After clicking on DNS, the following window will open:\" width=\"366\" height=\"324\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-setting.jpg 366w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-setting-300x266.jpg 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/p>\n<p>In the Servers section, enter the IP address of your network&#8217;s DNS server or the public DNS IP, such as 8.8.8.8 and 8.8.4.4, which belongs to Google.<\/p>\n<p>If you use a dynamic server for DNS, enter its IP in the Dynamic Servers section. Otherwise, ignore this section.<\/p>\n<p>Tick the Allow Remote Request option to use your Mikrotik server as a DNS server and respond to users&#8217; requests. This option also activates the router&#8217;s DNS server&#8217;s caching feature.<\/p>\n<p>The Max UDP Packet Size section determines the maximum UDP packet size.<\/p>\n<p>Using the Query Server Timeout field, you can determine the waiting time for the router to receive a response from the DNS server (in seconds).<\/p>\n<p>The Query Total Timeout field corresponds to the total waiting time you have considered for the DNS response (in seconds).<\/p>\n<p>The Cache Size field determines the size of the cache space.<\/p>\n<p>Determining the time required to cache a query before a new request is made through the Cache max TTL field.<\/p>\n<p>The Mikrotik router itself determines the amount of Cache Used.<\/p>\n<h3>4) Apply the settings.<\/h3>\n<p>After specifying the values of each of the fields, click Apply and then click OK.<\/p>\n<h4>Set DNS entry statically<\/h4>\n<p>Even though the DNS server receives and processes each entry, it saves the cache memory&#8217;s corresponding domain and IP address. Still, if, for any reason, you want to statically link a specific domain and IP address and store it in the DNS cache, put your Mikrotik router server, you must act as follows:<\/p>\n<p>Open Windows and click on IP to open the DNS window.<\/p>\n<p>Click on the Static button to open the DNS Static window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-143808 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/static-in-dns-setting.jpg\" alt=\"Click on the Static button to open the DNS Static window.\" width=\"366\" height=\"324\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/static-in-dns-setting.jpg 366w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/static-in-dns-setting-300x266.jpg 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/p>\n<p>Then click on +.<\/p>\n<p>Enter the name of the desired host or domain in the Name field and then enter the corresponding IP address.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-143811 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-static-setting.png\" alt=\"Enter the name of the desired host or domain in the Name field and then enter the corresponding IP address.\" width=\"661\" height=\"458\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-static-setting.png 661w, https:\/\/ded9.com\/wp-content\/uploads\/2023\/03\/DNS-static-setting-300x208.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/p>\n<h4>Enter static input<\/h4>\n<p>The TTL section is set to 1 day, which is enough, so there is no need to change its value.<\/p>\n<p>Finally, click Apply and OK to save this new entry in the static DNS list.<\/p>\n<h2>Conclusion<\/h2>\n<p>Using the Mikrotik router as a DNS server brings many advantages, the most important of which is high speed and security in responding to user requests. Configuring DNS in Mikrotik is done in a few short and simple steps, and we owe this simplicity to the simple graphic interface provided by the Winbox tool.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is DNS forwarding in MikroTik?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>DNS forwarding allows your MikroTik router to send DNS queries it can\u2019t resolve to external nameservers.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I add custom DNS records on MikroTik?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes \u2014 you can create static DNS entries (like hostnames) directly on the router.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I improve DNS lookup speed?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use reliable upstream DNS servers, enable DNS caching, and minimize unnecessary queries.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you are active in the internet world, you know that DNS is like a phone book. The phonebook that you receive the domain name and gives the IP address to the browser (or vice versa) so that the user&#8217;s request can be answered correctly. Configuring DNS in Mikrotik also lets your router act as [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":143817,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[93,2260],"tags":[1097,315],"class_list":["post-143795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domain","category-mikrotik","tag-dns","tag-mikrotik"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/143795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/comments?post=143795"}],"version-history":[{"count":6,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/143795\/revisions"}],"predecessor-version":[{"id":263149,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/143795\/revisions\/263149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media\/143817"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media?parent=143795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/categories?post=143795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/tags?post=143795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}