---
title: How to Enable DoH on MikroTik
slug: how-to-enable-doh-on-mikrotik
description: Enhance your network security by learning how to block incoming DNS service connections on port 53 to mitigate cyber threats like DDoS attacks. 
docTags: 
createdAt: 2024-02-05T13:02:30.029Z
---

## Overview

The DNS over HTTPS protocol, commonly referred to as DoH, allows you to encrypt DNS requests, improving both security and privacy while browsing. Follow the steps below to enable this secure protocol on MikroTik routers using our servers.

## Configuration Steps

### Connect to the Router and Open the Console

Access your MikroTik router using **WinBox** or the web interface. Once connected, open the MikroTik terminal by clicking on **New Terminal** from the main menu.

### Download and Import the Root Certificate

You must download and install the root certificate to ensure proper certificate verification. Type or paste the following commands into the terminal:

:::CodeblockTabs
routeros

```bash
/tool fetch url=https://download.fsflt.com/fs_rootca/fs_rootca.pem
/certificate import file-name=fs_rootca.pem
```
:::

### Enable the Encrypted Protocol

Enable the service by specifying your unique server URL and requesting certificate verification. Paste this command into the terminal:

:::CodeblockTabs
routeros

```bash
/ip dns set use-doh-server=https://doh.fsflt.com/123456 verify-doh-cert=yes
```
:::

:::hint{type="warning"}
You must replace **123456** in the URL with your specific customer code or the unique token generated in your dashboard under the DoH section.
:::

## Verify Operation

Check that the router is correctly using the encrypted servers by running this verification command:

:::CodeblockTabs
routeros

```bash
/ip dns print
```
:::

Make sure the use-doh-server field in the output is correctly set to your specific URL.

:::hint{type="warning"}
If you are using a multi-WAN configuration or a local DNS setup, ensure that your firewall or NAT rules allow HTTPS traffic on port 443 to the domain doh.fsflt.com.
:::

